diff options
author | Carlos Rafael Giani <crg7475@mailbox.org> | 2020-01-12 14:59:43 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-16 22:33:08 +0000 |
commit | 01c1f63bdb779fe33df4b4409792f393eeee7cf9 (patch) | |
tree | f29f23b2fdfd3545298639c8d3403fd1c241a274 /meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc | |
parent | 31e5bc2b586c51ad3b9fdb79af8b549d8d7ce743 (diff) | |
download | poky-01c1f63bdb779fe33df4b4409792f393eeee7cf9.tar.gz |
gstreamer: Add common .inc files for meson based recipes
* gstreamer1.0-plugins-common.inc
The old gstreamer1.0-plugins.inc file, adapted for meson
* gstreamer1.0-plugins-packaging.inc
The old gst-plugins-package.inc file, adapted for meson
* gstreamer1.0-ptest.inc
Common code for meson based PTest support; autogenerates the run-ptest
file and is designed to use the gnome-desktop-testing suite runner
(which is why the .inc files inherits from ptest-gnome)
(From OE-Core rev: 075aa7a617d38d6a698cee97dcb7550e72741eb5)
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc')
-rw-r--r-- | meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc new file mode 100644 index 0000000000..9a7a1b6afe --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc | |||
@@ -0,0 +1,70 @@ | |||
1 | # This .inc file contains functionality for automatically splitting | ||
2 | # built plugins into individual packages for each plugin. A -meta | ||
3 | # package is also set up that has no files of its own, but contains | ||
4 | # the names of all plugin packages in its RDEPENDS list. | ||
5 | # | ||
6 | # This is mainly used by the gstreamer1.0-plugins-* plugin set recipes, | ||
7 | # but can be used in any recipe that produces GStreamer plugins. | ||
8 | |||
9 | PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " | ||
10 | PACKAGESPLITFUNCS_append = " set_gstreamer10_metapkg_rdepends " | ||
11 | |||
12 | python split_gstreamer10_packages () { | ||
13 | gst_libdir = d.expand('${libdir}/gstreamer-1.0') | ||
14 | postinst = d.getVar('plugin_postinst') | ||
15 | glibdir = d.getVar('libdir') | ||
16 | |||
17 | # GStreamer libraries | ||
18 | do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True) | ||
19 | # GStreamer plugin shared objects | ||
20 | do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='') | ||
21 | # GObject introspection files for GStreamer plugins | ||
22 | do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer 1.0 typelib file for %s', postinst=postinst, extra_depends='') | ||
23 | # Static GStreamer libraries for development | ||
24 | do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer 1.0 plugin for %s (static development files)', extra_depends='${PN}-staticdev') | ||
25 | } | ||
26 | |||
27 | python set_gstreamer10_metapkg_rdepends () { | ||
28 | import os | ||
29 | import oe.utils | ||
30 | |||
31 | # Go through all generated packages (excluding the main package and | ||
32 | # the -meta package itself) and add them to the -meta package as RDEPENDS. | ||
33 | |||
34 | pn = d.getVar('PN') | ||
35 | metapkg = pn + '-meta' | ||
36 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | ||
37 | d.setVar('FILES_' + metapkg, "") | ||
38 | blacklist = [ pn, pn + '-meta' ] | ||
39 | metapkg_rdepends = [] | ||
40 | pkgdest = d.getVar('PKGDEST') | ||
41 | for pkg in oe.utils.packages_filter_out_system(d): | ||
42 | if pkg not in blacklist and pkg not in metapkg_rdepends: | ||
43 | # See if the package is empty by looking at the contents of its PKGDEST subdirectory. | ||
44 | # If this subdirectory is empty, then the package is. | ||
45 | # Empty packages do not get added to the meta package's RDEPENDS | ||
46 | pkgdir = os.path.join(pkgdest, pkg) | ||
47 | if os.path.exists(pkgdir): | ||
48 | dir_contents = os.listdir(pkgdir) or [] | ||
49 | else: | ||
50 | dir_contents = [] | ||
51 | is_empty = len(dir_contents) == 0 | ||
52 | if not is_empty: | ||
53 | metapkg_rdepends.append(pkg) | ||
54 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | ||
55 | d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') | ||
56 | } | ||
57 | |||
58 | # each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev | ||
59 | # so we need them even when empty (like in gst-plugins-good case) | ||
60 | ALLOW_EMPTY_${PN} = "1" | ||
61 | ALLOW_EMPTY_${PN}-dev = "1" | ||
62 | ALLOW_EMPTY_${PN}-staticdev = "1" | ||
63 | |||
64 | PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" | ||
65 | |||
66 | FILES_${PN} = "" | ||
67 | FILES_${PN}-apps = "${bindir}" | ||
68 | FILES_${PN}-glib = "${datadir}/glib-2.0" | ||
69 | |||
70 | RRECOMMENDS_${PN} += "${PN}-meta" | ||