gnu: mozjs@24: Use more inherited fields.

* gnu/packages/gnuzilla.scm (mozjs@24)[arguments]: Use
'substitute-keyword-arguments', override inherited 'configure.
[native-inputs]: Remove field to use inherited native-inputs.
[propagated-inputs]: Same.
This commit is contained in:
Efraim Flashner 2017-03-27 19:12:10 +03:00
parent 56486b3a40
commit aaac423cc4
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 19 additions and 31 deletions

View File

@ -28,6 +28,7 @@
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
@ -135,37 +136,24 @@ in C/C++.")
'(substitute* '("js/src/config/milestone.pl") '(substitute* '("js/src/config/milestone.pl")
(("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE"))))) (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
(arguments (arguments
`(;; XXX: parallel build fails, lacking: (substitute-keyword-arguments (package-arguments mozjs)
;; mkdir -p "system_wrapper_js/" ((#:phases phases)
#:parallel-build? #f `(modify-phases ,phases
#:phases (replace 'configure
(modify-phases %standard-phases (lambda* (#:key outputs #:allow-other-keys)
(add-after 'unpack 'delete-timedout-test (let ((out (assoc-ref outputs "out")))
;; This test times out on slower hardware ;; configure fails if it is followed by SHELL and CONFIG_SHELL
(lambda _ (delete-file "js/src/jit-test/tests/basic/bug698584.js"))) (setenv "SHELL" (which "sh"))
(replace (setenv "CONFIG_SHELL" (which "sh"))
'configure (zero? (system* "./configure"
(lambda* (#:key outputs #:allow-other-keys) (string-append "--prefix=" out)
(let ((out (assoc-ref outputs "out"))) "--with-system-nspr"
(chdir "js/src") "--enable-system-ffi"
;; configure fails if it is follwed by SHELL and CONFIG_SHELL "--enable-threadsafe"
(setenv "SHELL" (which "sh")) ,@(if (string=? "aarch64-linux"
(setenv "CONFIG_SHELL" (which "sh")) (%current-system))
(zero? (system* "./configure" '("--host=aarch64-unknown-linux-gnu")
(string-append "--prefix=" out) '()))))))))))
"--with-system-nspr"
"--enable-system-ffi"
"--enable-threadsafe"
,@(if (string=? "aarch64-linux"
(%current-system))
'("--host=aarch64-unknown-linux-gnu")
'())))))))))
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config)
("python" ,python-2)))
(propagated-inputs
`(("nspr" ,nspr))) ; in the Requires.private field of mozjs-24.pc
(inputs (inputs
`(("libffi" ,libffi) `(("libffi" ,libffi)
("zlib" ,zlib))))) ("zlib" ,zlib)))))