[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] gnu: Add mozjs-38.
From: |
ng0 |
Subject: |
[PATCH 1/3] gnu: Add mozjs-38. |
Date: |
Fri, 23 Dec 2016 21:15:16 +0000 |
From: ng0 <address@hidden>
* gnu/packages/gnuzilla.scm (mozjs-38): New variable.
---
gnu/packages/gnuzilla.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 07ed2af0b..6383ef1c6 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015 Sou Bunnbu <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
;;; Copyright © 2016 Alex Griffin <address@hidden>
+;;; Copyright © 2016 ng0 <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -149,6 +150,64 @@ in C/C++.")
`(("libffi" ,libffi)
("zlib" ,zlib)))))
+(define-public mozjs-38
+ (package (inherit mozjs)
+ (name "mozjs")
+ (version "38.2.1.rc0")
+ (source (origin
+ (method url-fetch)
+ (uri (list
+ ;; The upstream server at people.mozilla.org produces
+ ;; a tls handshake error, the file at people.freebsd.org
+ ;; is identical and produces no such error.
+ (string-append
+ "https://people.freebsd.org/~sunpoet/distfiles/"
+ name "-" version ".tar.bz2")
+ ;; XXX: The upstream server at people.mozilla.org
+ (string-append
+ "https://people.mozilla.org/~sstangl/"
+ name "-" version ".tar.bz2")))
+ (sha256
+ (base32
+ "0p4bmbpgkfsj54xschcny0a118jdrdgg0q29rwxigg3lh5slr681"))))
+ (arguments
+ '(;; XXX: parallel build fails, lacking:
+ ;; mkdir -p "system_wrapper_js/"
+ #:parallel-build? #f
+ ;; Tests fail due to missing module 'xpt':
+ ;; ImportError: No module named xpt
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (chdir "js/src")
+ ;; configure fails if it is followed by SHELL and CONFIG_SHELL
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (substitute* "js.pc.in"
+ (("@MOZILLA_VERSION@") "38.2.1"))
+ (zero? (system* "./configure"
+ (string-append "--prefix=" out)
+ "--with-system-nspr"
+ "--enable-system-ffi"
+ "--enable-threadsafe"
+ "--enable-gcgenerational" ; required by 0ad
+ "--enable-shared-js" ; required by 0ad
+ ;; required by gcgenerational:
+ "--disable-exact-rooting"))))))))
+ (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
+ `(("libffi" ,libffi)
+ ("zlib" ,zlib)))))
+
(define-public nspr
(package
(name "nspr")
--
2.11.0