summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-09-25 14:33:02 -0300
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-09-26 19:51:17 +0100
commit40ea086d47c6046d469b4926597142fbd607a116 (patch)
treefb2fa791ec7983331e8ef355638f35d64197cefd
parentbc85a068d7efd99c1b069613afd70e23aaff53e8 (diff)
gst-plugins-bad: Add gstqroverlay plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1575>
-rw-r--r--packages/gstreamer-1.0-effects.package2
-rw-r--r--recipes/gst-plugins-bad-1.0.recipe4
-rw-r--r--recipes/qrencode.recipe59
3 files changed, 64 insertions, 1 deletions
diff --git a/packages/gstreamer-1.0-effects.package b/packages/gstreamer-1.0-effects.package
index d9f8a24b..c3c9f0f2 100644
--- a/packages/gstreamer-1.0-effects.package
+++ b/packages/gstreamer-1.0-effects.package
@@ -13,6 +13,8 @@ class Package(custom.GStreamer, package.Package):
files = ['ladspa:libs',
'libltc:libs',
'soundtouch:libs',
+ 'qrencode:libs',
+ 'json-glib:libs',
'webrtc-audio-processing:libs',
'gst-plugins-base-1.0:plugins_effects',
'gst-plugins-good-1.0:plugins_effects',
diff --git a/recipes/gst-plugins-bad-1.0.recipe b/recipes/gst-plugins-bad-1.0.recipe
index 43550e2c..f604b20d 100644
--- a/recipes/gst-plugins-bad-1.0.recipe
+++ b/recipes/gst-plugins-bad-1.0.recipe
@@ -31,6 +31,7 @@ class Recipe(custom.GStreamer):
'ladspa': 'auto', # lrdf is optional
'openh264': 'enabled',
'openjpeg': 'enabled',
+ 'qroverlay': 'enabled',
'opus': 'enabled',
'rtmp': 'enabled',
'rtmp2': 'enabled',
@@ -87,7 +88,7 @@ class Recipe(custom.GStreamer):
'libsrtp', 'libdca', 'libdvdnav', 'libnice',
'soundtouch', 'vo-aacenc', 'librsvg', 'openjpeg',
'pango', 'spandsp', 'webrtc-audio-processing', 'sbc', 'ladspa',
- 'srt', 'zbar', 'libltc']
+ 'srt', 'zbar', 'libltc', 'qrencode', 'json-glib']
use_system_libs = True
files_lang = ['gst-plugins-bad-1.0']
@@ -182,6 +183,7 @@ class Recipe(custom.GStreamer):
'%(libdir)s/gstreamer-1.0/libgstivtc%(mext)s',
'%(libdir)s/gstreamer-1.0/libgstlegacyrawparse%(mext)s',
'%(libdir)s/gstreamer-1.0/libgstproxy%(mext)s',
+ '%(libdir)s/gstreamer-1.0/libgstqroverlay%(mext)s',
'%(libdir)s/gstreamer-1.0/libgstremovesilence%(mext)s',
'%(libdir)s/gstreamer-1.0/libgstsegmentclip%(mext)s',
'%(libdir)s/gstreamer-1.0/libgstsmooth%(mext)s',
diff --git a/recipes/qrencode.recipe b/recipes/qrencode.recipe
new file mode 100644
index 00000000..b87c5b8e
--- /dev/null
+++ b/recipes/qrencode.recipe
@@ -0,0 +1,59 @@
+# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+from cerbero.tools.libtool import LibtoolLibrary
+
+
+class Recipe(recipe.Recipe):
+
+ name = 'qrencode'
+ version = '4.1.1'
+ licenses = [{License.LGPLv2_1Plus: ['COPYING']}]
+ stype = SourceType.TARBALL
+ btype = BuildType.CMAKE
+ library_type = LibraryType.STATIC
+ cmake_generator = 'ninja'
+ can_msvc = True
+ url = 'https://fukuchi.org/works/qrencode/%(name)s-%(version)s.tar.gz'
+ tarball_checksum = 'da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e'
+
+ # WITH_TOOLS needs getopt
+ configure_options = ' -DWITH_TOOLS=OFF -DWITHOUT_PNG=ON '
+
+ files_libs = ['libqrencode']
+ files_devel = ['include/qrencode.h', '%(libdir)s/pkgconfig/libqrencode.pc']
+
+ async def configure(self):
+ if self.config.target_platform == Platform.WINDOWS:
+ system_name = 'Windows'
+ elif self.config.target_platform == Platform.LINUX:
+ system_name = 'Linux'
+ elif self.config.target_platform == Platform.DARWIN:
+ system_name = 'Darwin'
+ elif self.config.target_platform == Platform.IOS:
+ system_name = 'iOS'
+
+ # We always need a toolchain file because CMakeLists.txt requires these values to be set.
+ # The Android NDK provides one, so we use that as-is.
+ # This recipe uses these to decide which cpuinfo implementation to use:
+ # https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3.0.3/CMakeLists.txt#L92
+ if self.config.target_platform == Platform.ANDROID:
+ arch = self.config.target_arch
+ if self.config.target_arch == Architecture.ARMv7:
+ arch = 'armeabi-v7a'
+ elif self.config.target_arch == Architecture.ARM64:
+ arch = 'arm64-v8a'
+ self.configure_options += f" -DCMAKE_TOOLCHAIN_FILE={self.config.env['ANDROID_NDK_HOME']}/build/cmake/android.toolchain.cmake -DANDROID_ABI={arch}"
+ else:
+ with open(f'{self.config_src_dir}/toolchain.cmake', 'w') as f:
+ f.write(f'set(CMAKE_SYSTEM_NAME {system_name})\n')
+ f.write(f'set(CMAKE_SYSTEM_PROCESSOR {self.config.target_arch})\n')
+ self.configure_options += f' -DCMAKE_TOOLCHAIN_FILE={self.config_src_dir}/toolchain.cmake'
+
+ await super().configure()
+
+ def post_install(self):
+ # Meson does not generate la files
+ libtool_la = LibtoolLibrary('libqrencode', None, None, None,
+ self.config.libdir, self.config.target_platform,
+ deps=[])
+ libtool_la.save()
+ super().post_install()