Message ID | 14315fb383a6560c67bdc6bf3f7cab8b8e36e0bb.1704514279.git.hako@ultrarare.space |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 12DAF27BBEA; Sat, 6 Jan 2024 04:30:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 618C627BBE2 for <patchwork@mira.cbaines.net>; Sat, 6 Jan 2024 04:30:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rLyK0-00033O-LW; Fri, 05 Jan 2024 23:30:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rLyJz-00033D-AX for guix-patches@gnu.org; Fri, 05 Jan 2024 23:30:07 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rLyJz-0001Tt-0c; Fri, 05 Jan 2024 23:30:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rLyJt-0001C0-Oy; Fri, 05 Jan 2024 23:30:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68250] [PATCH v2] gnu: mpv: Fix pkgconfig file. Resent-From: Hilton Chain <hako@ultrarare.space> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: hako@ultrarare.space, iyzsong@member.fsf.org, lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, jgart@dismail.de, andrew@trop.in, dev@jpoiret.xyz, zhengjunjie@iscas.ac.cn, guix-patches@gnu.org Resent-Date: Sat, 06 Jan 2024 04:30:01 +0000 Resent-Message-ID: <handler.68250.B68250.17045153824532@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68250 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68250@debbugs.gnu.org Cc: Hilton Chain <hako@ultrarare.space>, =?utf-8?b?5a6L5paH5q2m?= <iyzsong@member.fsf.org>, Hilton Chain <hako@ultrarare.space>, =?utf-8?b?5a6L5paH5q2m?= <iyzsong@member.fsf.org>, Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>, Munyoki Kilyungi <me@bonfacemunyoki.com>, jgart <jgart@dismail.de>, Andrew Tropin <andrew@trop.in>, Josselin Poiret <dev@jpoiret.xyz>, Zheng Junjie <zhengjunjie@iscas.ac.cn> X-Debbugs-Original-Xcc: Hilton Chain <hako@ultrarare.space>, =?utf-8?b?5a6L?= =?utf-8?b?5paH5q2m?= <iyzsong@member.fsf.org>, Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>, Munyoki Kilyungi <me@bonfacemunyoki.com>, jgart <jgart@dismail.de>, Andrew Tropin <andrew@trop.in>, Josselin Poiret <dev@jpoiret.xyz>, Zheng Junjie <zhengjunjie@iscas.ac.cn> Received: via spool by 68250-submit@debbugs.gnu.org id=B68250.17045153824532 (code B ref 68250); Sat, 06 Jan 2024 04:30:01 +0000 Received: (at 68250) by debbugs.gnu.org; 6 Jan 2024 04:29:42 +0000 Received: from localhost ([127.0.0.1]:58278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rLyJZ-0001B2-Uc for submit@debbugs.gnu.org; Fri, 05 Jan 2024 23:29:42 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:37398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <hako@ultrarare.space>) id 1rLyJW-0001Ar-KF for 68250@debbugs.gnu.org; Fri, 05 Jan 2024 23:29:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1704515341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZYosqGfqk6F3FwxXQYoJh7Z7payyadTyszvFwkdJ2gg=; b=E+BXHadBndU2pZ8nX3oT4iO6wK6cYUxetJ/qnoS449zUKym1XzsvEDATqj2rDRIFQd14zb 4NTTdWpGKD81pCZfm/VzEPhAbdpfZBVu+RLE9S0uWgBa3mBQ/tqyfKwTAAn1M2dJo155+e DzgP1XZVXc4ezydSk1uxDSNwRiFcflYux6/ox1WXWWIyl4kYlG5tI8siA/52uheO5vSgvi ti5TWM2wN2O6GXwepUV97bIVNZav3hqKHsklEI92BVKrnORSKaoWZzKpPHBHA4+wSiW9M+ xcwJnQIVObilmaHJtcHap8RrAtPpa/WOKzf17kzHxQF1jXCMGyW1qnnlwWOmGg== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Date: Sat, 6 Jan 2024 12:23:49 +0800 Message-ID: <14315fb383a6560c67bdc6bf3f7cab8b8e36e0bb.1704514279.git.hako@ultrarare.space> In-Reply-To: <521d0ba6e3d10b3b8aa98b35862d819c82223412.1704430613.git.hako@ultrarare.space> References: <521d0ba6e3d10b3b8aa98b35862d819c82223412.1704430613.git.hako@ultrarare.space> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Hilton Chain <hako@ultrarare.space> X-ACL-Warn: , Hilton Chain via Guix-patches <guix-patches@gnu.org> From: Hilton Chain via Guix-patches via <guix-patches@gnu.org> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#68250,v2] gnu: mpv: Fix pkgconfig file.
|
|
Commit Message
Hilton Chain
Jan. 6, 2024, 4:23 a.m. UTC
This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53. * gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc. Suggested-by: 宋文武 <iyzsong@member.fsf.org> Change-Id: I9826d5d6c957ca3022fa326aee111edb533f05bc --- gnu/packages/video.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) base-commit: c0e21e523d93081153a2ffc91e5a9f06afe62b91 -- 2.41.0
Comments
Hi Hilton, Hilton Chain <hako@ultrarare.space> writes: > This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53. > > * gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc. Does this completely replace the previous patch, instead of augmenting it? Best,
Hi Josselin, On Thu, 11 Jan 2024 02:24:16 +0800, Josselin Poiret wrote: > > [1 <text/plain (quoted-printable)>] > Hi Hilton, > > Hilton Chain <hako@ultrarare.space> writes: > > > This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53. > > > > * gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc. > > Does this completely replace the previous patch, instead of augmenting it? Yes! I should clarify this before.
Hi, Hilton Chain <hako@ultrarare.space> writes: > This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53. > > * gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc. > > Suggested-by: 宋文武 <iyzsong@member.fsf.org> > 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" I've just seen this, after pushing a hot fix as f3fdb4e041cb5740ba0b38b9ad017571f8414d33, which propagates all listed libraries in Requires.private. I suppose that someone wanting to build something statically from mpv would benefit from having the original mpv.pc file without modifications. Perhaps we can try it out for a bit, and if the propagation causes problems, we can fall-back to this change here?
Hi Maxim, On Fri, 19 Jan 2024 10:05:41 +0800, Maxim Cournoyer wrote: > > Hi, > > Hilton Chain <hako@ultrarare.space> writes: > > > This is a follow-up to ce7b2b57aa6da0ceace94ea5fb42392c7ff97d53. > > > > * gnu/packages/video.scm (mpv)[arguments]<#:phases>: Add 'fix-mpv.pc. > > > > Suggested-by: 宋文武 <iyzsong@member.fsf.org> > > 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" > > I've just seen this, after pushing a hot fix as > f3fdb4e041cb5740ba0b38b9ad017571f8414d33, which propagates all listed > libraries in Requires.private. > > I suppose that someone wanting to build something statically from mpv > would benefit from having the original mpv.pc file without > modifications. > > Perhaps we can try it out for a bit, and if the propagation causes > problems, we can fall-back to this change here? Then we should follow the approach in v1 to add libmpv as a separate package. I'll send v3 later. Thanks
Hi Hilton, [...] >> I've just seen this, after pushing a hot fix as >> f3fdb4e041cb5740ba0b38b9ad017571f8414d33, which propagates all listed >> libraries in Requires.private. >> >> I suppose that someone wanting to build something statically from mpv >> would benefit from having the original mpv.pc file without >> modifications. >> >> Perhaps we can try it out for a bit, and if the propagation causes >> problems, we can fall-back to this change here? > > > Then we should follow the approach in v1 to add libmpv as a separate package. > I'll send v3 later. Actually I don't think we need to split out a library for mpv here; there are two things we can do in the short term: 1. Build MPV strictly as a shared library (-Dbuild=shared) or something in Meson. Then Meson doesn't output all these Requires.private dependencies, which are only useful for static linking, and which pkg-config confusingly uses for its --exists check. 2. On core-updates, I've been experimenting with replacing pkg-config with pkgconf, which seems to be designed better for avoiding the above pkg-config's pitfall. Currently stuck on a hard to understand cycle.
Hi Hilton, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Hi Hilton, > > [...] > >>> I've just seen this, after pushing a hot fix as >>> f3fdb4e041cb5740ba0b38b9ad017571f8414d33, which propagates all listed >>> libraries in Requires.private. >>> >>> I suppose that someone wanting to build something statically from mpv >>> would benefit from having the original mpv.pc file without >>> modifications. >>> >>> Perhaps we can try it out for a bit, and if the propagation causes >>> problems, we can fall-back to this change here? >> >> >> Then we should follow the approach in v1 to add libmpv as a separate package. >> I'll send v3 later. > > Actually I don't think we need to split out a library for mpv here; > there are two things we can do in the short term: > > 1. Build MPV strictly as a shared library (-Dbuild=shared) or something > in Meson. Then Meson doesn't output all these Requires.private > dependencies, which are only useful for static linking, and which > pkg-config confusingly uses for its --exists check. > > 2. On core-updates, I've been experimenting with replacing pkg-config > with pkgconf, which seems to be designed better for avoiding the above > pkg-config's pitfall. Currently stuck on a hard to understand cycle. I've implemented 2. above; see: <https://issues.guix.gnu.org/68813>, which removes the need to propagate pkg-config *.private fields, which should only be needed when doing static builds. I'm thus closing this issue. Let me know if I've missed anything!
Hi Maxim, On Tue, 27 Feb 2024 00:01:31 +0800, Maxim Cournoyer wrote: > > Hi Hilton, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > > > Hi Hilton, > > > > [...] > > > >>> I've just seen this, after pushing a hot fix as > >>> f3fdb4e041cb5740ba0b38b9ad017571f8414d33, which propagates all listed > >>> libraries in Requires.private. > >>> > >>> I suppose that someone wanting to build something statically from mpv > >>> would benefit from having the original mpv.pc file without > >>> modifications. > >>> > >>> Perhaps we can try it out for a bit, and if the propagation causes > >>> problems, we can fall-back to this change here? > >> > >> > >> Then we should follow the approach in v1 to add libmpv as a separate package. > >> I'll send v3 later. > > > > Actually I don't think we need to split out a library for mpv here; > > there are two things we can do in the short term: > > > > 1. Build MPV strictly as a shared library (-Dbuild=shared) or something > > in Meson. Then Meson doesn't output all these Requires.private > > dependencies, which are only useful for static linking, and which > > pkg-config confusingly uses for its --exists check. > > > > 2. On core-updates, I've been experimenting with replacing pkg-config > > with pkgconf, which seems to be designed better for avoiding the above > > pkg-config's pitfall. Currently stuck on a hard to understand cycle. > > I've implemented 2. above; see: <https://issues.guix.gnu.org/68813>, > which removes the need to propagate pkg-config *.private fields, which > should only be needed when doing static builds. > > I'm thus closing this issue. Let me know if I've missed anything! Great to see! Thank you very much!
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"