unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68044] [PATCH] gnu: mpv-mpris: Fix build.
@ 2023-12-26 16:38 Josselin Poiret via Guix-patches via
  2023-12-26 18:11 ` 郑俊杰
  2023-12-26 18:33 ` Zheng Junjie
  0 siblings, 2 replies; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-12-26 16:38 UTC (permalink / raw)
  To: 68044; +Cc: Josselin Poiret

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/video.scm (mpv-mpris): Use gnu-build-system again.  Include
mpv's required dependencies now that its pkg-config file requires them.  Run
tests.

Change-Id: I9de4ade633388ec42ac30019feb133ca98811ad9
---
Hi everyone,

mpv-mpris doesn't build anymore, because mpv's pkg-config file now requires
almost all of its dependencies.  I chose to simply add all of mpv's inputs, but
also to revert back to gnu-build-system, while making use of upstream's env vars
to make it as painless as possible.  Also, tests were actually not that bad so
we can enable them.

 gnu/packages/video.scm | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 6da4897a57..987bc91f4f 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -154,6 +154,7 @@ (define-module (gnu packages video)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libidn)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
@@ -2511,20 +2512,26 @@ (define-public mpv-mpris
         (file-name (git-file-name name version))
         (sha256
          (base32 "1384y8n3l0xk8hbad1nsj9ljzb1h02g3ln3jysd8bd6shbl0x4mx"))))
