Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | # This .inc file contains functionality for automatically setting |
| 2 | # the the license of all plugins according to the GSTREAMER_GPL. |
| 3 | |
| 4 | PACKAGESPLITFUNCS:append = " set_gstreamer_license " |
| 5 | |
| 6 | python set_gstreamer_license () { |
| 7 | import oe.utils |
| 8 | pn = d.getVar('PN') + '-' |
| 9 | gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()] |
| 10 | for pkg in oe.utils.packages_filter_out_system(d): |
| 11 | if pkg in gpl_plugins_names: |
| 12 | d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later') |
| 13 | else: |
| 14 | d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later') |
| 15 | } |
| 16 | |
| 17 | EXTRA_OEMESON += " \ |
| 18 | ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \ |
| 19 | " |