Subject: bug#31346: closed (Re: [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 29 Aug 2018 20:58:03 +0000

Your bug report

#31346: [PATCH] gnu: gnuzilla: Add mozjs-52.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
31346: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31346
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
From: Leo Famulari <[email-masked]>
To: Roel Janssen <[email-masked]>
Cc: Ludovic Courtès <[email-masked]>, [email-masked]
Date: Wed, 29 Aug 2018 16:57:30 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Mozjs-52 was added in commit 192a59d0f6d7f8f549c0c8225ceef999cff65d31.

Closing the bug...

Subject: [PATCH] gnu: gnuzilla: Add mozjs-52.
From: Roel Janssen <[email-masked]>
To: guix-patches <[email-masked]>
Date: Wed, 02 May 2018 23:19:16 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear Guix,

I'd like to add ‘mozjs-52’ because an updated version of ‘gjs’ needs
it.  I copied most of the recipe for mozjs-38, removing the bits
that aren't relevant anymore.

Kind regards,
Roel Janssen
>From ce8b4e85b03ed76fb671a4d554f966b7eac00b8d Mon Sep 17 00:00:00 2001
From: Roel Janssen <[email-masked]>
Date: Wed, 2 May 2018 22:11:34 +0200
Subject: [PATCH] gnu: gnuzilla: Add mozjs-52.

* gnu/packages/gnuzilla.scm (mozjs-52): New variable.
---
 gnu/packages/gnuzilla.scm | 62 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index d7f80014b..59427fe12 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -247,6 +247,68 @@ in C/C++.")
        ("icu4c" ,icu4c)
        ("zlib" ,zlib)))))
 
+(define-public mozjs-52
+  (package
+    (inherit mozjs)
+    (name "mozjs")
+    (version "52.7.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://queue.taskcluster.net/v1/task/"
+                    "YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/"
+                    "public/build/mozjs-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1bc83h2268lfj7h9i8s7dk0hbh1q92fdk5bi3688ybn95xipz185"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Remove bundled libraries.
+                  (for-each delete-file-recursively
+                            '("js/src/ctypes/libffi"
+                              "js/src/ctypes/libffi-patches"
+                              "modules/zlib"))
+                  #t))))
+    (arguments
+     `(#:tests? #f ; Needs Mercurial or Git repository to be avalable.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (chdir "js/src")
+               (setenv "SHELL" (which "sh"))
+               (setenv "CONFIG_SHELL" (which "sh"))
+               (setenv "AUTOCONF" (string-append
+                                   (assoc-ref inputs "autoconf")
+                                   "/bin/autoreconf"))
+               (zero? (system* "./configure"
+                               (string-append "--prefix=" out)
+                               "--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"))))))))
+    (native-inputs
+     `(("perl" ,perl)
+       ("autoconf" ,autoconf)
+       ("pkg-config" ,pkg-config)
+       ("python-2" ,python-2)
+       ("which" ,which)))
+    (inputs
+     `(("libffi" ,libffi)
+       ("readline" ,readline)
+       ("icu4c" ,icu4c)
+       ("zlib" ,zlib)))))
+
 (define-public nspr
   (package
     (name "nspr")
-- 
2.17.0