summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-05-05 19:56:39 +0300
committerEfraim Flashner <efraim@flashner.co.il>2024-05-06 23:16:51 +0300
commit38733b5039eaf00167882f18ea763b8cb180c967 (patch)
tree951a72c85354279b27f07b1cc1d4cb6916a7b0eb
parentc6d99eb371b68188a575325cad0971439bea5fb3 (diff)
downloadguix-38733b5039eaf00167882f18ea763b8cb180c967.tar.gz
gnu: gnome-js-common: Fix build on some architectures.
* gnu/packages/gnome.scm (gnome-js-common)[arguemnts]: When building for
aarch64-linux or riscv64-linux replace the config.guess and config.sub
files.
[native-inputs]: When building for aarch64-linux or riscv64-linux add
config.

Change-Id: Ia27b0fec7d0b50e9e4ab7ea7329d390ddc482795
-rw-r--r--gnu/packages/gnome.scm22
1 files changed, 19 insertions, 3 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 489f23865b..92e35e3c5a 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -459,10 +459,26 @@ and other formats.")
     (build-system glib-or-gtk-build-system)
     (arguments
      `(#:configure-flags
-       (list
-        "--disable-static")))
+       (list "--disable-static")
+       #:phases
+       (modify-phases %standard-phases
+         ,@(if (or (target-riscv64?)
+                   (target-aarch64?))
+               `((add-after 'unpack 'update-config-scripts
+                   (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                     (for-each (lambda (file)
+                                 (install-file
+                                   (search-input-file
+                                     (or native-inputs inputs)
+                                     (string-append "/bin/" file)) "."))
+                               '("config.guess" "config.sub")))))
+               '()))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
+     `(,@(if (or (target-riscv64?)
+                 (target-aarch64?))
+             `(("config" ,config))
+             `())
+       ("gettext" ,gettext-minimal)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (synopsis "Common JS Modules")