gnu: mozjs@24: Add aarch64-support.

* gnu/packages/gnuzilla.scm (mozjs@24)[source]: Add patch.
[arguments]: Add flag for building on aarch64-linux, delete failing test.
* gnu/packages/patches/mozjs24-aarch64-support.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
Efraim Flashner 2017-03-27 13:28:33 +03:00
parent b4f67b7ebb
commit 26f38d313b
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
3 changed files with 32 additions and 2 deletions

View File

@ -767,6 +767,7 @@ dist_patch_DATA = \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/mplayer2-theora-fix.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/mozjs24-aarch64-support.patch \
%D%/packages/patches/multiqc-fix-git-subprocess-error.patch \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupdf-build-with-openjpeg-2.1.patch \

View File

@ -117,16 +117,20 @@ in C/C++.")
(base32
"1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"))
(modules '((guix build utils)))
(patches (search-patches "mozjs24-aarch64-support.patch"))
(snippet
;; Fix incompatibility with Perl 5.22+.
'(substitute* '("js/src/config/milestone.pl")
(("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
(arguments
'(;; XXX: parallel build fails, lacking:
`(;; XXX: parallel build fails, lacking:
;; mkdir -p "system_wrapper_js/"
#:parallel-build? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'delete-timedout-test
;; This test times out on slower hardware
(lambda _ (delete-file "js/src/jit-test/tests/basic/bug698584.js")))
(replace
'configure
(lambda* (#:key outputs #:allow-other-keys)
@ -139,7 +143,11 @@ in C/C++.")
(string-append "--prefix=" out)
"--with-system-nspr"
"--enable-system-ffi"
"--enable-threadsafe"))))))))
"--enable-threadsafe"
,@(if (string=? "aarch64-linux"
(%current-system))
'("--host=aarch64-unknown-linux-gnu")
'())))))))))
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config)

View File

@ -0,0 +1,21 @@
This patch is sourced from Debian's mozjs24 patch set.
Description: Add arm64 support
Author: Andreas Schwab <schwab@suse.de>
Origin: vendor, https://build.opensuse.org/package/view_file/openSUSE:Factory/mozjs17/mozjs-aarch64-support.patch
Forwarded: no
Last-Update: 2014-01-03
Index: b/mfbt/double-conversion/utils.h
===================================================================
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -58,7 +58,7 @@
defined(__mips__) || defined(__powerpc__) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
- defined(_MIPS_ARCH_MIPS32R2)
+ defined(_MIPS_ARCH_MIPS32R2) || defined(__aarch64__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
#if defined(_WIN32)