guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: freetype: Fix cross-compilation.


From: guix-commits
Subject: 03/03: gnu: freetype: Fix cross-compilation.
Date: Thu, 9 Mar 2023 17:29:58 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit 9aac443dc9697520fbad3619fd0172028805114c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Mar 9 23:28:30 2023 +0100

    gnu: freetype: Fix cross-compilation.
    
    Previously, the 'remove-reference-to-pkg-config' would break when
    cross-compiling because the "/bin/pkg-config" file would not be found.
    
    * gnu/packages/fontutils.scm (freetype)[arguments]: Add alternate
    'remove-reference-to-pkg-config' phase for (%current-target-system) as
    true.
---
 gnu/packages/fontutils.scm | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 341554b687..9d0d23f9c8 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017, 2018, 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -100,13 +100,23 @@
     `(#:configure-flags (list "--enable-freetype-config")
       #:disallowed-references (,pkg-config)
       #:phases
-      (modify-phases %standard-phases
-        (add-after 'install 'remove-reference-to-pkg-config
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (substitute* (string-append out "/bin/freetype-config")
-                 (((search-input-file inputs "/bin/pkg-config"))
-                   "pkg-config"))))))))
+      ;; TODO: Keep only the first variant on the next core rebuild cycle.
+      ,(if (%current-target-system)
+           '(modify-phases %standard-phases
+              (add-after 'install 'remove-reference-to-pkg-config
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((out (assoc-ref outputs "out")))
+                    (substitute* (string-append out "/bin/freetype-config")
+                      (("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)pkg-config"
+                        _ store target)
+                       "pkg-config"))))))
+           '(modify-phases %standard-phases
+              (add-after 'install 'remove-reference-to-pkg-config
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((out (assoc-ref outputs "out")))
+                    (substitute* (string-append out "/bin/freetype-config")
+                      (((search-input-file inputs "/bin/pkg-config"))
+                       "pkg-config")))))))))
    (native-inputs
     (list pkg-config))
    (propagated-inputs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]