diff mbox

[bug#50201,core-updates-frozen,0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors

Message ID 9dad287d9cc30856642f3dda45667ebcb12dc2c9.camel@telenet.be
State Accepted
Headers show

Commit Message

M Sept. 2, 2021, 2:53 p.m. UTC
Mathieu Othacehe schreef op ma 30-08-2021 om 15:13 [+0200]:
> Hey,
> 
> > +    (native-search-paths
> > +     (list (search-path-specification
> > +            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> > +            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> 
> You could maybe extract the files list from the %pkg-config definition
> not to duplicate it?

Done in local checkout.  Also, the package inherits from %pkg-config instead
of pkg-config now (doesn't change the derivations but seems more proper).

Let me now when I should send a v2 (I'll look into the cpython-39 issue first).

Greetings,
Maxime

Comments

Ludovic Courtès Sept. 22, 2021, 7:10 p.m. UTC | #1
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> --- a/gnu/packages/pkg-config.scm
> +++ b/gnu/packages/pkg-config.scm
> @@ -139,7 +139,7 @@ build, or a GNU triplet."
>  ;; work because they both use the "PKG_CONFIG_PATH" environment variable.
>  (define-public pkg-config-for-build
>    (package
> -    (inherit (hidden-package pkg-config))
> +    (inherit (hidden-package %pkg-config))
>      (name "pkg-config-for-build")
>      (version "0")
>      (source #f)
> @@ -163,6 +163,8 @@ exec ~a \"$@\""
>                          (search-input-file %build-inputs "bin/pkg-config"))))
>              (chmod where #o500))))
>      (native-search-paths
> -     (list (search-path-specification
> -            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> -            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> +     (map (lambda (original)
> +            (search-path-specification
> +             (inherit original)
> +             (variable "PKG_CONFIG_FOR_BUILD")))
> +          (package-native-search-paths %pkg-config)))))

Isn’t that a typo, “PKG_CONFIG_FOR_BUILD” instead of
“PKG_CONFIG_PATH_FOR_BUILD” or (string-append name "_FOR_BUILD")?

The original spec above looked more appropriate to me.

Thanks,
Ludo’.
diff mbox

Patch

From 8403f97eac354a02efa92f0a3ced7c95523fad12 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 2 Sep 2021 15:18:54 +0200
Subject: [PATCH] SQUASH! pkg-config! Inherit %pkg-config & search-path-spec

---
 gnu/packages/pkg-config.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 9d1588338e..2b4173a7db 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -139,7 +139,7 @@  build, or a GNU triplet."
 ;; work because they both use the "PKG_CONFIG_PATH" environment variable.
 (define-public pkg-config-for-build
   (package
-    (inherit (hidden-package pkg-config))
+    (inherit (hidden-package %pkg-config))
     (name "pkg-config-for-build")
     (version "0")
     (source #f)
@@ -163,6 +163,8 @@  exec ~a \"$@\""
                         (search-input-file %build-inputs "bin/pkg-config"))))
             (chmod where #o500))))
     (native-search-paths
-     (list (search-path-specification
-            (variable "PKG_CONFIG_PATH_FOR_BUILD")
-            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
+     (map (lambda (original)
+            (search-path-specification
+             (inherit original)
+             (variable "PKG_CONFIG_FOR_BUILD")))
+          (package-native-search-paths %pkg-config)))))
-- 
2.33.0