guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51534] [PATCH v4] gnu: Add smplayer v21.10.0.


From: Liliana Marie Prikler
Subject: [bug#51534] [PATCH v4] gnu: Add smplayer v21.10.0.
Date: Sun, 28 Nov 2021 13:39:02 +0100
User-agent: Evolution 3.34.2

Am Sonntag, den 28.11.2021, 13:12 +0100 schrieb Attila Lendvai:
> * gnu/packages/video.scm (smplayer): New variable.
> ---
> 
> v4 adds bash-minimal to the inputs as per guix lint. sorry for the
> miss!
> 
> there's another lint warning that i can't fix:
> 
> "smplayer@21.10.0: source not archived on Software Heritage and
> missing from the Disarchive database"
This one ought to disappear magically, as it's now queued for archival.
> and forgot to mention that v3 switched to the qt-build-system.
Don't worry too much about that; I'm the one who mentioned it first
after all.
>  gnu/packages/video.scm | 60
> ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index ff1abb308f..5cb645baac 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)
> @@ -2119,6 +2120,65 @@ (define-public mplayer
>  SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
>      (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
> +                "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22r
> c"))))
> +    (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)))))
Rather than patching PATH, you ought to rewrite the calls to exec or
whatever is used to spawn mpv.
> +    (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+)))
Description LGTM now, but perhaps you ought to move the program itself
below mpv.

Cheers






reply via email to

[Prev in Thread] Current Thread [Next in Thread]