PKGBUILDs/extra/gst-plugins-bad/PKGBUILD

149 lines
5 KiB
Bash
Raw Normal View History

2020-09-26 00:42:31 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove makedepend and package depend on svt-hevc
2020-09-26 01:02:48 +00:00
# - meson with -D svthevcenc=disabled
2020-09-26 00:42:31 +00:00
pkgbase=gst-plugins-bad
2021-01-05 18:16:12 +00:00
pkgname=(gst-plugins-bad-libs gst-plugins-bad gst-plugin-opencv gst-plugin-wpe)
2021-09-16 19:06:34 +00:00
pkgver=1.18.5
2022-01-19 13:55:48 +00:00
pkgrel=5
2020-09-26 00:42:31 +00:00
pkgdesc="Multimedia graph framework - bad plugins"
url="https://gstreamer.freedesktop.org/"
arch=(x86_64)
license=(LGPL)
depends=(gst-plugins-base-libs orc libdrm libx11 libgudev libusb libvdpau
libxkbcommon-x11)
makedepends=(mjpegtools curl chromaprint libmms faad2 libdca libdvdnav
libmodplug libgme nettle libkate wayland libofa openjpeg2 libwebp
libsrtp sbc rtmpdump libexif libdvdread wildmidi ladspa openal
vulkan-icd-loader libfdk-aac faac soundtouch spandsp neon
webrtc-audio-processing libdc1394 libmpcdec zvbi openexr libbs2b
libnice lcms2 bluez-libs glu srt aom x265 liblrdf libde265 zbar
librsvg fluidsynth lilv lv2 gst-plugins-good python git
gobject-introspection vulkan-headers vulkan-validation-layers
wayland-protocols gtk3 meson shaderc libavtp libmicrodns
2021-01-05 18:16:12 +00:00
zxing-cpp opencv libva wpewebkit)
2020-09-26 00:42:31 +00:00
checkdepends=(xorg-server-xvfb)
options=(!emptydirs)
2021-09-16 19:06:34 +00:00
_commit=d3af58d5b31941caa26c3ded85d7a7b84a91f0cc # tags/1.18.5^0
2021-10-15 12:55:07 +00:00
source=("git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git#commit=$_commit"
2021-11-04 00:25:15 +00:00
1267.patch wpe-1.1.diff)
2021-10-15 12:55:07 +00:00
sha256sums=('SKIP'
2021-11-04 00:25:15 +00:00
'6b44a256d1ce3ed788d689a9abc5d8a2c4f992ce3c6c60f7a1efb4aa5cc3deb1'
'841988d7dffaf98adeff046cfeed97505a66d268c156361ac29c2b7a112cf984')
2020-09-26 00:42:31 +00:00
pkgver() {
cd $pkgbase
git describe --tags | sed 's/-/+/g'
}
prepare() {
cd $pkgbase
2021-11-04 00:25:15 +00:00
2022-01-19 13:55:48 +00:00
# zxing-cpp 1.1.1
git cherry-pick -n 451c875d40a92ade05389cb62ef885eefd29be4a
2021-11-04 00:25:15 +00:00
# Neon 0.32.x
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1267
patch -Np3 -i ../1267.patch
# wpe-webkit-1.1 (libsoup3)
patch -Np1 -i ../wpe-1.1.diff
2020-09-26 00:42:31 +00:00
}
build() {
arch-meson $pkgbase build \
-D directfb=disabled \
-D doc=disabled \
-D flite=disabled \
-D gsm=disabled \
-D iqa=disabled \
-D magicleap=disabled \
-D msdk=disabled \
-D openh264=disabled \
-D openmpt=disabled \
-D openni2=disabled \
-D opensles=disabled \
2020-09-26 01:02:48 +00:00
-D svthevcenc=disabled \
2020-09-26 00:42:31 +00:00
-D tinyalsa=disabled \
-D voaacenc=disabled \
-D voamrwbenc=disabled \
-D wasapi2=disabled \
-D wasapi=disabled \
-D gobject-cast-checks=disabled \
-D package-name="GStreamer Bad Plugins (Arch Linux)" \
-D package-origin="https://www.archlinux.org/"
meson compile -C build
}
check() (
mkdir -p -m 700 "${XDG_RUNTIME_DIR:=$PWD/runtime-dir}"
export XDG_RUNTIME_DIR
2021-09-16 19:06:34 +00:00
xvfb-run -s '-nolisten local' \
2022-01-19 13:55:48 +00:00
meson test -C build --print-errorlogs
2020-09-26 00:42:31 +00:00
)
package_gst-plugins-bad-libs() {
pkgdesc="${pkgdesc% plugins}"
provides=("gst-transcoder=$pkgver")
conflicts=("gst-transcoder<1.18.0")
replaces=("gst-transcoder<1.18.0")
2021-09-16 19:06:34 +00:00
meson install -C build --destdir "$pkgdir"
2020-09-26 00:42:31 +00:00
mkdir -p ext/lib/gstreamer-1.0
for _x in aom assrender bs2b bz2 chromaprint closedcaption colormanagement \
curl dc1394 de265 dtls dtsdec faac faad fdkaac fluidsynthmidi gme \
hls kate ladspa lv2 mms modplug mpeg2enc mplex musepack \
neonhttpsrc ofa openal openexr openjpeg opusparse resindvd rsvg \
rtmp sbc sctp smoothstreaming sndfile soundtouch spandsp srt srtp \
teletext ttmlsubs vulkan waylandsink webp webrtc webrtcdsp \
2020-09-26 01:02:48 +00:00
wildmidi x265 zbar va avtp zxing microdns; do
2020-09-26 00:42:31 +00:00
_x="lib/gstreamer-1.0/libgst${_x}.so"
mv "$pkgdir/usr/$_x" "ext/$_x"
done
mkdir -p opencv/{lib,include/gstreamer-1.0/gst}
mv -t opencv/lib "$pkgdir"/usr/lib/*opencv*
mv -t opencv/include/gstreamer-1.0/gst \
"$pkgdir"/usr/include/gstreamer-1.0/gst/opencv
2021-01-05 18:16:12 +00:00
for _x in opencv wpe; do
2020-09-26 00:42:31 +00:00
mkdir -p "$_x/lib/gstreamer-1.0"
_f="lib/gstreamer-1.0/libgst${_x}.so"
mv "$pkgdir/usr/$_f" "$_x/$_f"
done
}
package_gst-plugins-bad() {
depends=("gst-plugins-bad-libs=$pkgver" gst-plugins-good
aom libass libbs2b bzip2 chromaprint pango lcms2 curl libxml2
libdc1394 libde265 openssl libdca faac faad2 libfdk-aac fluidsynth
libgme nettle libkate liblrdf lilv libmms libmodplug mjpegtools
libmpcdec neon libofa openal openexr openjpeg2 opus libdvdnav
libdvdread librsvg rtmpdump sbc libsndfile soundtouch spandsp srt
libsrtp zvbi vulkan-icd-loader libxcb wayland libwebp libnice
webrtc-audio-processing wildmidi x265 zbar libavtp
libmicrodns zxing-cpp libva)
2020-12-07 01:05:32 +00:00
optdepends=('nvidia-utils: nvcodec plugin')
2020-09-26 00:42:31 +00:00
mv ext "$pkgdir/usr"
}
package_gst-plugin-opencv() {
pkgdesc="${pkgdesc%-*}- opencv plugin"
depends=(gst-plugins-base-libs opencv)
mv opencv "$pkgdir/usr"
}
2021-01-05 18:16:12 +00:00
package_gst-plugin-wpe() {
pkgdesc="${pkgdesc%-*}- wpe plugin"
depends=(gst-plugins-base-libs wpewebkit)
mv wpe "$pkgdir/usr"
}