unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: 51534@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#51534] [PATCH v5] gnu: Add smplayer v21.10.0.
Date: Sun, 28 Nov 2021 14:24:41 +0100	[thread overview]
Message-ID: <20211128132440.16482-1-attila@lendvai.name> (raw)
In-Reply-To: <20211101005935.8731-1-attila@lendvai.name>

* gnu/packages/video.scm (smplayer): New variable.
---

v5 moves smplayer below mvp.

as for PATH: it uses some heuristics to find the media player backend
binary (Helper::findExecutable), so patching it is not trivial. i
think it's more resilient to future changes to wrap it and set the PATH.

 gnu/packages/video.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ff1abb308f..ede085fe78 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -100,6 +100,7 @@ (define-module (gnu packages video)
   #: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)
@@ -2213,6 +2214,65 @@ (define-public mpv
 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))
 
-- 
2.33.0





  parent reply	other threads:[~2021-11-28 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  0:59 [bug#51534] [PATCH] gnu: Add smplayer Attila Lendvai
2021-11-01  1:04 ` [bug#51534] [PATCH v2] " Attila Lendvai
2021-11-28  9:17   ` Liliana Marie Prikler
2021-11-28 11:30 ` [bug#51534] [PATCH v3] gnu: Add smplayer v21.10.0 Attila Lendvai
2021-11-28 12:12 ` [bug#51534] [PATCH v4] " Attila Lendvai
2021-11-28 12:39   ` Liliana Marie Prikler
2021-11-28 13:24 ` Attila Lendvai [this message]
2021-12-01 15:24   ` bug#51534: [PATCH] gnu: Add smplayer Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211128132440.16482-1-attila@lendvai.name \
    --to=attila@lendvai.name \
    --cc=51534@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).