[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/52: gnu: mozjs-60: Fix cross-compilation build errors.
From: |
guix-commits |
Subject: |
08/52: gnu: mozjs-60: Fix cross-compilation build errors. |
Date: |
Mon, 20 Sep 2021 07:19:28 -0400 (EDT) |
mothacehe pushed a commit to branch core-updates-frozen
in repository guix.
commit d09822c394ac78eefa156196550e8f5f60d68252
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Tue Aug 24 10:36:08 2021 +0200
gnu: mozjs-60: Fix cross-compilation build errors.
Presumably the other versions of mozjs need some changes
as well, but for now only fix mozjs@60, which is a dependency
of polkit.
* gnu/packages/gnuzilla.scm
(mozjs-60)[arguments]<#:configure-flags>: Set --with-nspr-prefix
and set --host and --target inappropriately when cross-compiling.
(mozjs-60)[arguments]<#:phases>{set-PKG_CONFIG}: New phase
when cross-compiling.
---
gnu/packages/gnuzilla.scm | 51 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 37 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 58ea1f7..5dd90e4 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -368,22 +369,44 @@ in C/C++.")
`(#:tests? #f ; FIXME: all tests pass, but then the check phase fails
anyway.
#:test-target "check-jstests"
#:configure-flags
- '("--enable-ctypes"
- "--enable-optimize"
- "--enable-pie"
- "--enable-readline"
- "--enable-shared-js"
- "--enable-system-ffi"
- "--with-system-nspr"
- "--with-system-zlib"
- "--with-system-icu"
- "--with-intl-api"
- ;; This is important because without it gjs will segfault during the
- ;; configure phase. With jemalloc only the standalone mozjs console
- ;; will work.
- "--disable-jemalloc")
+ ;; TODO(core-updates): unconditionally use 'quasiquote
+ ,#~(#$(if (%current-target-system)
+ #~quasiquote
+ #~quote)
+ ("--enable-ctypes"
+ "--enable-optimize"
+ "--enable-pie"
+ "--enable-readline"
+ "--enable-shared-js"
+ "--enable-system-ffi"
+ "--with-system-nspr"
+ #$@(if (%current-target-system)
+ #~(,(string-append "--with-nspr-prefix="
+ #$(this-package-input "nspr")))
+ #~())
+ "--with-system-zlib"
+ "--with-system-icu"
+ "--with-intl-api"
+ ;; This is important because without it gjs will segfault during
the
+ ;; configure phase. With jemalloc only the standalone mozjs
console
+ ;; will work.
+ "--disable-jemalloc"
+ ;; Mozilla deviates from Autotools conventions due to historical
+ ;; reasons.
+ #$@(if (%current-target-system)
+ #~(#$(string-append
+ "--host="
+ (nix-system->gnu-triplet (%current-system)))
+ #$(string-append "--target=" (%current-target-system)))
+ #~())))
#:phases
(modify-phases %standard-phases
+ ;; Make sure pkg-config will be found.
+ ,@(if (%current-target-system)
+ `((add-before 'configure 'set-PKG-CONFIG
+ (lambda _
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target)))))
+ '())
(replace 'configure
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
;; The configure script does not accept environment variables as
- 21/52: gnu: gamin: Fix 'configure' script when cross-compiling., (continued)
- 21/52: gnu: gamin: Fix 'configure' script when cross-compiling., guix-commits, 2021/09/20
- 09/52: gnu: poppler: Find pkg-config when cross-compiling., guix-commits, 2021/09/20
- 19/52: gnu: graphene: Don't build introspection data when cross-compiling., guix-commits, 2021/09/20
- 25/52: gnu: heimdal: Refer to cross-compiled bash., guix-commits, 2021/09/20
- 15/52: gobject-introspection: Fix inputs when cross-compiling., guix-commits, 2021/09/20
- 27/52: gnu: heimdal: Find tools when cross-compiling., guix-commits, 2021/09/20
- 32/52: gnu: json-glib: Don't build introspection data when cross-compiling., guix-commits, 2021/09/20
- 03/52: gnu: elogind: Fix cross-compilation., guix-commits, 2021/09/20
- 04/52: gnu: libcap: Fix cross-compilation build failures., guix-commits, 2021/09/20
- 05/52: gnu: perl: Find 'bash' when cross-compiling., guix-commits, 2021/09/20
- 08/52: gnu: mozjs-60: Fix cross-compilation build errors.,
guix-commits <=
- 10/52: build-system/meson: Allow 'configure-flags' to be a G-exp., guix-commits, 2021/09/20
- 22/52: gnu: iso-codes: Move inputs to native-inputs when cross-compiling., guix-commits, 2021/09/20
- 14/52: gnu: gobject-introspection: Don't build introspection data when cross-compiling., guix-commits, 2021/09/20
- 20/52: gnu: gamin: Recognise aarch64 as architecture when cross-compiling., guix-commits, 2021/09/20
- 26/52: gnu: heimdal: Use the cross-compiled bash in "su"., guix-commits, 2021/09/20
- 29/52: gnu: json-glib: Add missing 'bash-minimal' input., guix-commits, 2021/09/20
- 30/52: gnu: json-glib: Find docbook inputs when cross-compiling., guix-commits, 2021/09/20
- 31/52: gnu: json-glib: Don't build gtk documentation when cross-compiling., guix-commits, 2021/09/20
- 36/52: gnu: avahi: Use the cross-compiled bash., guix-commits, 2021/09/20
- 38/52: gnu: at-spi2-core: Find docbook when cross-compiling., guix-commits, 2021/09/20