diff options
author | Ola x Nilsson <olani@axis.com> | 2024-03-11 14:03:22 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-11 07:10:15 -0700 |
commit | dd6421e65eb75c35a904f4b487ba022075035ecc (patch) | |
tree | 2eba095a55d384093b45ded4332b07007326c3e9 | |
parent | 0182848ca478426fcf2870065e247e9f14436e94 (diff) | |
download | meta-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.bb | 23 |
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 | ||
28 | SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" | 28 | SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" |
29 | 29 | ||
30 | PACKAGES_DYNAMIC = "^libabsl-*" | ||
31 | PACKAGES_DYNAMIC:class-native = "" | ||
32 | |||
33 | PACKAGESPLITFUNCS =+ "split_dynamic_packages" | ||
34 | |||
35 | python 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 | |||
51 | ALLOW_EMPTY:${PN} = "1" | ||
52 | |||
30 | BBCLASSEXTEND = "native nativesdk" | 53 | BBCLASSEXTEND = "native nativesdk" |