Subject: [bug#68250] [PATCH v2] gnu: mpv: Fix pkgconfig file.

From: Hilton Chain <[email-masked]>
Date: Sat, 6 Jan 2024 12:23:49 +0800

This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53.

* gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc.

Suggested-by: 宋文武 <[email-masked]>
Change-Id: I9826d5d6c957ca3022fa326aee111edb533f05bc
---
 gnu/packages/video.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index e70aa5352e..10d46db38b 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2365,7 +2365,13 @@ (define-public mpv
               ;; and passed as linker flags, but the order in which they are added
               ;; varies.  See <https://github.com/mpv-player/mpv/issues/7855>.
               ;; Set PYTHONHASHSEED as a workaround for deterministic results.
-              (setenv "PYTHONHASHSEED" "1"))))
+              (setenv "PYTHONHASHSEED" "1")))
+          ;; mpv.pc is generated by meson.  libmpv's headers don't actually
+          ;; require these dependencies so it's safe to remove these two fields.
+          (add-after 'install 'fix-mpv.pc
+            (lambda _
+              (substitute* (string-append #$output "/lib/pkgconfig/mpv.pc")
+                (("^(Requires|Libs)\\.private:.*") "")))))
       #:configure-flags
       #~(list "-Dlibmpv=true"
               "-Dcdda=enabled"

base-commit: c0e21e523d93081153a2ffc91e5a9f06afe62b91
--
2.41.0