diff options
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r-- | gnu/packages/video.scm | 154 |
1 files changed, 87 insertions, 67 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index eeabb11bcf..eec88195c7 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca> -;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> @@ -22,7 +22,7 @@ ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018 Roel Janssen <roel@gnu.org> -;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot> @@ -38,7 +38,7 @@ ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> -;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net> +;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2020 Alex McGrath <amk@amk.ie> ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net> @@ -52,6 +52,7 @@ ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name> +;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com> ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com> ;;; Copyright © 2021 Robin Templeton <robin@terpri.org> ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org> @@ -79,6 +80,7 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix hg-download) @@ -104,6 +106,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages build-tools) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages cmake) @@ -209,10 +212,15 @@ (arguments `(#:configure-flags (list - "--enable-libv4l2" + "CFLAGS=-O2 -g -fcommon" + ;; XXX: Broken API. + ;; Undeclared variables 'sys_nerr' and 'sys_errlist'. + ;; "--enable-libv4l2" "--enable-libmpeg2" "--enable-libmpeg2convert" - "--enable-v4l" + ;; XXX: Broken API. + ;; Undeclared variables 'sys_nerr' and 'sys_errlist'. + ;; "--enable-v4l" ;;; XXX: Not available. ;"--enable-bktr" ;"--enable-sunau" @@ -274,7 +282,7 @@ ("lzo" ,lzo) ("mjepgtools" ,mjpegtools) ("sdl" ,sdl) - ("v4l-utils" ,v4l-utils) + ;; ("v4l-utils" ,v4l-utils) ("x11" ,libx11) ("x264" ,libx264) ("xaw" ,libxaw) @@ -721,12 +729,22 @@ stream decoding") "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv")))) (build-system gnu-build-system) (native-inputs - `(("makeinfo" ,texinfo))) + `(("config" ,config) + ("makeinfo" ,texinfo))) (inputs `(("ncurses" ,ncurses))) (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'update-config-scripts + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.guess and config.sub. + (for-each (lambda (file) + (install-file + (search-input-file + (or native-inputs inputs) + (string-append "/bin/" file)) ".")) + '("config.guess" "config.sub")))) (replace 'configure (lambda* (#:key build inputs outputs #:allow-other-keys) ;; This old `configure' script doesn't support @@ -737,17 +755,6 @@ stream decoding") (invoke "./configure" (string-append "--prefix=" out) (string-append "--build=" build) - ;; The ancient config.guess is unable to - ;; guess the host triplet on mips64el. - ,@(if (string=? "mips64el-linux" - (%current-system)) - '("--host=mips64el-unknown-linux-gnu") - '()) - ;; The same is also true with aarch64. - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '()) (string-append "--with-ncurses=" ncurses)))))))) (home-page "http://aa-project.sourceforge.net/aalib/") @@ -1022,10 +1029,8 @@ H.264 (MPEG-4 AVC) video streams.") #t))) (add-before 'configure 'add-googletest (lambda* (#:key inputs #:allow-other-keys) - (symlink - (string-append (assoc-ref inputs "googletest") - "/include/gtest") "lib/gtest") - #t)) + (symlink (search-input-directory inputs "/include/gtest") + "lib/gtest"))) (replace 'build (lambda _ (let ((-j (list "-j" (number->string (parallel-job-count))))) @@ -1472,14 +1477,14 @@ quality and performance.") (define-public libva (package (name "libva") - (version "2.10.0") + (version "2.13.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/intel/libva/releases/download/" version "/libva-" version ".tar.bz2")) (sha256 - (base32 "0dh2zjn6wi74ga75r6pbrrj8hjm213zyxvn9bv78z0fra1dy70gs")))) + (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -2243,34 +2248,32 @@ projects while introducing many more.") ("zlib" ,zlib) ("mpv" ,mpv))) (arguments - `(#:tests? #false ; no tests - #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "CC=" ,(cc-for-target)) - ;; A KLUDGE to turn off invoking lrelease on the - ;; project for now, because it fails consistently - ;; with "WARNING: Could not find qmake spec - ;; 'default'". See below. - "LRELEASE=true") - #:phases - (modify-phases %standard-phases - (delete 'configure) - ;; Due to the above, we must run lrelease separately on each .ts file - ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire - ;; project, as the Makefile does normally without the above kludge). - (add-after 'build 'compile-ts-files - (lambda _ - (for-each (lambda (file) - (invoke "lrelease" file)) - (find-files "./" "\\.ts$")) - #true)) - (add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (mpv (assoc-ref inputs "mpv"))) - (wrap-program (string-append out "/bin/smplayer") - `("PATH" ":" prefix - ,(list (string-append mpv "/bin"))))) - #true))))) + (list #:tests? #false ; no tests + #:make-flags #~(list (string-append "PREFIX=" #$output) + (string-append "CC=" #+(cc-for-target)) + ;; A KLUDGE to turn off invoking lrelease on the + ;; project for now, because it fails consistently + ;; with "WARNING: Could not find qmake spec + ;; 'default'". See below. + "LRELEASE=true") + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + ;; Due to the above, we must run lrelease separately on each .ts file + ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire + ;; project, as the Makefile does normally without the above kludge). + (add-after 'build 'compile-ts-files + (lambda _ + (for-each (lambda (file) + (invoke "lrelease" file)) + (find-files "./" "\\.ts$")))) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mpv (assoc-ref inputs "mpv"))) + (wrap-program (string-append out "/bin/smplayer") + `("PATH" ":" prefix + ,(list (string-append mpv "/bin")))))))))) (home-page "https://www.smplayer.info") (synopsis "Complete front-end for MPlayer, a media player") (description "SMPlayer is a graphical user interface (GUI) for @@ -2643,8 +2646,7 @@ other site that youtube-dl supports.") ;; Explicitly invoke the input ffmpeg, instead of whichever one ;; happens to be in the user's $PATH at run time. (lambda* (#:key inputs #:allow-other-keys) - (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg") - "/bin/ffmpeg"))) + (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg"))) (substitute* "src/you_get/processor/ffmpeg.py" ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the ;; same string is also used when sniffing ffmpeg's output. @@ -3840,7 +3842,11 @@ Content System specification.") ;; test suite results differ depending on the country and also introduce ;; non-determinism in the tests. ;; https://github.com/mps-youtube/mps-youtube/issues/556 - `(#:tests? #f)) + '(#:tests? #f + #:phases (modify-phases %standard-phases + ;; Loading this as a library will create cache directories, + ;; etc; which fails in the build container. + (delete 'sanity-check)))) (propagated-inputs `(("python-pafy" ,python-pafy) ("python-pygobject" ,python-pygobject))) ; For mpris2 support @@ -4080,7 +4086,10 @@ post-processing of video formats like MPEG2, H.264/AVC, and VC-1.") (outputs '("out" "static")) ; 3.7MiB .a file (arguments - `(#:phases + `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors. + #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03") + + #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-dates (lambda _ @@ -4436,6 +4445,7 @@ tools for styling them, including a built-in real-time video preview.") (url "https://gitlab.gnome.org/GNOME/pitivi.git") (commit %version))) (file-name (git-file-name name version)) + (patches (search-patches "pitivi-fix-build-with-meson-0.60.patch")) (sha256 (base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah")))) (build-system meson-build-system) @@ -4447,12 +4457,12 @@ tools for styling them, including a built-in real-time video preview.") ("gst-plugins-good" ,gst-plugins-good) ("gst-plugins-bad" ,(gst-plugins/selection gst-plugins-bad - #:plugins '("debugutils" "transcoder") + #:plugins '("debugutils" "transcode") #:configure-flags '("-Dintrospection=enabled"))) ("gst-libav" ,gst-libav) ("gsound" ,gsound) ("gtk+" ,gtk+) - ("gdk-pixbuf+svg" ,gdk-pixbuf+svg) + ("librsvg" ,librsvg) ("libpeas" ,libpeas) ("libnotify" ,libnotify) ("pango" ,pango) @@ -4468,6 +4478,9 @@ tools for styling them, including a built-in real-time video preview.") ("pkg-config" ,pkg-config))) (arguments `(#:glib-or-gtk? #t + ;; Pitivi is not yet compatible with Meson 0.60: + ;; https://gitlab.gnome.org/GNOME/pitivi/-/issues/2593 + #:meson ,meson-0.59 #:phases (modify-phases %standard-phases (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies @@ -4475,7 +4488,7 @@ tools for styling them, including a built-in real-time video preview.") (let ((prog (string-append (assoc-ref outputs "out") "/bin/pitivi"))) (wrap-program prog - `("PYTHONPATH" = (,(getenv "PYTHONPATH"))) + `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))) `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))) ;; We've only added inputs for what Pitivi deems either ;; necessary or optional. Let the user's packages take @@ -4802,9 +4815,8 @@ create smoother and stable videos.") (setenv "ZMQDIR" (assoc-ref inputs "zeromq")) (setenv "UNITTEST_DIR" - (string-append (assoc-ref inputs "unittest++") - "/include/UnitTest++")) - #t))))) + (search-input-directory inputs + "include/UnitTest++"))))))) (home-page "https://openshot.org") (synopsis "Video-editing, animation, and playback library") (description "OpenShot Library (libopenshot) is a powerful C++ video @@ -5045,6 +5057,13 @@ video from a Wayland session.") `(#:tests? #f ; Tests seem to require networking. #:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-builtin-byte-compilation + (lambda _ + ;; The setup.py script attempts to compile bytecode and fails. + ;; We compile bytecode in a separate phase, so just disable it. + (substitute* "setup.py" + (("distutils\\.util\\.byte_compile\\(.*") + "")))) ;; gaupol's setup.py script does not support one of the Python build ;; system's default flags, "--single-version-externally-managed". (replace 'install @@ -5059,8 +5078,7 @@ video from a Wayland session.") (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) (wrap-program (string-append out "/bin/gaupol") `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)) - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) - #t)) + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))) (add-after 'unpack 'patch-data-dir ;; Fix some path variables that setup.py seems to garble. (lambda* (#:key outputs #:allow-other-keys) @@ -5069,8 +5087,7 @@ video from a Wayland session.") (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)") (string-append "DATA_DIR = '" out "/share/gaupol'\"")) (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)") - (string-append "LOCALE_DIR = '" out "/share/locale'\""))) - #t)))))) + (string-append "LOCALE_DIR = '" out "/share/locale'\""))))))))) (synopsis "Editor for text-based subtitles") (description "Gaupol supports multiple subtitle file formats and provides means of @@ -5226,6 +5243,8 @@ on supporting video-on-demand and live encoding on Intel Xeon processors.") (sha256 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags '("CFLAGS=-O2 -g -fcommon"))) (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels") (description "This is a small command line utility used to perform frequency scans for @@ -5342,7 +5361,8 @@ for cases where libaom (the reference encoder) is too slow.") (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t)) (inputs - `(("gtk+" ,gtk+))) + `(("gtk+" ,gtk+) + ("python" ,python-wrapper))) (native-inputs `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database ("gettext" ,gettext-minimal) |