From 15aae76aed129ed87b38348f8a6ebf27ee300642 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 4 Apr 2022 13:56:24 +0800 Subject: [PATCH 04/10] gnu: gst-plugins-good: Update to 1.20.1. * gnu/packages/gstreamer.scm (gst-plugins-good): Update to 1.20.1. [version]: Use `%gstreamer-version` variable. [arguements]: Use G-expressions. : Add 'absolutize-libsoup-library' to embbed abosulute path to libsoup into the source. [propagated-inputs]: Remove unnecessary propagation. [native-inputs]: Use label-less style inputs. [inputs]: Ditto. * gnu/packages/patches/gst-plugins-good-fix-test.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove corresponding entry. --- gnu/local.mk | 1 - gnu/packages/gstreamer.scm | 145 ++++++++++-------- .../patches/gst-plugins-good-fix-test.patch | 94 ------------ 3 files changed, 79 insertions(+), 161 deletions(-) delete mode 100644 gnu/packages/patches/gst-plugins-good-fix-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index a704161abc..da38c87b4c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1221,7 +1221,6 @@ dist_patch_DATA = \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ %D%/packages/patches/grub-setup-root.patch \ %D%/packages/patches/gspell-dash-test.patch \ - %D%/packages/patches/gst-plugins-good-fix-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ %D%/packages/patches/guile-2.2-skip-so-test.patch \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index aabed346a6..3c3f914245 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -621,7 +621,7 @@ (define-public gst-plugins-base (define-public gst-plugins-good (package (name "gst-plugins-good") - (version "1.18.5") + (version %gstreamer-version) (source (origin (method url-fetch) @@ -629,76 +629,89 @@ (define-public gst-plugins-good (string-append "https://gstreamer.freedesktop.org/src/" name "/" name "-" version ".tar.xz")) - (patches (search-patches "gst-plugins-good-fix-test.patch")) (sha256 - (base32 "0svrapawych2s3lm4lx3x023zxq5kcx50jnfmh0qigszfskyxbis")))) + (base32 "1al4f35mx41cy2h6agvmsqkjfchsyfs0iyxzpv6pnl0xh9pqfriw")))) (build-system meson-build-system) (arguments - `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas - #:phases - (modify-phases %standard-phases - ,@%common-gstreamer-phases - (add-before 'check 'pre-check - (lambda _ - ;; Tests require a running X server. - (system "Xvfb :1 +extension GLX &") - (setenv "DISPLAY" ":1") - ;; Tests write to $HOME. - (setenv "HOME" (getcwd)) - ;; Tests look for $XDG_RUNTIME_DIR. - (setenv "XDG_RUNTIME_DIR" (getcwd)) - ;; For missing '/etc/machine-id'. - (setenv "DBUS_FATAL_WARNINGS" "0") - #t))))) + (list + #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:phases + #~(modify-phases %standard-phases + #$@%common-gstreamer-phases + + ;; In https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/c3455def2e7bd09a7c3806283ceb69d0bef24869 + ;; gst-plugins-good will dlopen libsoup at runtime instead of link + ;; to it. Patch the full library path of libsoup to avoid + ;; fiddle around with LD_LIBRARY_PATH environment variable. + (add-after 'unpack 'absolutize-libsoup-library + (lambda* (#:key inputs #:allow-other-keys) + (define libsoup + (search-input-file inputs "lib/libsoup-3.0.so")) + + (substitute* "ext/soup/gstsouploader.c" + (("(#define LIBSOUP_3_SONAME ).+$" _ prefix) + (string-append prefix "\"" libsoup "\"\n"))))) + (add-before 'check 'pre-check + (lambda _ + ;; Tests require a running X server. + (system "Xvfb :1 +extension GLX &") + (setenv "DISPLAY" ":1") + ;; Tests write to $HOME. + (setenv "HOME" (getcwd)) + ;; Tests look for $XDG_RUNTIME_DIR. + (setenv "XDG_RUNTIME_DIR" (getcwd)) + ;; For missing '/etc/machine-id'. + (setenv "DBUS_FATAL_WARNINGS" "0") + #t))))) (native-inputs - `(("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python-wrapper" ,python-wrapper) - ("xmllint" ,libxml2) - ("xorg-server" ,xorg-server-for-tests))) + (list gettext-minimal + `(,glib "bin") + gobject-introspection + gsettings-desktop-schemas + perl + pkg-config + python-wrapper + libxml2 + xorg-server-for-tests)) (inputs - `(("aalib" ,aalib) - ("bzip2" ,bzip2) - ("cairo" ,cairo) - ("flac" ,flac) - ("librsvg" ,(librsvg-for-system)) - ("glib" ,glib) - ("glib-networking" ,glib-networking) - ("glu" ,glu) - ("gtk+" ,gtk+) - ("jack" ,jack-2) - ("lame" ,lame) - ("libavc1394" ,libavc1394) - ("libcaca" ,libcaca) - ("libdv" ,libdv) - ("libgudev" ,libgudev) - ("libiec61883" ,libiec61883) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libshout" ,libshout) - ("libsoup" ,libsoup) - ("libvpx" ,libvpx) - ("libx11" ,libx11) - ("libxdamage" ,libxdamage) - ("libxfixes" ,libxfixes) - ("libxext" ,libxext) - ("libxshm" ,libxshmfence) - ("mesa" ,mesa) - ("mpg123" ,mpg123) - ("orc" ,orc) - ("pulseaudio" ,pulseaudio) - ("speex" ,speex) - ("taglib" ,taglib) - ("twolame" ,twolame) - ("v4l-utils" ,v4l-utils) - ("wavpack" ,wavpack) - ("zlib" ,zlib))) - (propagated-inputs - (list gstreamer gst-plugins-base)) + (list aalib + bzip2 + cairo + flac + (librsvg-for-system) + glib + glib-networking + glu + gstreamer + gst-plugins-base + gtk+ + jack-2 + lame + libavc1394 + libcaca + libdv + libgudev + libiec61883 + libjpeg-turbo + libpng + libshout + libsoup + libvpx + libx11 + libxdamage + libxfixes + libxext + libxshmfence + mesa + mpg123 + orc + pulseaudio + speex + taglib + twolame + v4l-utils + wavpack + zlib)) (synopsis "GStreamer plugins and helper libraries") (description "GStreamer-Plugins-Good is a collection of plug-ins you'd want to have right next to you on the battlefield. Shooting sharp and making no diff --git a/gnu/packages/patches/gst-plugins-good-fix-test.patch b/gnu/packages/patches/gst-plugins-good-fix-test.patch deleted file mode 100644 index 38ec0ba802..0000000000 --- a/gnu/packages/patches/gst-plugins-good-fix-test.patch +++ /dev/null @@ -1,94 +0,0 @@ -Fix a broken test: - -https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 - -Patches copied from upstream source repository: - -https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa -https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/f5310ce346180a717f091f2f09bcbb3ddfb15436 - -From 2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= -Date: Thu, 12 Nov 2020 23:38:21 +0000 -Subject: [PATCH 1/2] tests: qtdemux: fix crash on 32-bit architectures - -Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 - -Part-of: ---- - tests/check/elements/qtdemux.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c -index 5271c6576..0c748278b 100644 ---- a/tests/check/elements/qtdemux.c -+++ b/tests/check/elements/qtdemux.c -@@ -797,9 +797,10 @@ GST_START_TEST (test_qtdemux_pad_names) - "protection-system", G_TYPE_STRING, - "9a04f079-9840-4286-ab92-e65be0885f95", NULL); - caps = -- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, -- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", -- GST_TYPE_CAPS, mediacaps, NULL); -+ gst_caps_new_simple ("video/quicktime", -+ "variant", G_TYPE_STRING, "mss-fragmented", -+ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), -+ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); - - /* Send segment event* */ - event = gst_event_new_caps (caps); -@@ -852,9 +853,10 @@ GST_START_TEST (test_qtdemux_pad_names) - "protection-system", G_TYPE_STRING, - "9a04f079-9840-4286-ab92-e65be0885f95", NULL); - caps = -- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, -- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", -- GST_TYPE_CAPS, mediacaps, NULL); -+ gst_caps_new_simple ("video/quicktime", -+ "variant", G_TYPE_STRING, "mss-fragmented", -+ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), -+ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); - - /* Send segment event* */ - event = gst_event_new_caps (caps); --- -2.30.0 - - -From f5310ce346180a717f091f2f09bcbb3ddfb15436 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= -Date: Thu, 12 Nov 2020 23:39:21 +0000 -Subject: [PATCH 2/2] tests: qtdemux: fix typo in caps field - -timesacle -> timescale - -Part-of: ---- - tests/check/elements/qtdemux.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c -index 0c748278b..4a14c45c0 100644 ---- a/tests/check/elements/qtdemux.c -+++ b/tests/check/elements/qtdemux.c -@@ -799,7 +799,7 @@ GST_START_TEST (test_qtdemux_pad_names) - caps = - gst_caps_new_simple ("video/quicktime", - "variant", G_TYPE_STRING, "mss-fragmented", -- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), -+ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), - "media-caps", GST_TYPE_CAPS, mediacaps, NULL); - - /* Send segment event* */ -@@ -855,7 +855,7 @@ GST_START_TEST (test_qtdemux_pad_names) - caps = - gst_caps_new_simple ("video/quicktime", - "variant", G_TYPE_STRING, "mss-fragmented", -- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), -+ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), - "media-caps", GST_TYPE_CAPS, mediacaps, NULL); - - /* Send segment event* */ --- -2.30.0 - -- 2.34.0