Skip to contentSkip to conversation

gst-examples,gstreamer1.0-libav: Add option to exclude from world build

PATCH In review Khem Raj 2 participants 2 messages Mar 26, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gst-examples,gstreamer1.0-libav: Add option to exclude from world build

When LICENSE_FLAGS_WHITELIST does not have commercial in it then the the dependencies like ffmpeg will become invisible and render these packages unbuildable, therefore world build will report parse issues

its better to exclude them from world build in such cases

---
 meta/recipes-multimedia/gstreamer/gst-examples_1.18.4.bb       | 2 ++
 meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb | 3 +++
 2 files changed, 5 insertions(+)
meta/recipes-multimedia/gstreamer/gst-examples_1.18.4.bb +2 -0
index 4670ab34db..196258e00f 100644
@@ -33,3 +33,5 @@ RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
                       ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
                      ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
 RPROVIDES_${PN} += "gst-player gst-player-bin"
+
+EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "0", "1", d)}"
meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb +3 -0
index 6a84f92f31..7c39e7da37 100644
@@ -6,6 +6,7 @@ SECTION = "multimedia"
 
 # ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
 LICENSE_FLAGS = "commercial"
+
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
                     file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
@@ -22,3 +23,5 @@ inherit meson pkgconfig upstream-version-is-even
 
 FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
 FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "0", "1", d)}"
Signature · 1 line
2.31.0
#1 lore raw

Hi Khem,

Quoted 29 lines · Khem Raj

When LICENSE_FLAGS_WHITELIST does not have commercial in it then the the dependencies like ffmpeg will become invisible and render these packages unbuildable, therefore world build will report parse issues

its better to exclude them from world build in such cases

---
 meta/recipes-multimedia/gstreamer/gst-examples_1.18.4.bb       | 2 ++
 meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb | 3 +++
 2 files changed, 5 insertions(+)
meta/recipes-multimedia/gstreamer/gst-examples_1.18.4.bb +2 -0
index 4670ab34db..196258e00f 100644
@@ -33,3 +33,5 @@ RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
                       ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
                      ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
 RPROVIDES_${PN} += "gst-player gst-player-bin"
+
+EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "0", "1", d)}"
meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb +0 -0
index 6a84f92f31..7c39e7da37 100644

meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb SECTION = "multimedia" · line 9

Quoted 4 lines
meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb +1 -0
@@ -6,6 +6,7 @@ SECTION = "multimedia"
 
 # ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
 LICENSE_FLAGS = "commercial"
+

The LICENSE_FLAGS can then be dropped here, right ?

Quoted 12 lines
meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.4.bb +2 -1
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
                     file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
@@ -22,3 +23,5 @@ inherit meson pkgconfig upstream-version-is-even
 
 FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
 FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "0", "1", d)}"
--

2.31.0

Signature · 2 lines
Yann Dirson <[email protected]>
Blade / Shadow -- http://shadow.tech