unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
@ 2018-05-02 21:19 Roel Janssen
  2018-05-05 20:26 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2018-05-02 21:19 UTC (permalink / raw)
  To: 31346

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-gnuzilla-Add-mozjs-52.patch --]
[-- Type: text/x-patch, Size: 3151 bytes --]

From ce8b4e85b03ed76fb671a4d554f966b7eac00b8d Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
  2018-05-02 21:19 [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52 Roel Janssen
@ 2018-05-05 20:26 ` Ludovic Courtès
  2018-05-06 20:21   ` Roel Janssen
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-05-05 20:26 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 31346

Hello Roel,

Roel Janssen <roel@gnu.org> skribis:

>>From ce8b4e85b03ed76fb671a4d554f966b7eac00b8d Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> Date: Wed, 2 May 2018 22:11:34 +0200
> Subject: [PATCH] gnu: gnuzilla: Add mozjs-52.
>
> * gnu/packages/gnuzilla.scm (mozjs-52): New variable.

[...]

> +(define-public mozjs-52
> +  (package
> +    (inherit mozjs)
> +    (name "mozjs")

You can omit ‘name’.

Also, would it be simpler to inherit from ‘mozjs-38’?

> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://queue.taskcluster.net/v1/task/"
> +                    "YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/"
> +                    "public/build/mozjs-" version ".tar.bz2"))

Could we use ftp.mozilla.org instead?

> +    (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"))))))))

This seems to be (almost) the same as for ‘mozjs-38’.  Perhaps with
‘inherit’ we don’t need to duplicate all this?

Could you look into this?

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
  2018-05-05 20:26 ` Ludovic Courtès
@ 2018-05-06 20:21   ` Roel Janssen
  2018-05-07  8:13     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2018-05-06 20:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31346


Ludovic Courtès <ludo@gnu.org> writes:

> Hello Roel,
>
> Roel Janssen <roel@gnu.org> skribis:
>
>>>From ce8b4e85b03ed76fb671a4d554f966b7eac00b8d Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <roel@gnu.org>
>> Date: Wed, 2 May 2018 22:11:34 +0200
>> Subject: [PATCH] gnu: gnuzilla: Add mozjs-52.
>>
>> * gnu/packages/gnuzilla.scm (mozjs-52): New variable.
>
> [...]
>
>> +(define-public mozjs-52
>> +  (package
>> +    (inherit mozjs)
>> +    (name "mozjs")
>
> You can omit ‘name’.
>
> Also, would it be simpler to inherit from ‘mozjs-38’?

Maybe it is.  I will try that instead.

>
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append
>> +                    "https://queue.taskcluster.net/v1/task/"
>> +                    "YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/"
>> +                    "public/build/mozjs-" version ".tar.bz2"))
>
> Could we use ftp.mozilla.org instead?

So I thought, but it doesn't seem to be available there:
http://ftp.mozilla.org/pub/spidermonkey/releases/

The latest release there is version 45.  In the pre-releases there's
version 59.

Maybe I can add comment in the form:

;; The release notes at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52
;; states: “You can download full source code from treeherder, by going
;; to the mozilla-esr52 repository and clicking on the first SM(pkg)
;; link you see.  The download link below is the result of that.

Would that be sufficient?

>
>> +    (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"))))))))
>
> This seems to be (almost) the same as for ‘mozjs-38’.  Perhaps with
> ‘inherit’ we don’t need to duplicate all this?
>
> Could you look into this?

Sure.  Thanks for your valuable time.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
  2018-05-06 20:21   ` Roel Janssen
@ 2018-05-07  8:13     ` Ludovic Courtès
  2018-05-25  9:06       ` Roel Janssen
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-05-07  8:13 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 31346

Hello,

Roel Janssen <roel@gnu.org> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>>> +    (source (origin
>>> +              (method url-fetch)
>>> +              (uri (string-append
>>> +                    "https://queue.taskcluster.net/v1/task/"
>>> +                    "YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/"
>>> +                    "public/build/mozjs-" version ".tar.bz2"))
>>
>> Could we use ftp.mozilla.org instead?
>
> So I thought, but it doesn't seem to be available there:
> http://ftp.mozilla.org/pub/spidermonkey/releases/
>
> The latest release there is version 45.  In the pre-releases there's
> version 59.
>
> Maybe I can add comment in the form:
>
> ;; The release notes at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52
> ;; states: “You can download full source code from treeherder, by going
> ;; to the mozilla-esr52 repository and clicking on the first SM(pkg)
> ;; link you see.  The download link below is the result of that.
>
> Would that be sufficient?

Yes, sure.  Kinda weird they don’t use their own infrastructure.

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52.
  2018-05-07  8:13     ` Ludovic Courtès
@ 2018-05-25  9:06       ` Roel Janssen
  2018-08-29 20:57         ` bug#31346: " Leo Famulari
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2018-05-25  9:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31346


Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Roel Janssen <roel@gnu.org> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>>> +    (source (origin
>>>> +              (method url-fetch)
>>>> +              (uri (string-append
>>>> +                    "https://queue.taskcluster.net/v1/task/"
>>>> +                    "YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/"
>>>> +                    "public/build/mozjs-" version ".tar.bz2"))
>>>
>>> Could we use ftp.mozilla.org instead?
>>
>> So I thought, but it doesn't seem to be available there:
>> http://ftp.mozilla.org/pub/spidermonkey/releases/
>>
>> The latest release there is version 45.  In the pre-releases there's
>> version 59.
>>
>> Maybe I can add comment in the form:
>>
>> ;; The release notes at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52
>> ;; states: “You can download full source code from treeherder, by going
>> ;; to the mozilla-esr52 repository and clicking on the first SM(pkg)
>> ;; link you see.  The download link below is the result of that.
>>
>> Would that be sufficient?
>
> Yes, sure.  Kinda weird they don’t use their own infrastructure.

So I added the comment and tried to build it again, but the build fails
now.  I need to further investigate this.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31346: [PATCH] gnu: gnuzilla: Add mozjs-52.
  2018-05-25  9:06       ` Roel Janssen
@ 2018-08-29 20:57         ` Leo Famulari
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2018-08-29 20:57 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 31346-done

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]

Mozjs-52 was added in commit 192a59d0f6d7f8f549c0c8225ceef999cff65d31.

Closing the bug...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-29 20:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 21:19 [bug#31346] [PATCH] gnu: gnuzilla: Add mozjs-52 Roel Janssen
2018-05-05 20:26 ` Ludovic Courtès
2018-05-06 20:21   ` Roel Janssen
2018-05-07  8:13     ` Ludovic Courtès
2018-05-25  9:06       ` Roel Janssen
2018-08-29 20:57         ` bug#31346: " Leo Famulari

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).