summary refs log tree commit diff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorAttila Lendvai <attila@lendvai.name>2021-11-28 14:24:41 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-01 17:51:38 +0100
commita955e4d7f6843bd7dc804ea69ccdef953f4780bc (patch)
tree4596fd04805b389ecd2c8389d3899420d5f4bf10 /gnu/packages/video.scm
parent5ff34d596db98ad168f606dac6a6330faa7a52e8 (diff)
downloadguix-a955e4d7f6843bd7dc804ea69ccdef953f4780bc.tar.gz
gnu: Add smplayer.
* gnu/packages/video.scm (smplayer): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 8761e20294..74c0759846 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -101,6 +101,7 @@
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages cdrom)
@@ -2221,6 +2222,65 @@ fork of mplayer2 and MPlayer.  It shares some features with the former
 projects while introducing many more.")
     (license license:gpl2+)))
 
+(define-public smplayer
+  (package
+    (name "smplayer")
+    (version "21.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/smplayer/SMPlayer/" version
+                    "/smplayer-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("bash-minimal" ,bash-minimal)
+       ("qtbase" ,qtbase-5)
+       ("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)))))
+    (home-page "https://www.smplayer.info")
+    (synopsis "Complete front-end for MPlayer, a media player")
+    (description "SMPlayer is a graphical user interface (GUI) for
+MPlayer, which is capable of playing almost all known video and audio
+formats.  Apart from providing access for the most common and useful
+options of MPlayer, SMPlayer adds other interesting features like the
+possibility to play Youtube videos, download subtitles, remember
+the last played position, etc.")
+    (license license:gpl2+)))
+
 (define-public gnome-mpv
   (deprecated-package "gnome-mpv" celluloid))