From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 68813@debbugs.gnu.org
Cc: "Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
"Efraim Flashner" <efraim@flashner.co.il>,
"Ekaitz Zarraga" <ekaitz@elenq.tech>,
"Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#68813] [core-updates PATCH 08/20] gnu: pkg-config: Alias to pkgconf-as-pkg-config.
Date: Thu, 22 Feb 2024 11:10:07 -0500 [thread overview]
Message-ID: <f6f3b6c5b58a2d16b3ccb947bbaffa65cac48b1a.1708618218.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <cover.1708618218.git.maxim.cournoyer@gmail.com>
This switches the default pkg-config implementation used in Guix to pkgconf.
* gnu/packages/pkg-config.scm (pkg-config): Define as pkgconf-as-pkg-config.
(%pkgconf-with-tests): Renamed from %pkgconf.
(%pkgconf): New minimal variant to avoid circular dependencies for bootstrap
sensitive packages.
(%pkgconf-as-pkg-config): Delete now inherited hidden property.
* gnu/packages/commencement.scm (make-gnu-make-final): Replace %pkg-config
with %pkgconf-as-pkg-config.
Change-Id: Id2b9f40f8f09babae9c6dfc47d1de071ce78e011
---
gnu/packages/commencement.scm | 13 ++++++-------
gnu/packages/pkg-config.scm | 25 +++++++++++++++++++++----
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 3e5e21ca03..e9474a797e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3346,13 +3346,13 @@ (define with-boot5 with-boot4)
(define (make-gnu-make-final)
"Compute the final GNU Make, which uses the final Guile."
+ ;; Avoid a circular dependency by creating a new bootstrap pkg-config
+ ;; variant.
(let ((pkg-config (package
- (inherit %pkg-config) ;the native pkg-config
- (inputs `(("guile" ,guile-final)
- ,@(%boot5-inputs)))
- (arguments
- `(#:implicit-inputs? #f
- ,@(package-arguments %pkg-config))))))
+ ;; Refer to %pkgconf-as-pkg-config instead of
+ ;; pkgconf-as-pkg-config to ensure native package is
+ ;; used.
+ (inherit (with-boot5 %pkgconf-as-pkg-config)))))
(package
(inherit (package-with-bootstrap-guile gnu-make))
(inputs `(("guile" ,guile-final)
@@ -3362,7 +3362,6 @@ (define (make-gnu-make-final)
`(#:implicit-inputs? #f
,@(package-arguments gnu-make))))))
-
(define coreutils-final
;; The final Coreutils. Treat them specially because some packages, such as
;; Findutils, keep a reference to the Coreutils they were built with.
diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index e8d63be3d7..934449aad2 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -31,7 +31,9 @@ (define-module (gnu packages pkg-config)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (guix memoization)
- #:export (pkg-config
+ #:use-module (srfi srfi-1)
+ #:export (old-pkg-config ;the original
+ pkg-config ;alias for pkgconf-as-pkg-config
pkgconf
pkgconf-as-pkg-config))
@@ -89,7 +91,9 @@ (define-public %pkg-config
it can be used for defining the location of documentation tools, for
instance.")))
-(define-public %pkgconf
+;;; This is the package exposed to the CLI, to ease updates via 'guix
+;;; refresh'.
+(define-public %pkgconf-with-tests
(package
(name "pkgconf")
(version "2.1.0")
@@ -119,6 +123,13 @@ (define-public %pkgconf
pkgconf.")
(license isc)))
+;;; This is the minimal, untested variant used to avoid circular dependencies.
+(define-public %pkgconf
+ (hidden-package
+ (package/inherit %pkgconf-with-tests
+ (arguments (list #:tests? #f))
+ (native-inputs '()))))
+
(define-public %pkgconf-as-pkg-config
(package/inherit %pkgconf
(name "pkgconf-as-pkg-config")
@@ -145,7 +156,8 @@ (define-public %pkgconf-as-pkg-config
(string-append #$output "/share/aclocal"))))))))
(native-inputs '())
(inputs (list %pkgconf))
- (propagated-inputs '())))
+ (propagated-inputs '())
+ (properties (alist-delete 'hidden? (package-properties %pkgconf)))))
\f
;;;
@@ -220,7 +232,7 @@ (define pkgconf-as-pkg-config-for-target
;; These are a hacks for automatically choosing the native or the cross
;; `pkg-config' depending on whether it's being used in a cross-build
;; environment or not.
-(define-syntax pkg-config
+(define-syntax old-pkg-config
(identifier-syntax (pkg-config-for-target (%current-target-system))))
(define-syntax pkgconf
@@ -230,6 +242,11 @@ (define-syntax pkgconf-as-pkg-config
(identifier-syntax (pkgconf-as-pkg-config-for-target
(%current-target-system))))
+;;; This alias is to ensure we use pkgconf instead of pkg-config across Guix,
+;;; which includes welcome refinements such as proper handling of the
+;;; Requires.private field.
+(define pkg-config pkgconf-as-pkg-config)
+
\f
;;;
;;; pkg-config packages for native use (build-time only).
--
2.41.0
next prev parent reply other threads:[~2024-02-22 16:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 4:26 [bug#68813] [PATCH 1/5] gnu: Add atf Maxim Cournoyer
2024-02-22 16:09 ` [bug#68813] [core-updates PATCH 00/20] Replace pkg-config with pkgconf to reduce propagation / Inkscape updates Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 02/20] gnu: Add lutok Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 03/20] gnu: Add kyua Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 04/20] gnu: pkgconf: Enable test suite Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 05/20] gnu: Add pkgconf-as-pkg-config Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 06/20] gnu: pkgconf: Add $PKG_CONFIG_PATH search path Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 07/20] gnu: pkgconf: Add support for cross-compilation Maxim Cournoyer
2024-02-22 16:10 ` Maxim Cournoyer [this message]
2024-02-24 11:41 ` [bug#68813] [core-updates PATCH 08/20] gnu: pkg-config: Alias to pkgconf-as-pkg-config Ludovic Courtès
2024-02-24 20:34 ` Maxim Cournoyer
2024-02-24 22:33 ` Ludovic Courtès
2024-03-09 18:32 ` bug#68813: [PATCH core-updates] Replace pkg-config with pkgconf to reduce propagation / Inkscape updates Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 09/20] gnu: pstoedit: Update to 4.00 Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 10/20] gnu: autotrace: Update to 0.31.10 Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 11/20] gnu: autotrace: Remove libtool archives Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 12/20] gnu: autotrace: Fix pkg-config file Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 13/20] gnu: gd: Update to 2.3.3 Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 14/20] gnu: lib2geom: Update to 1.3 Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 15/20] gnu: inkscape: Truly enable ImageMagic support Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 16/20] gnu: lib2geom: Use gexps and remove input labels Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 17/20] gnu: inkscape: Update to 1.3.2 Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 18/20] gnu: inkscape: Sort inputs Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 19/20] gnu: inkscape: Fix Python support Maxim Cournoyer
2024-02-22 16:10 ` [bug#68813] [core-updates PATCH 20/20] Revert "gnu: mpv: Propagate most libraries." Maxim Cournoyer
2024-02-22 16:29 ` [bug#68813] [core-updates PATCH 01/20] gnu: Add atf Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6f3b6c5b58a2d16b3ccb947bbaffa65cac48b1a.1708618218.git.maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=68813@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=ekaitz@elenq.tech \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.