(address . guix-patches@gnu.org)
Here's a series of patches that updates gstreamer to 1.20.1.
`guix refresh gstreamer -l` shows that triggers 900+ rebuilds, I'm not
sure every packages depends on gstreamer is tested and worked well.
Currently only webkitgtk is tested.
-----BEGIN PGP SIGNATURE-----
iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYk0MOxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/n9UAEA7TQ8/XLe+uDzdgv8nsDru8XXry2A
9y7/yJPpqz1B724A/3mzQv17jenynocC0gfqejYs7nJVeDroJnXJvj3VJ6QK
=zZkM
-----END PGP SIGNATURE-----
From 5ad6187b41bd197573e24058accaf780dcb37035 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 4 Apr 2022 09:20:12 +0800
Subject: [PATCH 01/10] gnu: gstreamer-docs: Update to 1.20.1.
* gnu/packages/gstreamer.scm (%gstreamer-version): New variable.
(gstreamer-docs): Update to 1.20.1.
[source]: Use %gstreamer-version.
[arguments]: Use G-expressions.
---
gnu/packages/gstreamer.scm | 39 ++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
Toggle diff (71 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 8ff8e6242b..883baea458 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -28,6 +28,7 @@
(define-module (gnu packages gstreamer)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -401,10 +402,12 @@ (define-public orc
;; under the 3-clause BSD license, the rest is under 2-clause BSD license.
(license (list license:bsd-2 license:bsd-3))))
+(define %gstreamer-version "1.20.1")
+
(define-public gstreamer-docs
(package
(name "gstreamer-docs")
- (version "1.18.5")
+ (version %gstreamer-version)
(source (origin
(method url-fetch)
(uri (string-append
@@ -412,25 +415,25 @@ (define-public gstreamer-docs
"/gstreamer-docs-" version ".tar.xz"))
(sha256
(base32
- "1xvqrqv1zxqdpvd02dvr0xspk30c8b940vvnr9x75a08nx0x75xh"))))
+ "1brngvhp8k1hdh82g2mcqa5dnb2b68wc4m4jlras6fmr6cyjzn6x"))))
(build-system trivial-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules ((guix build utils)))
- (let* ((source (assoc-ref %build-inputs "source"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (out (assoc-ref %outputs "out"))
- (books (string-append out "/share/devhelp/books")))
- (setenv "PATH" (string-append xz "/bin"))
- (mkdir-p books)
- (with-directory-excursion books
- (invoke (string-append tar "/bin/tar") "-xvf" source
- "--strip-components=3"
- (string-append ,name "-" ,version
- "/devhelp/books/GStreamer")))))))
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules ((guix build utils)))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (books (string-append #$output "/share/devhelp/books")))
+ (setenv "PATH" (string-append xz "/bin"))
+ (mkdir-p books)
+ (with-directory-excursion books
+ (invoke (string-append tar "/bin/tar") "-xvf" source
+ "--strip-components=3"
+ (string-append #$name "-" #$version
+ "/devhelp/books/GStreamer")))))))
(native-inputs
(list tar xz))
(home-page "https://gstreamer.freedesktop.org/")
--
2.34.0
From 6fb757e726236e2f07798aae012db9f68d2b3d35 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 4 Apr 2022 11:51:19 +0800
Subject: [PATCH 02/10] gnu: gstreamer: Update to 1.20.1.
* gnu/packages/gstreamer.scm (%common-gstreamer-phases): Use G-expressions.
(gstreamer): Update to 1.20.1.
[version]: Use `%gstreamer-version` variable.
[arguments]: Use G-expressions.
<phases>: Remove workaround for gstreamer bug because it's fixed by upstream.
[native-inputs]: Use label-less style inputs.
---
gnu/packages/gstreamer.scm | 72 ++++++++++++++++----------------------
1 file changed, 30 insertions(+), 42 deletions(-)
Toggle diff (105 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 883baea458..02972f4e1a 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -456,18 +456,19 @@ (define-public gstreamer-docs
;; Increase the test timeouts to accommodate slow or busy machines.
(define %common-gstreamer-phases
- '((add-after 'unpack 'increase-test-timeout
- (lambda _
- (substitute* "tests/check/meson.build"
- (("'CK_DEFAULT_TIMEOUT', '[0-9]*'")
- "'CK_DEFAULT_TIMEOUT', '600'")
- (("timeout ?: .*\\)")
- "timeout: 90 * 60)"))))))
+ (list
+ #~(add-after 'unpack 'increase-test-timeout
+ (lambda _
+ (substitute* "tests/check/meson.build"
+ (("'CK_DEFAULT_TIMEOUT', '[0-9]*'")
+ "'CK_DEFAULT_TIMEOUT', '600'")
+ (("timeout ?: .*\\)")
+ "timeout: 90 * 60)"))))))
(define-public gstreamer
(package
(name "gstreamer")
- (version "1.18.5")
+ (version %gstreamer-version)
(source
(origin
(method url-fetch)
@@ -476,33 +477,20 @@ (define-public gstreamer
version ".tar.xz"))
(sha256
(base32
- "02p8my6dzmm4rvd93s3qnh8w5bm9bh4f7gdydbsvnn9llqr251jm"))))
+ "0cghi6n4nhdbajz3wqcgbh5xm94myvnqgsi9g2bz9n1s9904l2fy"))))
(build-system meson-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ,@%common-gstreamer-phases
- ;; FIXME: Since switching to the meson-build-system, two tests
- ;; started failing on i686. See
- ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/499>.
- ,@(if (string-prefix? "i686" (or (%current-target-system)
- (%current-system)))
- `((add-after 'unpack 'disable-some-tests
- (lambda _
- (substitute* "tests/check/gst/gstsystemclock.c"
- (("tcase_add_test \\(tc_chain, test_stress_cleanup_unschedule.*")
- "")
- (("tcase_add_test \\(tc_chain, test_stress_reschedule.*")
- "")))))
- '())
- (add-after 'unpack 'disable-problematic-tests
- (lambda _
- ;; Disable the 'pipelines-seek' test, which appears to be load
- ;; sensitive (see:
- ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/854).
- (substitute* "tests/check/meson.build"
- ((".*'pipelines/seek.c'.*")
- "")))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ #$@%common-gstreamer-phases
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ ;; Disable the 'pipelines-seek' test, which appears to be load
+ ;; sensitive (see:
+ ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/854).
+ (substitute* "tests/check/meson.build"
+ ((".*'pipelines/seek.c'.*") "")))))))
(propagated-inputs
;; In gstreamer-1.0.pc:
;; Requires: glib-2.0, gobject-2.0
@@ -510,15 +498,15 @@ (define-public gstreamer
(list elfutils ; libdw
glib libunwind))
(native-inputs
- `(("bash-completion" ,bash-completion)
- ("bison" ,bison)
- ("flex" ,flex)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("python-wrapper" ,python-wrapper)))
+ (list bash-completion
+ bison
+ flex
+ gettext-minimal
+ `(,glib "bin")
+ gobject-introspection
+ perl
+ pkg-config
+ python-wrapper))
(inputs
(list gmp libcap
;; For tests.
--
2.34.0
From 1ac989e625704471a72d170fc219cdc10ef8b626 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 4 Apr 2022 14:37:05 +0800
Subject: [PATCH 06/10] gnu: gst-plugins-ugly: Update to 1.20.1.
* gnu/packages/gstreamer.scm (gst-plugins-ugly): Update to 1.20.1.
[version]: Use `%gstreamer-version` variable.
[arguments]: Use G-expressions.
[propagated-inputs]: Remove unnecessary propagation.
[native-inputs]: Use label-less style inputs.
---
gnu/packages/gstreamer.scm | 55 +++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 27 deletions(-)
Toggle diff (85 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 24afc36347..3cdd118565 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -920,7 +920,7 @@ (define-public gst-plugins-bad
(define-public gst-plugins-ugly
(package
(name "gst-plugins-ugly")
- (version "1.18.5")
+ (version %gstreamer-version)
(source
(origin
(method url-fetch)
@@ -928,33 +928,36 @@ (define-public gst-plugins-ugly
(string-append "https://gstreamer.freedesktop.org/src/"
name "/" name "-" version ".tar.xz"))
(sha256
- (base32 "1nb6kz3gbn8r0sld6xkm16qpgyb2bvhafb7sff9rgagqk0z80cnz"))))
+ (base32 "06fvgyjwcf4paqxgp1xmgd0d0glkxys7n818526k10wrw92m20s2"))))
(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"))))))
+ (list
+ #: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"))))))
(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)
- ("xorg-server" ,xorg-server-for-tests)))
+ (list gettext-minimal
+ `(,glib "bin")
+ gobject-introspection
+ gsettings-desktop-schemas
+ gstreamer
+ gst-plugins-base
+ perl
+ pkg-config
+ python-wrapper
+ xorg-server-for-tests))
(inputs
(list glib
glib-networking
@@ -965,8 +968,6 @@ (define-public gst-plugins-ugly
libx264
opencore-amr
orc))
- (propagated-inputs
- (list gstreamer gst-plugins-base))
(synopsis "GStreamer plugins and helper libraries")
(description "Gst-Plugins-Ugly are the ones that might have a patent noose
around their neck, or a lock-up license, or any other problem that makes you
--
2.34.0
From 5092ba4cbaf12402c2dba6273ed7d3b4fff375fe Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 4 Apr 2022 14:38:11 +0800
Subject: [PATCH 07/10] gnu: gst-libav: Update to 1.20.1.
* gnu/packages/gstreamer.scm (gst-libav): Update to 1.20.1.
[version]: Use `%gstreamer-version` variable.
[propagated-inputs]: Remove unnecessary propagation.
---
gnu/packages/gstreamer.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Toggle diff (32 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 3cdd118565..4dad4514da 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -978,7 +978,7 @@ (define-public gst-plugins-ugly
(define-public gst-libav
(package
(name "gst-libav")
- (version "1.18.5")
+ (version %gstreamer-version)
(source
(origin
(method url-fetch)
@@ -987,14 +987,12 @@ (define-public gst-libav
"https://gstreamer.freedesktop.org/src/" name "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "0j55jgk9sbhinfx2gsg21q609x6yzrixrn5xxlxd378fj6500bl2"))))
+ (base32 "1iwz7928yi48xia5kfkj54x5dfmhbj25g9125vainpmp6fv1z9wi"))))
(build-system meson-build-system)
(native-inputs
(list perl pkg-config python-wrapper ruby))
(inputs
- (list ffmpeg))
- (propagated-inputs
- (list gstreamer gst-plugins-base))
+ (list ffmpeg gstreamer gst-plugins-base))
(synopsis "GStreamer plugins and helper libraries")
(description "Gst-Libav contains a GStreamer plugin for using the encoders,
decoders, muxers, and demuxers provided by FFmpeg.")
--
2.34.0
From b893ccbbf7693d139590de5644d00b0304acadb3 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 4 Apr 2022 18:05:59 +0800
Subject: [PATCH 08/10] gnu: python-gst: Update to 1.20.1.
* gnu/packages/gstreamer.scm (python-gst): Update to 1.20.1.
[version]: Use `%gstreamer-version` variable.
[arguments]:
<configure-flags>: Add missing slash.
[propagated-inputs]: propagates gstreamer.
---
gnu/packages/gstreamer.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Toggle diff (38 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 4dad4514da..d96a07cc33 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -1041,7 +1041,7 @@ (define-public gst-editing-services
(define-public python-gst
(package
(name "python-gst")
- (version "1.18.5")
+ (version %gstreamer-version)
(source (origin
(method url-fetch)
(uri (string-append
@@ -1049,7 +1049,7 @@ (define-public python-gst
"gst-python-" version ".tar.xz"))
(sha256
(base32
- "0lmwwmr3wm56qlrdrb0d5cpmqxkcmarz61wmp1nrv5852f3qadjk"))))
+ "08ll518b15r9ipssrcc0iq5kr0lx4cf3b0k9ihfricrxmagxav5s"))))
(build-system meson-build-system)
(arguments
`(#:modules ((guix build meson-build-system)
@@ -1060,11 +1060,11 @@ (define-public python-gst
#:configure-flags
(list (string-append
"-Dpygi-overrides-dir="
- (python:site-packages %build-inputs %outputs) "gi/overrides"))))
+ (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
(native-inputs
(list pkg-config python))
(propagated-inputs
- (list gst-plugins-base python-pygobject))
+ (list gstreamer gst-plugins-base python-pygobject))
(home-page "https://gstreamer.freedesktop.org/")
(synopsis "GStreamer GObject Introspection overrides for Python")
(description
--
2.34.0
From 1bd254d7544db7633d2c34313b0e95b92adf1c91 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 5 Apr 2022 00:14:56 +0800
Subject: [PATCH 09/10] gnu: webkitgtk: Fix build failed against gstreamer
1.20.
* gnu/packages/webkit.scm (webkitgtk):
[inputs]: Add gst-plugins-bad. It provides gstreamer-parsecodec.
---
gnu/packages/webkit.scm | 1 +
1 file changed, 1 insertion(+)
Toggle diff (14 lines)
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index f79d6bd4f6..67df4c297e 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -326,6 +326,7 @@ (define-public webkitgtk
("enchant" ,enchant)
("geoclue" ,geoclue)
("gst-plugins-base" ,gst-plugins-base)
+ ("gst-plugins-bad" ,gst-plugins-bad)
("gtk+-2" ,gtk+-2)
("harfbuzz" ,harfbuzz)
("hyphen" ,hyphen)
--
2.34.0
From 70ea4b4c8085fce957557a9df2a44ab217ffaf78 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Wed, 6 Apr 2022 11:31:00 +0800
Subject: [PATCH 10/10] gnu: gst-editing-services: Update to 1.20.1.
* gnu/packages/gstreamer.scm (gst-editing-services): Update to 1.20.1.
[version]: Use `%gstreamer-version` variable.
[source]: Generate download URL by package name.
[arguments]: Use G-expressions.
[native-inputs]: Use label-less input style.
---
gnu/packages/gstreamer.scm | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
Toggle diff (61 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index d96a07cc33..ef0b1d1ead 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -1002,35 +1002,38 @@ (define-public gst-libav
(define-public gst-editing-services
(package
(name "gst-editing-services")
- (version "1.18.5")
+ (version %gstreamer-version)
(source (origin
(method url-fetch)
(uri (string-append
"https://gstreamer.freedesktop.org/src/" name "/"
- "gst-editing-services-" version ".tar.xz"))
+ name "-" version ".tar.xz"))
(sha256
(base32
- "1x8db4021qv4ypq1g6n5q2awrb7glr4xp1h650c3w7q59lwsix4a"))))
+ "1ps887yyj6jkj8a2613n43b4fbvynxwryinxvavi00cfnlhipkka"))))
(build-system meson-build-system)
(arguments
- ;; FIXME: 16/22 failing tests.
- `(#:tests? #f
- #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:phases (modify-phases %standard-phases
- ,@%common-gstreamer-phases)))
+ (list
+ ;; FIXME: 16/22 failing tests.
+ #:tests? #f
+ #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:phases
+ #~(modify-phases %standard-phases
+ #$@%common-gstreamer-phases)))
(propagated-inputs
(list gstreamer gst-plugins-base))
(inputs
(list glib glib-networking gtk+ libxml2))
(native-inputs
- `(("flex" ,flex)
- ("gobject-introspection" ,gobject-introspection)
- ("glib:bin" ,glib "bin")
- ("gst-plugins-bad" ,gst-plugins-bad)
- ("gst-plugins-good" ,gst-plugins-good)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)))
+ (list flex
+ gobject-introspection
+ `(,glib "bin")
+ ;; gst-devtools
+ gst-plugins-bad
+ gst-plugins-good
+ perl
+ pkg-config
+ python-wrapper))
(home-page "https://gstreamer.freedesktop.org/")
(synopsis "GStreamer library for non-linear editors")
(description
--
2.34.0