mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 11:38:34 +00:00
abseil-cpp: Split so-files into separate packages
Use PACKAGES_DYNAMIC and PACKAGESPLITFUNCS to put each shared object into its own package named libabsl-*. The shared objects depend on each other which means you still get a lot of them if you link against a single one. The main package abseil-cpp RDEPENDS on all of the libabsl-* packages. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -28,4 +28,27 @@ EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
|
||||
|
||||
SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}"
|
||||
|
||||
PACKAGES_DYNAMIC = "^libabsl-*"
|
||||
PACKAGES_DYNAMIC:class-native = ""
|
||||
|
||||
PACKAGESPLITFUNCS =+ "split_dynamic_packages"
|
||||
|
||||
python split_dynamic_packages() {
|
||||
libdir = d.getVar('libdir')
|
||||
|
||||
libpackages = do_split_packages(
|
||||
d,
|
||||
root=libdir,
|
||||
file_regex=r'^libabsl_(.*)\.so\..*$',
|
||||
output_pattern='libabsl-%s',
|
||||
description="abseil shared library %s",
|
||||
prepend=True,
|
||||
extra_depends='',
|
||||
)
|
||||
if libpackages:
|
||||
d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages))
|
||||
}
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
Reference in New Issue
Block a user