Subject: [bug#47643] WIP-GNOME: gst-plugins-base

From: 宋文武 <[email-masked]>
Date: Sat, 10 Apr 2021 18:35:02 +0800

Leo Prikler <[email-masked]> writes:

> From: Raghav Gururajan <[email-masked]>
>
> * gnu/packages/gstreamer.scm (gst-plugins-base)[version]: Update to 1.18.4.
> [arguments](glib-or-gtk): New argument.
> [configure-flags](gl): Remove flag.
> [phases](pre-check): New phase.
> [native-inputs]: Add gettext-minimal, gsettings-desktop-schemas, perl
> and xorg-server-for-tests.
> [propagated-inputs]: Add glib-networking.
> [synopsis]: Fix indentation.

Hello, what 'glib-or-gtk? #t', glib-networking,
gsettings-desktop-schemas and perl are useful for?

Also I think it's better split this into 2 patches, one for update, one
for adding inputs. eg: (I also add some more inputs)

>From 31e372eb1a689a94024a8441b825b508aaa2ba37 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 10 Apr 2021 17:06:22 +0800
Subject: [PATCH] gnu: gst-plugins-base: Update to 1.18.4.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/gstreamer.scm (gst-plugins-base): Update to 1.18.4.

Signed-off-by: 宋文武 <[email-masked]>
---
 gnu/packages/gstreamer.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a13e7879dd..cc8b29adcf 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -537,7 +537,7 @@ This package provides the core library and elements.")
 (define-public gst-plugins-base
   (package
     (name "gst-plugins-base")
-    (version "1.18.2")
+    (version "1.18.4")
     (source
      (origin
       (method url-fetch)
@@ -545,7 +545,7 @@ This package provides the core library and elements.")
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "1b05kg46azrxxvq42c71071lfsnc34pw4vynnkczdqi6g0gzn16x"))))
+        "08w3ivbc6n4vdds2ap6q7l8zdk9if8417nznyqidf0adm0lk5r99"))))
     (build-system meson-build-system)
     (propagated-inputs
      `(("glib" ,glib)              ;required by gstreamer-sdp-1.0.pc
-- 
2.30.0

>From 022de6b475411c1ab52fd63c4c12c4327cf2f4eb Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 10 Apr 2021 18:17:01 +0800
Subject: [PATCH 2/2] gnu: gst-plugins-base: Enable more features.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/gstreamer.scm (gst-plugins-base)
[inputs]: Add graphene, iso-codes, libgudev, libjpeg-turbo, libpng,
libvisual, mesa, wayland-protocols, wayland.
[native-inputs]: Add gettext-minimal and xorg-server-for-test.
[arguments]: Remove '-Dgl=disabled' from configure flags.  Add pre-check phase.

Signed-off-by: Leo Prikler <[email-masked]>
Co-authored-by: 宋文武 <[email-masked]>
---
 gnu/packages/gstreamer.scm | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 1e9f5444a7..0b5f14342e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -559,6 +559,7 @@ This package provides the core library and elements.")
              '()
              `(("orc" ,orc)))))         ;required by gstreamer-audio-1.0.pc
     (inputs
+     ;; TODO: Add libvorbisidec
      `(("cdparanoia" ,cdparanoia)
        ("pango" ,pango)
        ("libogg" ,libogg)
@@ -569,21 +570,43 @@ This package provides the core library and elements.")
        ("libXext" ,libxext)
        ("libxv" ,libxv)
        ("alsa-lib" ,alsa-lib)
-       ("opus" ,opus)))
+       ("opus" ,opus)
+       ("graphene" ,graphene)
+       ("iso-codes" ,iso-codes)
+       ("libgudev" ,libgudev)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("libvisual" ,libvisual)
+       ("mesa" ,mesa)
+       ("wayland-protocols" ,wayland-protocols)
+       ("wayland" ,wayland)))
     (native-inputs
-      `(("pkg-config" ,pkg-config)
-        ("glib:bin" ,glib "bin")
-        ("gobject-introspection" ,gobject-introspection)
-        ("python-wrapper" ,python-wrapper)))
+     `(("pkg-config" ,pkg-config)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("python-wrapper" ,python-wrapper)
+       ("gettext" ,gettext-minimal)
+       ("xorg-server" ,xorg-server-for-tests)))
     (arguments
-     `(#:configure-flags '("-Dgl=disabled")
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          ,@%common-gstreamer-phases
          (add-before 'configure 'patch
            (lambda _
              (substitute* "tests/check/libs/pbutils.c"
                (("/bin/sh") (which "sh")))
+             #t))
+         (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)))))
     (home-page "https://gstreamer.freedesktop.org/")
     (synopsis
-- 
2.30.0

What do you think, thanks!