1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
4 pkgbase=gst-plugins-bad
5 pkgname=(gst-plugins-bad-libs gst-plugins-bad gst-plugin-opencv gst-plugin-wpe)
8 pkgdesc="Multimedia graph framework - bad plugins"
9 url="https://gstreamer.freedesktop.org/"
12 depends=(gst-plugins-base-libs orc libdrm libx11 libgudev libusb libvdpau
14 makedepends=(mjpegtools curl chromaprint libmms faad2 libdca libdvdnav
15 libmodplug libgme nettle libkate wayland libofa openjpeg2 libwebp
16 libsrtp sbc rtmpdump libexif libdvdread wildmidi ladspa openal
17 vulkan-icd-loader libfdk-aac faac soundtouch spandsp neon
18 webrtc-audio-processing libdc1394 libmpcdec zvbi openexr libbs2b
19 libnice lcms2 bluez-libs glu srt aom x265 liblrdf libde265 zbar
20 librsvg fluidsynth lilv lv2 gst-plugins-good python git
21 gobject-introspection vulkan-headers vulkan-validation-layers
22 wayland-protocols gtk3 meson shaderc libavtp svt-hevc libmicrodns
23 zxing-cpp opencv libva wpewebkit)
24 checkdepends=(xorg-server-xvfb)
26 _commit=d3af58d5b31941caa26c3ded85d7a7b84a91f0cc # tags/1.18.5^0
27 source=("git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git#commit=$_commit"
28 1267.patch wpe-1.1.diff)
30 '6b44a256d1ce3ed788d689a9abc5d8a2c4f992ce3c6c60f7a1efb4aa5cc3deb1'
31 '841988d7dffaf98adeff046cfeed97505a66d268c156361ac29c2b7a112cf984')
35 git describe --tags | sed 's/-/+/g'
42 git cherry-pick -n 451c875d40a92ade05389cb62ef885eefd29be4a
45 # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1267
46 patch -Np3 -i ../1267.patch
48 # wpe-webkit-1.1 (libsoup3)
49 patch -Np1 -i ../wpe-1.1.diff
53 arch-meson $pkgbase build \
54 -D directfb=disabled \
59 -D magicleap=disabled \
61 -D openh264=disabled \
64 -D opensles=disabled \
65 -D tinyalsa=disabled \
66 -D voaacenc=disabled \
67 -D voamrwbenc=disabled \
70 -D gobject-cast-checks=disabled \
71 -D package-name="GStreamer Bad Plugins (Arch Linux)" \
72 -D package-origin="https://www.archlinux.org/"
73 meson compile -C build
77 mkdir -p -m 700 "${XDG_RUNTIME_DIR:=$PWD/runtime-dir}"
78 export XDG_RUNTIME_DIR
80 xvfb-run -s '-nolisten local' \
81 meson test -C build --print-errorlogs
84 package_gst-plugins-bad-libs() {
85 pkgdesc="${pkgdesc% plugins}"
86 provides=("gst-transcoder=$pkgver")
87 conflicts=("gst-transcoder<1.18.0")
88 replaces=("gst-transcoder<1.18.0")
90 meson install -C build --destdir "$pkgdir"
92 mkdir -p ext/lib/gstreamer-1.0
93 for _x in aom assrender bs2b bz2 chromaprint closedcaption colormanagement \
94 curl dc1394 de265 dtls dtsdec faac faad fdkaac fluidsynthmidi gme \
95 hls kate ladspa lv2 mms modplug mpeg2enc mplex musepack \
96 neonhttpsrc ofa openal openexr openjpeg opusparse resindvd rsvg \
97 rtmp sbc sctp smoothstreaming sndfile soundtouch spandsp srt srtp \
98 teletext ttmlsubs vulkan waylandsink webp webrtc webrtcdsp \
99 wildmidi x265 zbar va svthevcenc avtp zxing microdns; do
100 _x="lib/gstreamer-1.0/libgst${_x}.so"
101 mv "$pkgdir/usr/$_x" "ext/$_x"
104 mkdir -p opencv/{lib,include/gstreamer-1.0/gst}
105 mv -t opencv/lib "$pkgdir"/usr/lib/*opencv*
106 mv -t opencv/include/gstreamer-1.0/gst \
107 "$pkgdir"/usr/include/gstreamer-1.0/gst/opencv
109 for _x in opencv wpe; do
110 mkdir -p "$_x/lib/gstreamer-1.0"
111 _f="lib/gstreamer-1.0/libgst${_x}.so"
112 mv "$pkgdir/usr/$_f" "$_x/$_f"
116 package_gst-plugins-bad() {
117 depends=("gst-plugins-bad-libs=$pkgver" gst-plugins-good
118 aom libass libbs2b bzip2 chromaprint pango lcms2 curl libxml2
119 libdc1394 libde265 openssl libdca faac faad2 libfdk-aac fluidsynth
120 libgme nettle libkate liblrdf lilv libmms libmodplug mjpegtools
121 libmpcdec neon libofa openal openexr openjpeg2 opus libdvdnav
122 libdvdread librsvg rtmpdump sbc libsndfile soundtouch spandsp srt
123 libsrtp zvbi vulkan-icd-loader libxcb wayland libwebp libnice
124 webrtc-audio-processing wildmidi x265 zbar libavtp svt-hevc
125 libmicrodns zxing-cpp libva)
126 optdepends=('nvidia-utils: nvcodec plugin')
131 package_gst-plugin-opencv() {
132 pkgdesc="${pkgdesc%-*}- opencv plugin"
133 depends=(gst-plugins-base-libs opencv)
135 mv opencv "$pkgdir/usr"
138 package_gst-plugin-wpe() {
139 pkgdesc="${pkgdesc%-*}- wpe plugin"
140 depends=(gst-plugins-base-libs wpewebkit)