require gstreamer1.0-plugins-common.inc
+require gstreamer1.0-plugins-license.inc
DESCRIPTION = "'Bad' GStreamer plugins and helper libraries "
HOMEPAGE = "https://gstreamer.freedesktop.org/"
PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon"
-# GPL - only built if gpl option is also enabled!
-PACKAGECONFIG[gpl] = "-Dgpl=enabled,-Dgpl=disabled"
+GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}"
+
PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265"
--- /dev/null
+# This .inc file contains functionality for automatically setting
+# the common license of all plugins so we can overwride some of them
+#
+# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes,
+# but can be used in any recipe that produces GStreamer plugins.
+
+PACKAGESPLITFUNCS:append = " set_gstreamer_license "
+
+python set_gstreamer_license () {
+ import oe.utils
+ pn = d.getVar('PN') + '-'
+ gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()]
+ for pkg in oe.utils.packages_filter_out_system(d):
+ if pkg in gpl_plugins_names:
+ d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later')
+ else:
+ d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later')
+}
+
+EXTRA_OEMESON += " \
+ ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \
+ "
+
+LICENSE_FLAGS = " \
+ ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", 'commercial', '', d)} \
+ "
require gstreamer1.0-plugins-common.inc
+require gstreamer1.0-plugins-license.inc
DESCRIPTION = "'Ugly GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
-LICENSE_FLAGS = "commercial"
SRC_URI = " \
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- gpl a52dec mpeg2dec \
+ a52dec mpeg2dec \
"
PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
-# GPL - only built if gpl option is also enabled!
-PACKAGECONFIG[gpl] = "-Dgpl=enabled,-Dgpl=disabled"
+GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'cdio a52dec dvdread mpeg2dec x264', d)}"
+
PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"