gnu: gst-plugins-bad: Use new package style.

* gnu/packages/gstreamer.scm (gst-plugins-bad)[arguments]: Convert to list of
G-Expressions.
[native-inputs, inputs]: Drop labels.
This commit is contained in:
Liliana Marie Prikler 2022-06-29 21:18:06 +02:00
parent f1b70e156a
commit 673af7e81e
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -727,179 +727,177 @@ (define-public gst-plugins-bad
(delete-file-recursively "ext/sctp/usrsctp"))))) (delete-file-recursively "ext/sctp/usrsctp")))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:configure-flags '("-Dsctp-internal-usrsctp=disabled") (list
#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas #:configure-flags #~(list "-Dsctp-internal-usrsctp=disabled")
#:phases #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
(modify-phases %standard-phases #:phases
,@%common-gstreamer-phases #~(modify-phases %standard-phases
,@(if (string-prefix? "arm" (or (%current-target-system) #$@%common-gstreamer-phases
(%current-system))) #$@(if (string-prefix? "arm" (or (%current-target-system)
;; Disable test that fails on ARMv7. (%current-system)))
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188 ;; Disable test that fails on ARMv7.
`((add-after 'unpack 'disable-asfmux-test ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
(lambda _ `((add-after 'unpack 'disable-asfmux-test
(substitute* "tests/check/meson.build" (lambda _
(("\\[\\['elements/asfmux\\.c'\\]\\],") (substitute* "tests/check/meson.build"
""))))) (("\\[\\['elements/asfmux\\.c'\\]\\],")
'()) "")))))
(add-after 'unpack 'adjust-tests '())
(lambda* (#:key native-inputs inputs #:allow-other-keys) (add-after 'unpack 'adjust-tests
(let ((gst-plugins-good (assoc-ref (or native-inputs inputs) (lambda* (#:key native-inputs inputs #:allow-other-keys)
"gst-plugins-good"))) (let ((gst-plugins-good (assoc-ref (or native-inputs inputs)
(substitute* "tests/check/meson.build" "gst-plugins-good")))
;; Make gst-plugin-good available for tests, see (substitute* "tests/check/meson.build"
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426 ;; Make gst-plugin-good available for tests, see
(("'GST_PLUGIN_SYSTEM_PATH_1_0', ''") ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426
(string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '" (("'GST_PLUGIN_SYSTEM_PATH_1_0', ''")
gst-plugins-good "/lib/gstreamer-1.0'")) (string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
gst-plugins-good "/lib/gstreamer-1.0'"))
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
((".*elements/msdkh264enc\\.c.*") "") ((".*elements/msdkh264enc\\.c.*") "")
((".*elements/svthevcenc\\.c.*") "") ((".*elements/svthevcenc\\.c.*") "")
;; The 'elements_shm.test_shm_live' test sometimes times out ;; The 'elements_shm.test_shm_live' test sometimes times out
;; (see: ;; (see:
;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790). ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
((".*'elements/shm\\.c'.*") "") ((".*'elements/shm\\.c'.*") "")
;; FIXME: Why is this failing. ;; FIXME: Why is this failing.
((".*elements/dash_mpd\\.c.*") "") ((".*elements/dash_mpd\\.c.*") "")
;; These tests are flaky and occasionally time out: ;; These tests are flaky and occasionally time out:
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932
((".*elements/curlhttpsrc\\.c.*") "") ((".*elements/curlhttpsrc\\.c.*") "")
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
((".*elements/dtls\\.c.*") "")) ((".*elements/dtls\\.c.*") ""))
(substitute* "tests/check/elements/zxing.c" (substitute* "tests/check/elements/zxing.c"
;; zxing 1.2.0 seemingly changed the type representation of ;; zxing 1.2.0 seemingly changed the type representation of
;; the EAN_13 structure; disable it. ;; the EAN_13 structure; disable it.
((".*\"EAN_13\".*") ((".*\"EAN_13\".*")
""))))) "")))))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda _ (lambda _
;; Tests require a running X server. ;; Tests require a running X server.
(system "Xvfb :1 +extension GLX &") (system "Xvfb :1 +extension GLX &")
(setenv "DISPLAY" ":1") (setenv "DISPLAY" ":1")
;; Tests write to $HOME. ;; Tests write to $HOME.
(setenv "HOME" (getcwd)) (setenv "HOME" (getcwd))
;; Tests look for $XDG_RUNTIME_DIR. ;; Tests look for $XDG_RUNTIME_DIR.
(setenv "XDG_RUNTIME_DIR" (getcwd)) (setenv "XDG_RUNTIME_DIR" (getcwd))
;; For missing '/etc/machine-id'. ;; For missing '/etc/machine-id'.
(setenv "DBUS_FATAL_WARNINGS" "0")))))) (setenv "DBUS_FATAL_WARNINGS" "0"))))))
(propagated-inputs (propagated-inputs
(list gstreamer gst-plugins-base)) (list gstreamer gst-plugins-base))
(native-inputs (native-inputs
`(("gettext" ,gettext-minimal) (list gettext-minimal
("glib:bin" ,glib "bin") ; for glib-mkenums, etc. `(,glib "bin") ; for glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection) gobject-introspection
("gsettings-desktop-schemas" ,gsettings-desktop-schemas) gsettings-desktop-schemas
("gst-plugins-good" ,gst-plugins-good) ;for tests gst-plugins-good ;for tests
("perl" ,perl) perl
("pkg-config" ,pkg-config) pkg-config
("python" ,python-wrapper) python-wrapper
("xorg-server" ,xorg-server-for-tests))) xorg-server-for-tests))
(inputs (inputs
`(("bluez" ,bluez) (append
("bzip2" ,bzip2) (if (target-x86?) (list mediasdk svt-hevc) '())
("cairo" ,cairo) (list bluez
;; ("ccextractor" ,ccextractor) bzip2
("chromaprint" ,chromaprint) cairo
("curl" ,curl) ;; ccextractor
("directfb" ,directfb) chromaprint
;;("dssim" ,dssim) curl
("faac" ,faac) directfb
("faad2" ,faad2) ;; dssim
("flite" ,flite) faac
("fluidsynth" ,fluidsynth) faad2
("glib" ,glib) flite
("glib-networking" ,glib-networking) fluidsynth
("glu" ,glu) glib
("gsm" ,gsm) glib-networking
("gtk+" ,gtk+) glu
("iqa" ,iqa) gsm
("ladspa" ,ladspa) gtk+
("lcms" ,lcms) iqa
("libaom" ,libaom) ladspa
("libass" ,libass) lcms
("libbs2b" ,libbs2b) libaom
("libdc1394" ,libdc1394) libass
("libdca" ,libdca) libbs2b
("libde265" ,libde265) libdc1394
("libdrm" ,libdrm) libdca
("libdvdnav" ,libdvdnav) libde265
("libdvdread" ,libdvdread) libdrm
("libexif" ,libexif) libdvdnav
("libfdk" ,libfdk) libdvdread
("libgcrypt" ,libgcrypt) libexif
("libgme" ,libgme) libfdk
("libgudev" ,libgudev) libgcrypt
("libkate" ,libkate) libgme
,@(if (target-x86?) libgudev
`(("libmfx" ,mediasdk)) libkate
'()) mediasdk
("libmms" ,libmms) libmms
("libmodplug" ,libmodplug) libmodplug
("libmpcdec" ,libmpcdec) libmpcdec
("libnice" ,libnice) libnice
("libofa" ,libofa) libofa
("libopenmpt" ,libopenmpt) libopenmpt
("librsvg" ,librsvg) librsvg
("libsndfile" ,libsndfile) libsndfile
("libsrtp" ,libsrtp) libsrtp
("libssh2" ,libssh2) libssh2
("libtiff" ,libtiff) libtiff
("libusb" ,libusb) libusb
("libva" ,libva) libva
("libvdpau" ,libvdpau) libvdpau
("libwebp" ,libwebp) libwebp
("libx11" ,libx11) libx11
("libxcb" ,libxcb) libxcb
("libxext" ,libxext) libxext
("libxkbcommon" ,libxkbcommon) libxkbcommon
("libxml2" ,libxml2) libxml2
("libxshm" ,libxshmfence) libxshmfence
("lilv" ,lilv) lilv
("lrdf" ,lrdf) lrdf
("lv2" ,lv2) lv2
("mesa" ,mesa) mesa
("mjpegtools" ,mjpegtools) mjpegtools
("neon" ,neon) neon
("nettle" ,nettle) nettle
("openal" ,openal) openal
;; ("opencv" ,opencv) ;; opencv
("openexr" ,openexr) openexr
("openh264" ,openh264) openh264
("openjpeg" ,openjpeg) openjpeg
;; ("openni2" ,openni2) ;; openni2
("opensles" ,opensles) opensles
("openssl" ,openssl) openssl
("opus" ,opus) opus
("orc" ,orc) orc
("pango" ,pango) pango
("rtmp" ,rtmpdump) rtmpdump
("sbc" ,sbc) sbc
("sctp" ,lksctp-tools) lksctp-tools
("soundtouch" ,soundtouch) soundtouch
("spandsp" ,spandsp) spandsp
("srt" ,srt) srt
,@(if (target-x86?) tinyalsa
`(("svthevcenc" ,svt-hevc)) transcode
'()) usrsctp
("tinyalsa" ,tinyalsa) v4l-utils
("transcode" ,transcode) vo-aacenc
("usrsctp" ,usrsctp) vo-amrwbenc
("v4l" ,v4l-utils) vulkan-headers
("voaacenc" ,vo-aacenc) vulkan-loader
("voamrwbenc" ,vo-amrwbenc) x265
("vulkan-headers" ,vulkan-headers) wayland
("vulkan-loader" ,vulkan-loader) webrtc-audio-processing
("x265" ,x265) wildmidi
("wayland" ,wayland) wpebackend-fdo
("webrtcdsp" ,webrtc-audio-processing) zbar
("wildmidi" ,wildmidi) zxing-cpp-1.2)))
("wpebackend-fdo" ,wpebackend-fdo)
("zbar" ,zbar)
("zxing" ,zxing-cpp-1.2)))
(home-page "https://gstreamer.freedesktop.org/") (home-page "https://gstreamer.freedesktop.org/")
(synopsis "Plugins for the GStreamer multimedia library") (synopsis "Plugins for the GStreamer multimedia library")
(description (description