summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOla x Nilsson <olani@axis.com>2024-03-11 14:03:22 +0100
committerKhem Raj <raj.khem@gmail.com>2024-03-11 07:10:15 -0700
commitdd6421e65eb75c35a904f4b487ba022075035ecc (patch)
tree2eba095a55d384093b45ded4332b07007326c3e9
parent0182848ca478426fcf2870065e247e9f14436e94 (diff)
downloadmeta-openembedded-dd6421e65eb75c35a904f4b487ba022075035ecc.tar.gz
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>
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.1.bb23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.1.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.1.bb
index 9cb325870..e6c65d306 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.1.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.1.bb
@@ -27,4 +27,27 @@ EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
27 27
28SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" 28SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}"
29 29
30PACKAGES_DYNAMIC = "^libabsl-*"
31PACKAGES_DYNAMIC:class-native = ""
32
33PACKAGESPLITFUNCS =+ "split_dynamic_packages"
34
35python split_dynamic_packages() {
36 libdir = d.getVar('libdir')
37
38 libpackages = do_split_packages(
39 d,
40 root=libdir,
41 file_regex=r'^libabsl_(.*)\.so\..*$',
42 output_pattern='libabsl-%s',
43 description="abseil shared library %s",
44 prepend=True,
45 extra_depends='',
46 )
47 if libpackages:
48 d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages))
49}
50
51ALLOW_EMPTY:${PN} = "1"
52
30BBCLASSEXTEND = "native nativesdk" 53BBCLASSEXTEND = "native nativesdk"