summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-06-23 21:33:43 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-06-24 07:43:52 +0000
commit340e5d4c4173a921b6f9f18db0c9e830a778e465 (patch)
treee19bcdd82a022983ae6c7abf6d0619280b67cb62 /meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
parent03b7ca4d462dd6e534c8a5fc93908dcb1816550d (diff)
Update license handling for pipewire recipe
We need to set LICENSE to multiple (MIT & GPL-2.0-only & LGPL-2.1-or-later) to satisfy the current scheme required by bitbake. But the licenses of the output packages are not all 3, but mostly MIT and a few LGPL-2.1-or-later and one GPL-2.0-only. To map the dynamically created output packages with the proper MIT license, we need to call setVar after all dynamic packages are created. Bug-AGL: SPEC-3844 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: I0900902af2527254869c125ec90239c9afb26f3c Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26449 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Georgios Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb')
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb26
1 files changed, 22 insertions, 4 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
index e52745a7d..b1a1aebc0 100644
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
@@ -10,10 +10,7 @@ SUMMARY = "Multimedia processing server for Linux"
DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices"
HOMEPAGE = "https://pipewire.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues"
-LICENSE = "MIT"
-LICENSE_${PN}-jack = "GPL-2.0-only"
-LICENSE_${PN}-alsa-card-profile = "LGPL-2.1-or-later"
-LICENSE_${PN}-spa-plugins-alsa = "LGPL-2.1-or-later"
+LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-or-later"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \
@@ -94,6 +91,7 @@ PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}
PACKAGESPLITFUNCS_prepend = " split_dynamic_packages "
PACKAGESPLITFUNCS_append = " set_dynamic_metapkg_rdepends "
+PACKAGESPLITFUNCS_append = " fixup_dynamic_pkg_licenses "
SPA_SUBDIR = "spa-0.2"
PW_MODULE_SUBDIR = "pipewire-0.3"
@@ -109,6 +107,26 @@ remove_unused_installed_files() {
do_install[postfuncs] += "remove_unused_installed_files"
+python fixup_dynamic_pkg_licenses () {
+ #dynamic packages inherit currently whatever is specified in LICENSE (thus multiple)
+ packages = (d.getVar('PACKAGES') or "").split()
+
+ for pkg in packages:
+ # we manually assign the LICENSES here to cover all packages (even dynamically created ones)
+ d.setVar("LICENSE_" + pkg ,"MIT")
+
+ # next handle special cases
+ # ==> LICENSE_${PN}-spa-plugins-alsa = "LGPL-2.1-or-later"
+ if "pipewire-spa-plugins-alsa" in pkg:
+ d.setVar("LICENSE_pipewire-spa-plugins-alsa", "LGPL-2.1-or-later")
+ # ==> LICENSE_${PN}-alsa-card-profile = "LGPL-2.1-or-later"
+ if "pipewire-alsa-card-profile" in pkg:
+ d.setVar("LICENSE_pipewire-alsa-card-profile", "LGPL-2.1-or-later")
+ # ==> LICENSE_${PN}-jack = "GPL-2.0-only"
+ if "pipewire-jack" in pkg:
+ d.setVar("LICENSE_pipewire-jack", "GPL-2.0-only")
+}
+
python split_dynamic_packages () {
# Create packages for each SPA plugin. These plugins are located
# in individual subdirectories, so a recursive search is needed.