summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-08-24 10:55:53 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-09-15 10:40:12 +0530
commitceb6534a6b5a4f8e9b67e8efd9ac5b5b5e16ff1a (patch)
tree3297e83e84d59219c94b7063d207a2172a29fe19
parent65c81d7c4dd0c7b88c8eb70da6a03c7c5410ed0d (diff)
Add gst-plugins-rs.recipe
Plugins are also packaged when the variant is enabled. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/915>
-rw-r--r--cerbero/build/recipe.py2
-rw-r--r--packages/gstreamer-1.0-capture.package5
-rw-r--r--packages/gstreamer-1.0-codecs-gpl.package7
-rw-r--r--packages/gstreamer-1.0-codecs-restricted.package4
-rw-r--r--packages/gstreamer-1.0-codecs.package4
-rw-r--r--packages/gstreamer-1.0-core.package5
-rw-r--r--packages/gstreamer-1.0-dvd.package4
-rw-r--r--packages/gstreamer-1.0-effects.package4
-rw-r--r--packages/gstreamer-1.0-encoding.package4
-rw-r--r--packages/gstreamer-1.0-net-restricted.package4
-rw-r--r--packages/gstreamer-1.0-net.package4
-rw-r--r--packages/gstreamer-1.0-playback.package5
-rw-r--r--packages/gstreamer-1.0-system.package4
-rw-r--r--packages/gstreamer-1.0-visualizers.package5
-rw-r--r--recipes/gst-plugins-rs.recipe121
15 files changed, 179 insertions, 3 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py
index a54a1413..eae7c6ec 100644
--- a/cerbero/build/recipe.py
+++ b/cerbero/build/recipe.py
@@ -652,7 +652,7 @@ SOFTWARE LICENSE COMPLIANCE.\n\n'''
Runs post installation steps
'''
self.fixup_pc_files()
- if self.btype == build.BuildType.MESON and self.name.startswith('gst'):
+ if self.name.startswith('gst'):
self.generate_gst_la_files()
self.install_licenses()
diff --git a/packages/gstreamer-1.0-capture.package b/packages/gstreamer-1.0-capture.package
index afc2bf4f..f829fa01 100644
--- a/packages/gstreamer-1.0-capture.package
+++ b/packages/gstreamer-1.0-capture.package
@@ -18,3 +18,8 @@ class Package(custom.GStreamer, package.Package):
'gst-plugins-good-1.0:plugins_capture_devel',
'gst-plugins-ugly-1.0:plugins_capture_devel',
'gst-plugins-bad-1.0:plugins_capture_devel']
+
+ def prepare(self):
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_capture')
+ self.files_devel.append('gst-plugins-rs:plugins_capture_devel')
diff --git a/packages/gstreamer-1.0-codecs-gpl.package b/packages/gstreamer-1.0-codecs-gpl.package
index 3c4f0946..48c12058 100644
--- a/packages/gstreamer-1.0-codecs-gpl.package
+++ b/packages/gstreamer-1.0-codecs-gpl.package
@@ -17,14 +17,17 @@ class Package(custom.GStreamer, package.Package):
'gst-plugins-ugly-1.0:plugins_codecs_gpl']
files_devel = ['gst-plugins-base-1.0:plugins_codecs_gpl_devel',
'gst-plugins-good-1.0:plugins_codecs_gpl_devel',
- 'gst-plugins-bad-1.0:plugins_codecs_gpl_devel',
- 'gst-plugins-ugly-1.0:plugins_codecs_gpl_devel']
+ 'gst-plugins-bad-1.0:plugins_codecs_gpl_devel']
def prepare(self):
if self.config.target_platform in (Platform.WINDOWS, Platform.ANDROID):
# Needed by libass
self.files.append('libiconv:libs')
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_codecs_gpl')
+ self.files_devel.append('gst-plugins-rs:plugins_codecs_gpl_devel')
+
if self.config.variants.uwp:
self.files.remove('libass:libs')
self.files.remove('libiconv:libs')
diff --git a/packages/gstreamer-1.0-codecs-restricted.package b/packages/gstreamer-1.0-codecs-restricted.package
index a39a65ad..58556ff8 100644
--- a/packages/gstreamer-1.0-codecs-restricted.package
+++ b/packages/gstreamer-1.0-codecs-restricted.package
@@ -22,6 +22,10 @@ class Package(custom.GStreamer, package.Package):
if self.config.platform == Platform.WINDOWS:
self.files.remove('a52dec:libs')
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_codecs_restricted')
+ self.files_devel.append('gst-plugins-rs:plugins_restricted_devel')
+
if self.config.variants.uwp:
self.files = [
'gst-plugins-ugly-1.0:plugins_codecs_restricted',
diff --git a/packages/gstreamer-1.0-codecs.package b/packages/gstreamer-1.0-codecs.package
index 0781454f..00e89397 100644
--- a/packages/gstreamer-1.0-codecs.package
+++ b/packages/gstreamer-1.0-codecs.package
@@ -45,6 +45,10 @@ class Package(custom.GStreamer, package.Package):
# Needed by zbar library
self.files.append('libiconv:libs')
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_codecs')
+ self.files_devel.append('gst-plugins-rs:plugins_codecs_devel')
+
if self.config.variants.uwp:
self.files = [
'libvpx:libs', 'openh264:libs', 'opus:libs',
diff --git a/packages/gstreamer-1.0-core.package b/packages/gstreamer-1.0-core.package
index 55b91531..10a0b12d 100644
--- a/packages/gstreamer-1.0-core.package
+++ b/packages/gstreamer-1.0-core.package
@@ -32,5 +32,10 @@ class Package(custom.GStreamer, package.Package):
# will likely only use it from inside Visual Studio.
if not self.config.variants.uwp:
self.platform_files[Platform.WINDOWS].append('pkg-config')
+
if self.config.variants.unwind:
self.files.append('libunwind:libs')
+
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_core')
+ self.files_devel.append('gst-plugins-rs:plugins_core_devel')
diff --git a/packages/gstreamer-1.0-dvd.package b/packages/gstreamer-1.0-dvd.package
index 649af673..9c8a04fb 100644
--- a/packages/gstreamer-1.0-dvd.package
+++ b/packages/gstreamer-1.0-dvd.package
@@ -25,3 +25,7 @@ class Package(custom.GStreamer, package.Package):
if self.config.platform == Platform.WINDOWS:
self.files.remove('libdvdnav:libs')
self.files.remove('libdvdread:libs')
+
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_dvd')
+ self.files_devel.append('gst-plugins-rs:plugins_dvd_devel')
diff --git a/packages/gstreamer-1.0-effects.package b/packages/gstreamer-1.0-effects.package
index ea771b8d..b105d359 100644
--- a/packages/gstreamer-1.0-effects.package
+++ b/packages/gstreamer-1.0-effects.package
@@ -26,3 +26,7 @@ class Package(custom.GStreamer, package.Package):
self.files += ['soundtouch:libs', 'webrtc-audio-processing:libs']
if self.config.variants.uwp:
self.files.remove('ladspa:libs')
+
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_effects')
+ self.files_devel.append('gst-plugins-rs:plugins_effects_devel')
diff --git a/packages/gstreamer-1.0-encoding.package b/packages/gstreamer-1.0-encoding.package
index a463ba7b..bb7f6d5c 100644
--- a/packages/gstreamer-1.0-encoding.package
+++ b/packages/gstreamer-1.0-encoding.package
@@ -19,3 +19,7 @@ class Package(custom.GStreamer, package.Package):
'gst-plugins-ugly-1.0:plugins_encoding_devel',
'gst-plugins-bad-1.0:plugins_encoding_devel']
+ def prepare(self):
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_encoding')
+ self.files_devel.append('gst-plugins-rs:plugins_encoding_devel')
diff --git a/packages/gstreamer-1.0-net-restricted.package b/packages/gstreamer-1.0-net-restricted.package
index 967ad4b4..e6a6ccc0 100644
--- a/packages/gstreamer-1.0-net-restricted.package
+++ b/packages/gstreamer-1.0-net-restricted.package
@@ -20,3 +20,7 @@ class Package(custom.GStreamer, package.Package):
def prepare(self):
if self.config.variants.uwp:
self.files.remove('librtmp:libs')
+
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_net_restricted')
+ self.files_devel.append('gst-plugins-rs:plugins_net_restricted_devel')
diff --git a/packages/gstreamer-1.0-net.package b/packages/gstreamer-1.0-net.package
index ead91c82..b342adb1 100644
--- a/packages/gstreamer-1.0-net.package
+++ b/packages/gstreamer-1.0-net.package
@@ -32,6 +32,10 @@ class Package(custom.GStreamer, package.Package):
elif self.config.target_platform == Platform.LINUX:
self.sys_deps = {self.config.target_distro_version: ['glib-networking']}
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_net')
+ self.files_devel.append('gst-plugins-rs:plugins_net_devel')
+
if self.config.variants.uwp:
self.files = [
'glib-networking', 'libsrtp:libs',
diff --git a/packages/gstreamer-1.0-playback.package b/packages/gstreamer-1.0-playback.package
index 64aaacce..06103eda 100644
--- a/packages/gstreamer-1.0-playback.package
+++ b/packages/gstreamer-1.0-playback.package
@@ -18,3 +18,8 @@ class Package(custom.GStreamer, package.Package):
'gst-plugins-good-1.0:plugins_playback_devel',
'gst-plugins-ugly-1.0:plugins_playback_devel',
'gst-plugins-bad-1.0:plugins_playback_devel']
+
+ def prepare(self):
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_playback')
+ self.files_devel.append('gst-plugins-rs:plugins_playback_devel')
diff --git a/packages/gstreamer-1.0-system.package b/packages/gstreamer-1.0-system.package
index 912207fe..c611b913 100644
--- a/packages/gstreamer-1.0-system.package
+++ b/packages/gstreamer-1.0-system.package
@@ -32,3 +32,7 @@ class Package(custom.GStreamer, package.Package):
if self.config.target_arch in (Architecture.X86, Architecture.X86_64, Architecture.ARM64, Architecture.UNIVERSAL):
self.files.append('angle-uwp:libs')
self.files_devel.append('angle-uwp:headers')
+
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_sys')
+ self.files_devel.append('gst-plugins-rs:plugins_sys_devel')
diff --git a/packages/gstreamer-1.0-visualizers.package b/packages/gstreamer-1.0-visualizers.package
index 872ed6d8..15491137 100644
--- a/packages/gstreamer-1.0-visualizers.package
+++ b/packages/gstreamer-1.0-visualizers.package
@@ -16,3 +16,8 @@ class Package(custom.GStreamer, package.Package):
'gst-plugins-good-1.0:plugins_vis_devel',
'gst-plugins-ugly-1.0:plugins_vis_devel',
'gst-plugins-bad-1.0:plugins_vis_devel']
+
+ def prepare(self):
+ if self.config.variants.rust:
+ self.files.append('gst-plugins-rs:plugins_vis')
+ self.files_devel.append('gst-plugins-rs:plugins_vis_devel')
diff --git a/recipes/gst-plugins-rs.recipe b/recipes/gst-plugins-rs.recipe
new file mode 100644
index 00000000..4b639b26
--- /dev/null
+++ b/recipes/gst-plugins-rs.recipe
@@ -0,0 +1,121 @@
+# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+
+class Recipe(recipe.Recipe):
+ name = 'gst-plugins-rs'
+ version = '0.8.4.9999'
+ stype = SourceType.GIT
+ remotes = {'origin': 'https://gitlab.freedesktop.org/gstreamer/%(name)s.git'}
+ commit = 'origin/main'
+ # Each plugin uses one or more of these licenses.
+ licenses = [{
+ License.Apachev2: ['LICENSE-APACHE'],
+ License.MIT: ['LICENSE-MIT'],
+ License.LGPLv2_1Plus: None,
+ }]
+
+ btype = BuildType.CARGO_C
+ cargoc_packages = ['audiofx', 'aws', 'cdg', 'claxon', 'closedcaption',
+ 'fallbackswitch', 'ffv1', 'file', 'flavors', 'gif', 'hsv', 'json',
+ 'lewton', 'rav1e', 'regex', 'reqwest', 'rspng', 'rtpav1', 'textahead',
+ 'textwrap', 'threadshare', 'togglerecord', 'uriplaylistbin',
+ 'webrtchttp']
+
+ # Needed for openssl
+ use_system_libs = True
+ deps = ['gstreamer-1.0', 'gst-plugins-base-1.0', 'pango', 'cairo',
+ 'gst-plugins-bad-1.0']
+
+ files_plugins_core = [
+ 'lib/gstreamer-1.0/libgstfallbackswitch%(mext)s',
+ 'lib/gstreamer-1.0/libgstrsfile%(mext)s',
+ 'lib/gstreamer-1.0/libgstthreadshare%(mext)s',
+ 'lib/gstreamer-1.0/libgsttogglerecord%(mext)s',
+ ]
+
+ files_plugins_core_devel = [
+ 'lib/gstreamer-1.0/libgstfallbackswitch.a', 'lib/gstreamer-1.0/libgstfallbackswitch.la',
+ 'lib/gstreamer-1.0/libgstrsfile.a', 'lib/gstreamer-1.0/libgstrsfile.la',
+ 'lib/gstreamer-1.0/libgstthreadshare.a', 'lib/gstreamer-1.0/libgstthreadshare.la',
+ 'lib/gstreamer-1.0/libgsttogglerecord.a', 'lib/gstreamer-1.0/libgsttogglerecord.la',
+ ]
+
+ files_plugins_net = [
+ 'lib/gstreamer-1.0/libgstaws%(mext)s',
+ 'lib/gstreamer-1.0/libgstrtpav1%(mext)s',
+ 'lib/gstreamer-1.0/libgstreqwest%(mext)s',
+ 'lib/gstreamer-1.0/libgstwebrtchttp%(mext)s',
+ ]
+
+ files_plugins_net_devel = [
+ 'lib/gstreamer-1.0/libgstaws.a', 'lib/gstreamer-1.0/libgstaws.la',
+ 'lib/gstreamer-1.0/libgstrtpav1.a', 'lib/gstreamer-1.0/libgstrtpav1.la',
+ 'lib/gstreamer-1.0/libgstreqwest.a', 'lib/gstreamer-1.0/libgstreqwest.la',
+ 'lib/gstreamer-1.0/libgstwebrtchttp.a', 'lib/gstreamer-1.0/libgstwebrtchttp.la',
+ ]
+
+ files_plugins_effects = [
+ 'lib/gstreamer-1.0/libgstrsaudiofx%(mext)s',
+ ]
+
+ files_plugins_effects_devel = [
+ 'lib/gstreamer-1.0/libgstrsaudiofx.a', 'lib/gstreamer-1.0/libgstrsaudiofx.la',
+ ]
+
+ files_plugins_codecs = [
+ 'lib/gstreamer-1.0/libgstcdg%(mext)s',
+ 'lib/gstreamer-1.0/libgstclaxon%(mext)s',
+ 'lib/gstreamer-1.0/libgstrsclosedcaption%(mext)s',
+ 'lib/gstreamer-1.0/libgstffv1%(mext)s',
+ 'lib/gstreamer-1.0/libgstgif%(mext)s',
+ 'lib/gstreamer-1.0/libgsthsv%(mext)s',
+ 'lib/gstreamer-1.0/libgstlewton%(mext)s',
+ 'lib/gstreamer-1.0/libgstrav1e%(mext)s',
+ 'lib/gstreamer-1.0/libgstrsflv%(mext)s',
+ 'lib/gstreamer-1.0/libgstrsjson%(mext)s',
+ 'lib/gstreamer-1.0/libgstrspng%(mext)s',
+ 'lib/gstreamer-1.0/libgstrsregex%(mext)s',
+ 'lib/gstreamer-1.0/libgstrstextwrap%(mext)s',
+ 'lib/gstreamer-1.0/libgsttextahead%(mext)s',
+ ]
+
+ files_plugins_codecs_devel = [
+ 'lib/gstreamer-1.0/libgstcdg.a', 'lib/gstreamer-1.0/libgstcdg.la',
+ 'lib/gstreamer-1.0/libgstclaxon.a', 'lib/gstreamer-1.0/libgstclaxon.la',
+ 'lib/gstreamer-1.0/libgstrsclosedcaption.a', 'lib/gstreamer-1.0/libgstrsclosedcaption.la',
+ 'lib/gstreamer-1.0/libgstffv1.a', 'lib/gstreamer-1.0/libgstffv1.la',
+ 'lib/gstreamer-1.0/libgstgif.a', 'lib/gstreamer-1.0/libgstgif.la',
+ 'lib/gstreamer-1.0/libgsthsv.a', 'lib/gstreamer-1.0/libgsthsv.la',
+ 'lib/gstreamer-1.0/libgstlewton.a', 'lib/gstreamer-1.0/libgstlewton.la',
+ 'lib/gstreamer-1.0/libgstrav1e.a', 'lib/gstreamer-1.0/libgstrav1e.la',
+ 'lib/gstreamer-1.0/libgstrsflv.a', 'lib/gstreamer-1.0/libgstrsflv.la',
+ 'lib/gstreamer-1.0/libgstrsjson.a', 'lib/gstreamer-1.0/libgstrsjson.la',
+ 'lib/gstreamer-1.0/libgstrspng.a', 'lib/gstreamer-1.0/libgstrspng.la',
+ 'lib/gstreamer-1.0/libgstrsregex.a', 'lib/gstreamer-1.0/libgstrsregex.la',
+ 'lib/gstreamer-1.0/libgstrstextwrap.a', 'lib/gstreamer-1.0/libgstrstextwrap.la',
+ 'lib/gstreamer-1.0/libgsttextahead.a', 'lib/gstreamer-1.0/libgsttextahead.la',
+ ]
+
+ files_plugins_playback = [
+ 'lib/gstreamer-1.0/libgsturiplaylistbin%(mext)s',
+ ]
+
+ files_plugins_playback_devel = [
+ 'lib/gstreamer-1.0/libgsturiplaylistbin.a', 'lib/gstreamer-1.0/libgsturiplaylistbin.la',
+ ]
+
+ def prepare(self):
+ if self.config.target_platform != Platform.LINUX or self.config.cross_compiling():
+ self.deps.append('openssl')
+ self.cargoc_packages = [f'gst-plugin-{pkg}' for pkg in self.cargoc_packages]
+
+ def post_install(self):
+ # Cargo-C currently can't install pc files into custom dirs, so we need
+ # to move these plugin pkgconfig files to the right place.
+ for f in self.files_list_by_category(self.DEVEL_CAT):
+ if not f.endswith('.pc') or not 'gstreamer-1.0' in f:
+ continue
+ name = os.path.basename(f)
+ src = os.path.join(self.config.prefix, 'lib', 'pkgconfig', name)
+ dst = os.path.join(self.config.prefix, f)
+ os.replace(src, dst)
+ super().post_install()