[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/22: gnu: pkg-config: Alias to pkgconf-as-pkg-config.
From: |
guix-commits |
Subject: |
10/22: gnu: pkg-config: Alias to pkgconf-as-pkg-config. |
Date: |
Sat, 9 Mar 2024 13:28:23 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 847b2a7ceb47fac30e3fb82a3e45db800e607149
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jan 31 11:57:11 2024 -0500
gnu: pkg-config: Alias to pkgconf-as-pkg-config.
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 07c9b98757..08badf526e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3356,13 +3356,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker
-Wl,~a/~a \"$@\"~%"
(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)
@@ -3372,7 +3372,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a
\"$@\"~%"
`(#: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 @@
#: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 @@ on where to find glib (or other libraries). It is
language-agnostic, so
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 @@ such as compilers and IDEs to discover and use libraries
configured by
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 @@ pkgconf.")
(string-append #$output "/share/aclocal"))))))))
(native-inputs '())
(inputs (list %pkgconf))
- (propagated-inputs '())))
+ (propagated-inputs '())
+ (properties (alist-delete 'hidden? (package-properties %pkgconf)))))
;;;
@@ -220,7 +232,7 @@ GNU triplet."
;; 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 @@ GNU triplet."
(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)
+
;;;
;;; pkg-config packages for native use (build-time only).
- branch core-updates updated (11d73c8aeb -> a723a7b3b7), guix-commits, 2024/03/09
- 10/22: gnu: pkg-config: Alias to pkgconf-as-pkg-config.,
guix-commits <=
- 14/22: gnu: autotrace: Fix pkg-config file., guix-commits, 2024/03/09
- 15/22: gnu: gd: Update to 2.3.3., guix-commits, 2024/03/09
- 17/22: gnu: inkscape: Truly enable ImageMagic support., guix-commits, 2024/03/09
- 18/22: gnu: lib2geom: Use gexps and remove input labels., guix-commits, 2024/03/09
- 19/22: gnu: inkscape: Update to 1.3.2., guix-commits, 2024/03/09
- 06/22: gnu: pkgconf: Enable test suite., guix-commits, 2024/03/09
- 11/22: gnu: pstoedit: Update to 4.00., guix-commits, 2024/03/09
- 08/22: gnu: pkgconf: Add $PKG_CONFIG_PATH search path., guix-commits, 2024/03/09
- 05/22: gnu: Add kyua., guix-commits, 2024/03/09
- 02/22: gnu: ld-wrapper: Also unset GUILE_LOAD_PATH., guix-commits, 2024/03/09