gnu: unbound: Update to 1.10.1.
[jackhill/guix/guix.git] / gnu / packages / gstreamer.scm
index 310f538..7596796 100644 (file)
@@ -8,6 +8,7 @@
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -119,8 +120,22 @@ arrays of data.")
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-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.*")
+                      ""))
+                     #t)))
+               '())
          (add-after 'install 'move-docs
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
@@ -250,7 +265,7 @@ for the GStreamer multimedia library.")
        ("libcaca" ,libcaca)
        ("libdv" ,libdv)
        ("libiec61883" ,libiec61883)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libshout" ,libshout)
        ("libsoup" ,libsoup)
@@ -269,6 +284,22 @@ for the GStreamer multimedia library.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ,@(if (string-prefix? "arm" (or (%current-target-system)
+                                         (%current-system)))
+               ;; FIXME: These tests started failing on armhf after switching to Meson.
+               ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/689
+               `((add-after 'unpack 'disable-tests-for-armhf
+                   (lambda _
+                     (substitute* "tests/check/elements/rtpbin_buffer_list.c"
+                       (("tcase_add_test \\(tc_chain, test_bufferlist\\);")
+                        ""))
+                     (substitute* "tests/check/elements/rtpulpfec.c"
+                       (("tcase_add_loop_test.*rtpulpfecdec_recovered_from_many.*")
+                        "")
+                       (("tcase_add.*rtpulpfecdec_recovered_using_recovered_packet.*")
+                        ""))
+                     #t)))
+               '())
          (add-after
           'unpack 'disable-failing-tests
           (lambda _
@@ -297,19 +328,35 @@ developers consider to have good quality code and correct functionality.")
               (sha256
                (base32
                 "0x0y0hm0ga3zqi5q4090hw5sjh59y1ry9ak16qsaascm72i7mjzi"))))
-    (outputs '("out" "doc"))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (arguments
-     '(#:tests? #f ; XXX: 13 of 53 tests fail
-       #:configure-flags
-       (list (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))))
+     `(#:phases
+       (modify-phases %standard-phases
+         ,@(if (string-prefix? "arm" (or (%current-target-system)
+                                         (%current-system)))
+               ;; Disable test that fails on ARMv7.
+               ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
+               `((add-after 'unpack 'disable-asfmux-test
+                   (lambda _
+                     (substitute* "tests/check/meson.build"
+                       (("\\[\\['elements/asfmux\\.c'\\]\\],")
+                        ""))
+                     #t)))
+               '())
+         (add-after 'unpack 'disable-failing-test
+           (lambda _
+             ;; FIXME: Why is this failing.
+             (substitute* "tests/check/meson.build"
+               ((".*elements/dash_mpd\\.c.*")
+                ""))
+             #t)))))
     (propagated-inputs
      `(("gst-plugins-base" ,gst-plugins-base)))
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
        ("gobject-introspection" ,gobject-introspection)
+       ;; TODO: Enable documentation for 1.18.
+       ;;("gtk-doc" ,gtk-doc)
        ("pkg-config" ,pkg-config)
        ("python" ,python)))
     (inputs
@@ -373,7 +420,7 @@ par compared to the rest.")
        (sha256
         (base32
          "1jpvc32x6q01zjkfgh6gmq6aaikiyfwwnhj7bmvn52syhrdl202m"))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (inputs
      `(("gst-plugins-base" ,gst-plugins-base)
        ("liba52" ,liba52)
@@ -414,9 +461,7 @@ distribution problems in some jurisdictions, e.g. due to patent threats.")
                   ;; Drop bundled ffmpeg.
                   (delete-file-recursively "gst-libs/ext/libav")
                   #t))))
-    (build-system gnu-build-system)
-    (arguments
-     '(#:configure-flags '("--with-system-libav")))
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python)))
@@ -432,6 +477,39 @@ distribution problems in some jurisdictions, e.g. due to patent threats.")
 compression formats through the use of the libav library.")
     (license license:gpl2+)))
 
+(define-public gst-editing-services
+  (package
+    (name "gst-editing-services")
+    (version "1.16.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://gstreamer.freedesktop.org/src/" name "/"
+                    "gstreamer-editing-services-" version ".tar.xz"))
+              (sha256
+               (base32
+                "05hcf3prna8ajjnqd53221gj9syarrrjbgvjcbhicv0c38csc1hf"))))
+    (build-system meson-build-system)
+    (arguments
+     ;; FIXME: 16/22 failing tests.
+     `(#:tests? #f))
+    (inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("libxml2" ,libxml2)))
+    (native-inputs
+     `(("flex" ,flex)
+       ("gst-plugins-bad" ,gst-plugins-bad)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)))
+    (home-page "https://gstreamer.freedesktop.org/")
+    (synopsis "GStreamer library for non-linear editors")
+    (description
+     "This is a high-level library for facilitating the creation of audio/video
+non-linear editors.")
+    (license license:gpl2+)))
+
 (define-public python-gst
   (package
     (name "python-gst")
@@ -443,16 +521,19 @@ compression formats through the use of the libav library.")
                     "gst-python-" version ".tar.xz"))
               (sha256
                (base32
-                "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))))
-    (build-system gnu-build-system)
+                "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))
+              (patches
+               (search-patches "python-gst-fix-build-with-python-3.8.patch"))))
+    (build-system meson-build-system)
     (arguments
-     `(#:modules ((guix build gnu-build-system)
+     `(#:modules ((guix build meson-build-system)
+                  (guix build utils)
                   ((guix build python-build-system) #:prefix python:))
-       #:imported-modules (,@%gnu-build-system-modules
+       #:imported-modules (,@%meson-build-system-modules
                            (guix build python-build-system))
        #:configure-flags
        (list (string-append
-              "--with-pygi-overrides-dir="
+              "-Dpygi-overrides-dir="
               (python:site-packages %build-inputs %outputs) "gi/overrides"))))
     (native-inputs
      `(("pkg-config" ,pkg-config)