From 5ab9cf514339d644b1aa2620196ddc08159e29d4 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 11 Jun 2020 08:40:14 -0400 Subject: [PATCH 32/54] gnu: gst-plugins-base: Update package definition. * gnu/packages/gstreamer.scm (gst-plugins-base): Update package definition. [outputs]: New output 'doc'. [arguments]<#:glib-or-gtk?>: New argument. <#:configure-flags>[-Dgl]: Remove flag. [-Ddoc]: Remove flag. <#:phases>['patch]: Remove phase. ['patch-docbook-xml]: New phase. ['patch-tests]: New phase. ['pre-check]: New phase. ['move-doc]: New phase. [native-inputs]: Add docbook-xml, gettext-minimal, gtk-doc, gsettings-desktop- schemas, perl, libxml2 and xorg-server-for-tests. [inputs]: Add gdk-pixbuf+svg, glu, graphene, gtk+, iso-codes, libgudev, libjpeg- turbo, libvisual, libxshmfence, mesa, sdl and wayland. Remove arguments for opus. [propagated-inputs]: Add glib-networking. Remove arguments for orc. [synopsis]: Modify. [description]: Modify. --- gnu/packages/gstreamer.scm | 131 ++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 46 deletions(-) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 2c6f478316..5d08a423d3 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -54,6 +54,7 @@ #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages image) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) @@ -347,61 +348,99 @@ processing.") (source (origin (method url-fetch) - (uri (string-append "https://gstreamer.freedesktop.org/src/" name "/" - name "-" version ".tar.xz")) + (uri + (string-append "https://gstreamer.freedesktop.org/src/" name "/" + name "-" version ".tar.xz")) (sha256 - (base32 - "0sl1hxlyq46r02k7z70v09vx1gi4rcypqmzra9jid93lzvi76gmi")))) + (base32 "0sl1hxlyq46r02k7z70v09vx1gi4rcypqmzra9jid93lzvi76gmi")))) (build-system meson-build-system) - (propagated-inputs - `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc - ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc - - ;; XXX: Do not enable Orc optimizations on ARM systems because - ;; it leads to two test failures. - ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683 - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) - '() - `(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc - (inputs - `(("cdparanoia" ,cdparanoia) - ("pango" ,pango) - ("libogg" ,libogg) - ("libtheora" ,libtheora) - ("libvorbis" ,libvorbis) - ("libx11" ,libx11) - ("zlib" ,zlib) - ("libXext" ,libxext) - ("libxv" ,libxv) - ("alsa-lib" ,alsa-lib) - ;; XXX Don't build with opus on 32-bit systems: - ;; - ,@(if (target-64bit?) - `(("opus" ,opus)) - '()))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("glib:bin" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("python-wrapper" ,python-wrapper))) + (outputs '("out" "doc")) (arguments - '(#:configure-flags '("-Dgl=disabled" - ;; FIXME: Documentation fails to build without - ;; enabling GL above, which causes other problems. - "-Ddoc=false") + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas #:phases (modify-phases %standard-phases - (add-before 'configure 'patch + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs" + (substitute* '("libs/compiling.sgml" + "libs/gst-plugins-base-libs-docs.sgml") + (("http://www.oasis-open.org/docbook/xml/4.1.2/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) + (add-after 'unpack 'patch-tests (lambda _ (substitute* "tests/check/libs/pbutils.c" (("/bin/sh") (which "sh"))) - #t))))) + #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)) + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out "/share/gtk-doc") + (string-append doc "/share/gtk-doc")) + #t)))))) + (native-inputs + `(("docbook-xml" ,docbook-xml-4.1.2) + ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper) + ("xmllint" ,libxml2) + ("xorg-server" ,xorg-server-for-tests))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("cdparanoia" ,cdparanoia) + ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("glu" ,glu) + ("graphene" ,graphene) + ("gtk+" ,gtk+) + ("iso-codes" ,iso-codes) + ("libgudev" ,libgudev) + ("libjpeg" ,libjpeg-turbo) + ("libogg" ,libogg) + ("libtheora" ,libtheora) + ("libvisual" ,libvisual) + ("libvorbis" ,libvorbis) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxshm" ,libxshmfence) + ("libxv" ,libxv) + ("mesa" ,mesa) + ("opus" ,opus) + ("pango" ,pango) + ("sdl" ,sdl) + ("wayland" ,wayland) + ("zlib" ,zlib))) + (propagated-inputs + `(("glib" ,glib) + ("glib-networking" ,glib-networking) + ("gstreamer" ,gstreamer) + ("orc" ,orc))) + (synopsis "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.") (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.") (license license:lgpl2.0+))) (define-public gst-plugins-good -- 2.26.2