PKGBUILD 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # Maintainer (Arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  2. # Contributor (Arch): Jan de Groot <jgc@archlinux.org>
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  5. # Contributor: Márcio Silva <coadde@hyperbola.info>
  6. # Contributor: bill-auger <bill-auger@programmer.net>
  7. # Contributor: David P. <megver83@parabola.nu>
  8. # parabola changes and rationale
  9. # * removed support for non-free faac codec
  10. # * removed nvidia-utils from optdepends
  11. # * adapt pkgdesc variable substitutions in package() functions
  12. # * remove makedepend and package depend on svt-hevc (i686 and armv7h)
  13. # * meson with -D svthevcenc=disabled (i686 and armv7h)
  14. pkgbase=gst-plugins-bad
  15. pkgname=(gst-plugins-bad-libs gst-plugins-bad gst-plugin-opencv gst-plugin-wpe)
  16. pkgver=1.18.3
  17. pkgrel=2
  18. pkgrel+=.parabola1
  19. pkgdesc="Multimedia graph framework - bad plugins"
  20. pkgdesc+=", without nonfree faac support"
  21. url="https://gstreamer.freedesktop.org/"
  22. arch=(x86_64)
  23. arch+=(i686 armv7h)
  24. license=(LGPL)
  25. depends=(gst-plugins-base-libs orc libdrm libx11 libgudev libusb libvdpau
  26. libxkbcommon-x11)
  27. makedepends=(mjpegtools curl chromaprint libmms faad2 libdca libdvdnav
  28. libmodplug libgme nettle libkate wayland libofa openjpeg2 libwebp
  29. libsrtp sbc rtmpdump libexif libdvdread wildmidi ladspa openal
  30. vulkan-icd-loader libfdk-aac soundtouch spandsp neon
  31. webrtc-audio-processing libdc1394 libmpcdec zvbi openexr libbs2b
  32. libnice lcms2 bluez-libs glu srt aom x265 liblrdf libde265 zbar
  33. librsvg fluidsynth lilv lv2 gst-plugins-good python git
  34. gobject-introspection vulkan-headers vulkan-validation-layers
  35. wayland-protocols gtk3 meson shaderc libavtp libmicrodns
  36. zxing-cpp opencv libva wpewebkit)
  37. makedepends_x86_64=(svt-hevc)
  38. checkdepends=(xorg-server-xvfb)
  39. options=(!emptydirs)
  40. _commit=382e373d9be363f1e21b12990a4d12f1ecb6df41 # tags/1.18.3^0
  41. source=("git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git#commit=$_commit")
  42. sha256sums=('SKIP')
  43. pkgver() {
  44. cd $pkgbase
  45. git describe --tags | sed 's/-/+/g'
  46. }
  47. prepare() {
  48. cd $pkgbase
  49. if [ "$CARCH" = armv7h ]; then
  50. git cherry-pick -n 3ea6387f969c0b08027fc959b8b8cd102708bceb # Fix svthevcenc test
  51. git cherry-pick -n 77f28ee3e71d1c5bd8278967963b08b226515dd1 # opencv 4.5
  52. fi
  53. }
  54. build() {
  55. if ! [ "$CARCH" = x86_64 ]; then
  56. disable_svthevc='-D svthevcenc=disabled'
  57. fi
  58. arch-meson $pkgbase build $disable_svthevc \
  59. -D directfb=disabled \
  60. -D faac=disabled \
  61. -D doc=disabled \
  62. -D flite=disabled \
  63. -D gsm=disabled \
  64. -D iqa=disabled \
  65. -D magicleap=disabled \
  66. -D msdk=disabled \
  67. -D openh264=disabled \
  68. -D openmpt=disabled \
  69. -D openni2=disabled \
  70. -D opensles=disabled \
  71. -D tinyalsa=disabled \
  72. -D voaacenc=disabled \
  73. -D voamrwbenc=disabled \
  74. -D wasapi2=disabled \
  75. -D wasapi=disabled \
  76. -D gobject-cast-checks=disabled \
  77. -D package-name="GStreamer Bad Plugins (Parabola GNU/Linux-libre)" \
  78. -D package-origin="https://www.parabola.nu/"
  79. meson compile -C build
  80. }
  81. check() (
  82. mkdir -p -m 700 "${XDG_RUNTIME_DIR:=$PWD/runtime-dir}"
  83. export XDG_RUNTIME_DIR
  84. # elements_dtls test hangs sometimes
  85. xvfb-run -s '-screen 0 1920x1080x24 -nolisten local +iglx -noreset' \
  86. meson test -C build --print-errorlogs || :
  87. )
  88. package_gst-plugins-bad-libs() {
  89. pkgdesc="${pkgdesc/ plugins}"
  90. provides=("gst-transcoder=$pkgver")
  91. conflicts=("gst-transcoder<1.18.0")
  92. replaces=("gst-transcoder<1.18.0")
  93. if [ "$CARCH" = x86_64 ]; then
  94. enable_svthevc=svthevcenc
  95. fi
  96. DESTDIR="$pkgdir" meson install -C build
  97. mkdir -p ext/lib/gstreamer-1.0
  98. for _x in aom assrender bs2b bz2 chromaprint closedcaption colormanagement \
  99. curl dc1394 de265 dtls dtsdec faad fdkaac fluidsynthmidi gme \
  100. hls kate ladspa lv2 mms modplug mpeg2enc mplex musepack \
  101. neonhttpsrc ofa openal openexr openjpeg opusparse resindvd rsvg \
  102. rtmp sbc sctp smoothstreaming sndfile soundtouch spandsp srt srtp \
  103. teletext ttmlsubs vulkan waylandsink webp webrtc webrtcdsp \
  104. wildmidi x265 zbar va "$enable_svthevc" avtp zxing microdns; do
  105. _x="lib/gstreamer-1.0/libgst${_x}.so"
  106. mv "$pkgdir/usr/$_x" "ext/$_x"
  107. done
  108. mkdir -p opencv/{lib,include/gstreamer-1.0/gst}
  109. mv -t opencv/lib "$pkgdir"/usr/lib/*opencv*
  110. mv -t opencv/include/gstreamer-1.0/gst \
  111. "$pkgdir"/usr/include/gstreamer-1.0/gst/opencv
  112. for _x in opencv wpe; do
  113. mkdir -p "$_x/lib/gstreamer-1.0"
  114. _f="lib/gstreamer-1.0/libgst${_x}.so"
  115. mv "$pkgdir/usr/$_f" "$_x/$_f"
  116. done
  117. }
  118. package_gst-plugins-bad() {
  119. depends=("gst-plugins-bad-libs=$pkgver" gst-plugins-good
  120. aom libass libbs2b bzip2 chromaprint pango lcms2 curl libxml2
  121. libdc1394 libde265 openssl libdca faad2 libfdk-aac fluidsynth
  122. libgme nettle libkate liblrdf lilv libmms libmodplug mjpegtools
  123. libmpcdec neon libofa openal openexr openjpeg2 opus libdvdnav
  124. libdvdread librsvg rtmpdump sbc libsndfile soundtouch spandsp srt
  125. libsrtp zvbi vulkan-icd-loader libxcb wayland libwebp libnice
  126. webrtc-audio-processing wildmidi x265 zbar libavtp
  127. libmicrodns zxing-cpp libva)
  128. depends_x86_64=(svt-hevc)
  129. mv ext "$pkgdir/usr"
  130. }
  131. package_gst-plugin-opencv() {
  132. pkgdesc="${pkgdesc/bad plugins/opencv plugin}"
  133. depends=(gst-plugins-base-libs opencv)
  134. mv opencv "$pkgdir/usr"
  135. }
  136. package_gst-plugin-wpe() {
  137. pkgdesc="${pkgdesc/bad plugins/wpe plugin}"
  138. depends=(gst-plugins-base-libs wpewebkit)
  139. mv wpe "$pkgdir/usr"
  140. }