summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-02-05 13:02:57 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2023-02-08 21:41:38 -0500
commit618f5403162e75387c2e1445035606733fcf88aa (patch)
treecd77f10c94c146f6fc22e4b21f3e719bb1f9b305
parent72b4045ab61c941a7af11876d6abdd61109e5164 (diff)
[gst-plugins-bad]: disable networking tests
-rw-r--r--libre/gst-plugins-bad/PKGBUILD60
1 files changed, 57 insertions, 3 deletions
diff --git a/libre/gst-plugins-bad/PKGBUILD b/libre/gst-plugins-bad/PKGBUILD
index 2ccd83731..3d3fafd96 100644
--- a/libre/gst-plugins-bad/PKGBUILD
+++ b/libre/gst-plugins-bad/PKGBUILD
@@ -12,9 +12,10 @@
# - removed support for non-free 'faac' codec
# - removed 'nvidia-utils' from optdepends
# - adapt pkgdesc variable substitutions in package() functions
-# - disable 'svthevcenc' (i686 and armv7h)
+# - disable 'svthevcenc' for 32-bit arches
# technical:
-# - disable 'opencv'
+# - disable tests which require networking
+# - FIXME: disable 'opencv' - package FTBS
# /usr/include/opencv4/opencv2/tracking/tracking_internals.hpp:18:10:
# fatal error: opencv2/video/detail/tracking.private.hpp: No such file or directory
@@ -82,13 +83,47 @@ b2sums=('SKIP'
validpgpkeys=(D637032E45B8C6585B9456565D2EEE6F6F349D7C) # Tim Müller <tim@gstreamer-foundation.org>
+# wrapper around `sed` replace, which exits non-zero on failure
+_sed_fail() # ("match_rx" "replace_rx" "target_file")
+{
+ local match_rx="$1"
+ local replace_rx="$2"
+ local target_file="$3"
+ local exit_code
+
+ echo "\`sed\` replace - processing: '${target_file}'"
+ sed -i "/${match_rx}/{s//${replace_rx}/ ; h} ; \${x ; /./{x ; q0} ; x ; q1} ;" ${target_file}
+}
+
+prepare()
+{
+ cd gstreamer
+
+ # disable tests which require networking
+ local target_file=subprojects/gst-plugins-bad/tests/check/meson.build
+ _sed_fail "\(\[\['elements\/webrtcbin\.c'\], \)not libnice_dep\.found()," \
+ "\1false ," ${target_file}
+ _sed_fail "\(\[\['elements\/rtpsrc\.c'\], \)get_option('rtp').disabled()]," \
+ "\1false]," ${target_file}
+ _sed_fail "\(\[\['elements\/rtpsink\.c'\], \)get_option('rtp').disabled()]," \
+ "\1false]," ${target_file}
+ _sed_fail "\(\[\['elements\/srtp\.c'\], \)not srtp_dep.found()," \
+ "\1false ," ${target_file}
+}
+
build() {
local meson_options=(
# Superproject options
+ -D devtools=disabled
-D doc=disabled
+ -D examples=disabled
-D gobject-cast-checks=disabled
-D gpl=enabled
+ -D gst-examples=disabled
+ -D libnice=disabled
+ -D orc-source=system
-D package-origin="https://www.parabola.nu/"
+ -D vaapi=enabled
# Package names
-D gst-plugins-bad:package-name="Parabola GNU/Linux-libre gst-plugins-bad $pkgver-$pkgrel"
@@ -115,18 +150,23 @@ build() {
-D gst-plugins-bad:wic=disabled
-D gst-plugins-bad:win32ipc=disabled
)
+
+ # parabola tweaks
meson_options=( "${meson_options[@]/gst-plugins-bad:/}" )
meson_options+=(
-D faac=disabled # non-free
$( [[ "${CARCH}" == x86_64 ]] || echo '-D svthevcenc=disabled' ) # x86_64 only
)
meson_options+=(-D opencv=disabled) # FIXME: 'opencv' package FTBS - undefined reference to `cblas_{c,d,s,z}gemm'
+
arch-meson gstreamer/subprojects/${pkgbase} build "${meson_options[@]}"
meson configure build # Print config
meson compile -C build
}
check() (
+# (( _SHOULD_RUN_TESTS )) || return
+
mkdir -p -m 700 "${XDG_RUNTIME_DIR:=$PWD/runtime-dir}"
export XDG_RUNTIME_DIR
@@ -152,6 +192,9 @@ package_gst-plugins-bad-libs() {
vulkan-icd-loader wayland
)
+ # arch has this command in the package_gstreamer() function
+ DESTDIR="$srcdir/root" meson install -C build
+
cd root; local files=(
usr/include/gstreamer-1.0/gst/audio/{audio-bad-prelude,gstnonstreamaudiodecoder,gstplanaraudioadapter}.h
usr/include/gstreamer-1.0/gst/{basecamerabinsrc,codecparsers,cuda,insertbin,interfaces,isoff,mpegts,play,player,sctp,transcoder,uridownloader,va,vulkan,wayland,webrtc}
@@ -262,6 +305,8 @@ package_gst-plugins-bad() {
x265 zbar gsm libopenmpt libldac libfreeaptx qrencode json-glib libavtp
libmicrodns svt-hevc zxing-cpp
)
+
+ # parabola tweaks
depends=( ${depends[*]/faac/} ) # non-free
[[ "${CARCH}" == x86_64 ]] || depends=( ${depends[*]/svt-hevc/} )
@@ -316,7 +361,7 @@ package_gst-plugins-bad() {
usr/lib/gstreamer-1.0/libgstspandsp.so
usr/lib/gstreamer-1.0/libgstsrt.so
usr/lib/gstreamer-1.0/libgstsrtp.so
- $( [[ "${CARCH}" != x86_64 ]] || echo usr/lib/gstreamer-1.0/libgstsvthevcenc.so ) # x86_64 only
+ usr/lib/gstreamer-1.0/libgstsvthevcenc.so
usr/lib/gstreamer-1.0/libgstteletext.so
usr/lib/gstreamer-1.0/libgsttimecode.so
usr/lib/gstreamer-1.0/libgstttmlsubs.so
@@ -327,6 +372,15 @@ package_gst-plugins-bad() {
usr/lib/gstreamer-1.0/libgstx265.so
usr/lib/gstreamer-1.0/libgstzbar.so
usr/lib/gstreamer-1.0/libgstzxing.so
+ )
+
+ # parabola tweaks
+ [[ "${CARCH}" == x86_64 ]] ||
+ files=(
+ ${files[*]/usr\/lib\/gstreamer-1.0\/libgstsvthevcenc.so/} # x86_64 only
+ )
+ files=(
+ ${files[*]/usr\/lib\/gstreamer-1.0\/libgstfaac.so/} # non-free
); _install
}