-    (build-system copy-build-system)
+    (build-system gnu-build-system)
     (arguments
-     '(#:install-plan
-       '(("mpris.so" "lib/"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'build
-           (lambda _
-             (setenv "CC" (which "gcc"))
-             (invoke "make"))))))
+     (list
+      #:make-flags
+      #~(list (string-append "SCRIPTS_DIR=" #$output "/lib")
+              (string-append "CC=" #$(cc-for-target)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'check
+            (lambda _
+              (setenv "MPV_MPRIS_TEST_PLAY"
+                      #$(file-append sound-theme-freedesktop
+                                     "/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"))
+              (invoke "make" "test"))))))
     (native-inputs
-     (list pkg-config))
+     (list pkg-config dbus jq playerctl socat xorg-server-for-tests xvfb-run))
     (inputs
-     (list ffmpeg glib mpv))
+     (modify-inputs (package-inputs mpv)
+       (prepend ffmpeg glib mpv)))
     (home-page "https://github.com/hoyon/mpv-mpris")
     (synopsis "MPRIS plugin for mpv")
     (description "This package provides an @dfn{MPRIS} (Media Player Remote

base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#68044] [PATCH] gnu: mpv-mpris: Fix build.
  2023-12-26 16:38 [bug#68044] [PATCH] gnu: mpv-mpris: Fix build Josselin Poiret via Guix-patches via
@ 2023-12-26 18:11 ` 郑俊杰
  2023-12-26 18:33 ` Zheng Junjie
  1 sibling, 0 replies; 5+ messages in thread
From: 郑俊杰 @ 2023-12-26 18:11 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 68044



> 在 2023年12月27日,01:57,Josselin Poiret via Guix-patches via <guix-patches@gnu.org> 写道:
> 
> From: Josselin Poiret <dev@jpoiret.xyz>
> 
> * gnu/packages/video.scm (mpv-mpris): Use gnu-build-system again.  Include
> mpv's required dependencies now that its pkg-config file requires them.  Run
> tests.
> 
> Change-Id: I9de4ade633388ec42ac30019feb133ca98811ad9
> ---
> Hi everyone,
> 
> mpv-mpris doesn't build anymore, because mpv's pkg-config file now requires
> almost all of its dependencies.  I chose to simply add all of mpv's inputs, but
> also to revert back to gnu-build-system, while making use of upstream's env vars
> to make it as painless as possible.  Also, tests were actually not that bad so
> we can enable them.
> 
> gnu/packages/video.scm | 29 ++++++++++++++++++-----------
> 1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 6da4897a57..987bc91f4f 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -154,6 +154,7 @@ (define-module (gnu packages video)
>   #:use-module (gnu packages image)
>   #:use-module (gnu packages imagemagick)
>   #:use-module (gnu packages iso-codes)
> +  #:use-module (gnu packages libcanberra)
>   #:use-module (gnu packages libidn)
>   #:use-module (gnu packages libusb)
>   #:use-module (gnu packages linux)
> @@ -2511,20 +2512,26 @@ (define-public mpv-mpris
>         (file-name (git-file-name name version))
>         (sha256
>          (base32 "1384y8n3l0xk8hbad1nsj9ljzb1h02g3ln3jysd8bd6shbl0x4mx"))))
> -    (build-system copy-build-system)
> +    (build-system gnu-build-system)
>     (arguments
> -     '(#:install-plan
> -       '(("mpris.so" "lib/"))
> -       #:phases
> -       (modify-phases %standard-phases
> -         (add-before 'install 'build
> -           (lambda _
> -             (setenv "CC" (which "gcc"))
> -             (invoke "make"))))))
> +     (list
> +      #:make-flags
> +      #~(list (string-append "SCRIPTS_DIR=" #$output "/lib")
> +              (string-append "CC=" #$(cc-for-target)))
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (delete 'configure)
> +          (replace 'check


Please care “tests?”

Like

(if tests? 
  (do-test)
  (format #t "test suite not run~%"))

> +            (lambda _
> +              (setenv "MPV_MPRIS_TEST_PLAY"
> +                      #$(file-append sound-theme-freedesktop
> +                                     "/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"))
> +              (invoke "make" "test"))))))
>     (native-inputs
> -     (list pkg-config))
> +     (list pkg-config dbus jq playerctl socat xorg-server-for-tests xvfb-run))
>     (inputs
> -     (list ffmpeg glib mpv))
> +     (modify-inputs (package-inputs mpv)
> +       (prepend ffmpeg glib mpv)))
>     (home-page "https://github.com/hoyon/mpv-mpris")
>     (synopsis "MPRIS plugin for mpv")
>     (description "This package provides an @dfn{MPRIS} (Media Player Remote
> 
> base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b
> --
> 2.41.0
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#68044] [PATCH] gnu: mpv-mpris: Fix build.
  2023-12-26 16:38 [bug#68044] [PATCH] gnu: mpv-mpris: Fix build Josselin Poiret via Guix-patches via
  2023-12-26 18:11 ` 郑俊杰
@ 2023-12-26 18:33 ` Zheng Junjie
  2023-12-27 10:15   ` [bug#68044] [PATCH v2] " Josselin Poiret via Guix-patches via
  1 sibling, 1 reply; 5+ messages in thread
From: Zheng Junjie @ 2023-12-26 18:33 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 68044


Josselin Poiret via Guix-patches via <guix-patches@gnu.org> writes:

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/video.scm (mpv-mpris): Use gnu-build-system again.  Include
> mpv's required dependencies now that its pkg-config file requires them.  Run
> tests.
>
> Change-Id: I9de4ade633388ec42ac30019feb133ca98811ad9
> ---
> Hi everyone,
>
> mpv-mpris doesn't build anymore, because mpv's pkg-config file now requires
> almost all of its dependencies.  I chose to simply add all of mpv's inputs, but
> also to revert back to gnu-build-system, while making use of upstream's env vars
> to make it as painless as possible.  Also, tests were actually not that bad so
> we can enable them.
>
>  gnu/packages/video.scm | 29 ++++++++++++++++++-----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 6da4897a57..987bc91f4f 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -154,6 +154,7 @@ (define-module (gnu packages video)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages imagemagick)
>    #:use-module (gnu packages iso-codes)
> +  #:use-module (gnu packages libcanberra)
>    #:use-module (gnu packages libidn)
>    #:use-module (gnu packages libusb)
>    #:use-module (gnu packages linux)
> @@ -2511,20 +2512,26 @@ (define-public mpv-mpris
>          (file-name (git-file-name name version))
>          (sha256
>           (base32 "1384y8n3l0xk8hbad1nsj9ljzb1h02g3ln3jysd8bd6shbl0x4mx"))))
> -    (build-system copy-build-system)
> +    (build-system gnu-build-system)
>      (arguments
> -     '(#:install-plan
> -       '(("mpris.so" "lib/"))
> -       #:phases
> -       (modify-phases %standard-phases
> -         (add-before 'install 'build
> -           (lambda _
> -             (setenv "CC" (which "gcc"))
> -             (invoke "make"))))))
> +     (list
> +      #:make-flags
> +      #~(list (string-append "SCRIPTS_DIR=" #$output "/lib")
> +              (string-append "CC=" #$(cc-for-target)))
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (delete 'configure)
> +          (replace 'check
> +            (lambda _
> +              (setenv "MPV_MPRIS_TEST_PLAY"
> +                      #$(file-append sound-theme-freedesktop
> +                                     "/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"))

And don't use file-append here, should add `sound-theme-freedesktop' to
native-inputs and use `search-input-file' to find this file.

> +              (invoke "make" "test"))))))
>      (native-inputs
> -     (list pkg-config))
> +     (list pkg-config dbus jq playerctl socat xorg-server-for-tests xvfb-run))
>      (inputs
> -     (list ffmpeg glib mpv))
> +     (modify-inputs (package-inputs mpv)
> +       (prepend ffmpeg glib mpv)))
>      (home-page "https://github.com/hoyon/mpv-mpris")
>      (synopsis "MPRIS plugin for mpv")
>      (description "This package provides an @dfn{MPRIS} (Media Player Remote
>
> base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#68044] [PATCH v2] gnu: mpv-mpris: Fix build.
  2023-12-26 18:33 ` Zheng Junjie
@ 2023-12-27 10:15   ` Josselin Poiret via Guix-patches via
  2024-02-01  6:30     ` bug#68044: " Hilton Chain via Guix-patches via
  0 siblings, 1 reply; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-12-27 10:15 UTC (permalink / raw)
  To: Zheng Junjie, Josselin Poiret; +Cc: 68044

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/video.scm (mpv-mpris): Use gnu-build-system again.  Include
mpv's required dependencies now that its pkg-config file requires them.  Run
tests.

Change-Id: I9de4ade633388ec42ac30019feb133ca98811ad9
---

Hi Zheng,

Thanks for the speedy review!  Good catches, seems I've been slacking off too
much… Here is an updated patch.

Best,

 gnu/packages/video.scm | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 6da4897a57..25004155f0 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -154,6 +154,7 @@ (define-module (gnu packages video)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libidn)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
@@ -2511,20 +2512,38 @@ (define-public mpv-mpris
         (file-name (git-file-name name version))
         (sha256
          (base32 "1384y8n3l0xk8hbad1nsj9ljzb1h02g3ln3jysd8bd6shbl0x4mx"))))
-    (build-system copy-build-system)
+    (build-system gnu-build-system)
     (arguments
-     '(#:install-plan
-       '(("mpris.so" "lib/"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'build
-           (lambda _
-             (setenv "CC" (which "gcc"))
-             (invoke "make"))))))
+     (list
+      #:make-flags
+      #~(list (string-append "SCRIPTS_DIR=" #$output "/lib")
+              (string-append "CC=" #$(cc-for-target)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'check
+            (lambda* (#:key inputs native-inputs tests? #:allow-other-keys)
+              (if tests?
+                  (begin
+                    (setenv
+                     "MPV_MPRIS_TEST_PLAY"
+                     (search-input-file
+                      (or native-inputs inputs)
+                      "/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"))
+                    (invoke "make" "test"))
+                  (format #t "test suite not run~%")))))))
     (native-inputs
-     (list pkg-config))
+     (list pkg-config
+           dbus
+           jq
+           playerctl
+           socat
+           sound-theme-freedesktop
+           xorg-server-for-tests
+           xvfb-run))
     (inputs
-     (list ffmpeg glib mpv))
+     (modify-inputs (package-inputs mpv)
+       (prepend ffmpeg glib mpv)))
     (home-page "https://github.com/hoyon/mpv-mpris")
     (synopsis "MPRIS plugin for mpv")
     (description "This package provides an @dfn{MPRIS} (Media Player Remote

base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#68044: [PATCH v2] gnu: mpv-mpris: Fix build.
  2023-12-27 10:15   ` [bug#68044] [PATCH v2] " Josselin Poiret via Guix-patches via
@ 2024-02-01  6:30     ` Hilton Chain via Guix-patches via
  0 siblings, 0 replies; 5+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-02-01  6:30 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 68044-done, Zheng Junjie

Hi Josselin,

On Wed, 27 Dec 2023 18:15:22 +0800,
Josselin Poiret via Guix-patches via wrote:
>
> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/video.scm (mpv-mpris): Use gnu-build-system again.  Include
> mpv's required dependencies now that its pkg-config file requires them.  Run
> tests.
>
> Change-Id: I9de4ade633388ec42ac30019feb133ca98811ad9
> ---

I have applied the build system switching part as ee20e6fa2ee7, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-01  6:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-26 16:38 [bug#68044] [PATCH] gnu: mpv-mpris: Fix build Josselin Poiret via Guix-patches via
2023-12-26 18:11 ` 郑俊杰
2023-12-26 18:33 ` Zheng Junjie
2023-12-27 10:15   ` [bug#68044] [PATCH v2] " Josselin Poiret via Guix-patches via
2024-02-01  6:30     ` bug#68044: " Hilton Chain via Guix-patches via

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).