summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire
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-08-25 12:50:36 +0000
commitab3c458cb39c87efc456762f6dff7c376c52bbce (patch)
tree8b6a2493987b3dbb946a098bf46ff7abe33c96b7 /meta-pipewire/recipes-multimedia/pipewire
parent330d34dc020189984878df86d2f4d9eeef5632e8 (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> [manual cherry-pick of 340e5d4c from master/lamprey] Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ie27a929a35e713c7478cde8b097ea1da51428047 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26571 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account
Diffstat (limited to 'meta-pipewire/recipes-multimedia/pipewire')
-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.