Subject: [PATCH 03/22] gnu: gst-plugins-base: Update to 1.18.4.

From: Raghav Gururajan <[email-masked]>
Date: Wed, 7 Apr 2021 16:42:18 -0400

* 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]: Modify.
[description]: Modify.
---
 gnu/packages/gstreamer.scm | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 72a03c9e8e..d6b2013f97 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -536,7 +536,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)
@@ -544,10 +544,11 @@ 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
+     `(("glib" ,glib)                ;required by gstreamer-sdp-1.0.pc
+       ("glib-networking" ,glib-networking)
        ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
 
        ;; XXX: Do not enable Orc optimizations on ARM systems because
@@ -574,12 +575,16 @@ This package provides the core library and elements.")
              `(("opus" ,opus))
              '())))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
+     `(("gettext" ,gettext-minimal)
        ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
-       ("python-wrapper" ,python-wrapper)))
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python-wrapper" ,python-wrapper)
+       ("xorg-server" ,xorg-server-for-tests)))
     (arguments
-     `(#:configure-flags '("-Dgl=disabled")
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
        #:phases
        (modify-phases %standard-phases
          ,@%common-gstreamer-phases
@@ -587,12 +592,25 @@ This package provides the core library and elements.")
            (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
-     "Plugins for the GStreamer multimedia library")
-    (description "This package provides an essential exemplary set of plug-ins
-for the GStreamer multimedia library.")
+     "GStreamer plugins and helper libraries")
+    (description "Gst-Plugins-Base is a well-groomed and well-maintained
+collection of GStreamer plug-ins and elements, spanning the range of possible
+types of elements one would want to write for GStreamer.")
     (license license:lgpl2.0+)))
 
 (define-public gst-plugins-good
-- 
2.31.1