From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: 32364@debbugs.gnu.org
Cc: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Subject: [bug#32364] [PATCH] gnu: Add mozjs-52.
Date: Fri, 3 Aug 2018 18:15:42 +0200 [thread overview]
Message-ID: <20180803161542.26246-1-ricardo.wurmus@mdc-berlin.de> (raw)
* gnu/packages/gnuzilla.scm (mozjs-52): New variable.
---
gnu/packages/gnuzilla.scm | 56 +++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ba60d1372..79d05bdaa 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,6 +32,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages autotools)
@@ -252,6 +254,60 @@ in C/C++.")
("icu4c" ,icu4c)
("zlib" ,zlib)))))
+(define-public mozjs-52
+ ;; No releases yet at <https://archive.mozilla.org/pub/spidermonkey/releases/>.
+ ;; While we could take a snapshot of the complete mozilla-esr52 repository at
+ ;; <https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52&filter-searchStr=sm-tc>,
+ ;; we take the Debian version instead, because it is easier to work with.
+ (let ((commit "6507e63cc416fd7a3269e390efe712f8b56f374a")
+ (revision "1"))
+ (package (inherit mozjs-38)
+ (version (git-version "52.0-0." revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://salsa.debian.org/gnome-team/mozjs52.git")
+ (commit commit)))
+ (file-name (git-file-name "mozjs" version))
+ (sha256
+ (base32
+ "1ny0s53r8wn4byys87h784xrq1xg767akmfm6gqrbvrz57mlm3q2"))))
+ (arguments
+ `(#:tests? #f ; depends on repository metadata
+ #:configure-flags
+ '("--enable-ctypes"
+ "--enable-optimize"
+ "--enable-pie"
+ "--enable-readline"
+ "--enable-shared-js"
+ "--enable-system-ffi"
+ "--with-system-icu"
+ "--with-system-nspr"
+ "--with-system-zlib"
+
+ ;; Intl API requires bundled ICU.
+ "--without-intl-api")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "js/src") #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+ ;; The configure script does not accept environment variables
+ ;; as arguments.
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
+ "/bin/autoconf"))
+ (apply invoke "./configure"
+ (cons (string-append "--prefix=" out)
+ configure-flags))))))))
+ (native-inputs
+ `(("autoconf" ,autoconf-2.13)
+ ("automake" ,automake)
+ ,@(package-native-inputs mozjs-38))))))
+
(define-public nspr
(package
(name "nspr")
--
2.18.0
next reply other threads:[~2018-08-03 16:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 16:15 Ricardo Wurmus [this message]
2018-08-05 17:57 ` [bug#32364] [PATCH] gnu: Add mozjs-52 Efraim Flashner
2018-08-05 20:11 ` Kei Kebreau
2018-08-07 11:53 ` bug#32364: " Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180803161542.26246-1-ricardo.wurmus@mdc-berlin.de \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=32364@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).