GNU bug report logs - #68044
[PATCH] gnu: mpv-mpris: Fix build.

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Tue, 26 Dec 2023 17:57:02 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68044 in the body.
You can then email your comments to 68044 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68044; Package guix-patches. (Tue, 26 Dec 2023 17:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Poiret <dev <at> jpoiret.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 26 Dec 2023 17:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH] gnu: mpv-mpris: Fix build.
Date: Tue, 26 Dec 2023 17:38:43 +0100
From: Josselin Poiret <dev <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#68044; Package guix-patches. (Tue, 26 Dec 2023 18:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 68044 <at> debbugs.gnu.org (full text, mbox):

From: 郑俊杰 <zhengjunjie <at> yandex.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 68044 <at> debbugs.gnu.org
Subject: Re: [bug#68044] [PATCH] gnu: mpv-mpris: Fix build.
Date: Wed, 27 Dec 2023 02:11:34 +0800

> 在 2023年12月27日,01:57,Josselin Poiret via Guix-patches via <guix-patches <at> gnu.org> 写道:
> 
> From: Josselin Poiret <dev <at> 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
> 
> 
> 
> 





Information forwarded to guix-patches <at> gnu.org:
bug#68044; Package guix-patches. (Tue, 26 Dec 2023 18:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 68044 <at> debbugs.gnu.org (full text, mbox):

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 68044 <at> debbugs.gnu.org
Subject: Re: [bug#68044] [PATCH] gnu: mpv-mpris: Fix build.
Date: Wed, 27 Dec 2023 02:33:18 +0800
Josselin Poiret via Guix-patches via <guix-patches <at> gnu.org> writes:

> From: Josselin Poiret <dev <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#68044; Package guix-patches. (Wed, 27 Dec 2023 10:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 68044 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>, Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 68044 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: mpv-mpris: Fix build.
Date: Wed, 27 Dec 2023 11:15:22 +0100
From: Josselin Poiret <dev <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#68044; Package guix-patches. (Fri, 05 Jan 2024 05:10:03 GMT) Full text and rfc822 format available.

Message #17 received at 68044 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Andrew Tropin <andrew <at> trop.in>
Cc: 68044 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz>,
 Zheng Junjie <zhengjunjie <at> iscas.ac.cn>, 68250 <at> debbugs.gnu.org,
 67814 <at> debbugs.gnu.org
Subject: Re: bug#67814: [PATCH 0/3] gnu: mpv: Update to 0.37.0.
Date: Fri, 05 Jan 2024 13:09:17 +0800
Hi,

On Mon, 25 Dec 2023 19:33:41 +0800,
Andrew Tropin wrote:
>
> Hi Hilton!
>
> It seem the mpv update breaks mpv-mpris build.  I didn't dive into
> issue yet, only tried to revert this patch.

It's because mpv's pkgconfig file (for libmpv) now includes all its
dependencies in Requires.private.  Sorry that I didn't check all the
dependent packages.

Josselin has sent bug#68044, which adds mpv's inputs to mpv-mpris.

However there're actually other packages depend on libmpv, so I think
the proper fix is to split libmpv from the mpv package and propagate
inputs in a new package (as mpv users are likely to include mpv in
their profiles, thus these propagated inputs are usually unwanted).

I tried to add a "lib" output for mpv first but there would be cycles.
As a result, I disabled libmpv in mpv, added a libmpv package which
inherits from mpv, and sent it to bug#68250.

Thanks




Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Thu, 01 Feb 2024 06:31:01 GMT) Full text and rfc822 format available.

Notification sent to Josselin Poiret <dev <at> jpoiret.xyz>:
bug acknowledged by developer. (Thu, 01 Feb 2024 06:31:02 GMT) Full text and rfc822 format available.

Message #22 received at 68044-done <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 68044-done <at> debbugs.gnu.org, Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
Subject: Re: [bug#68044] [PATCH v2] gnu: mpv-mpris: Fix build.
Date: Thu, 01 Feb 2024 14:30:24 +0800
Hi Josselin,

On Wed, 27 Dec 2023 18:15:22 +0800,
Josselin Poiret via Guix-patches via wrote:
>
> From: Josselin Poiret <dev <at> 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!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 29 Feb 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.