all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Frank Pursel <frank.pursel@gmail.com>
To: 54021@debbugs.gnu.org
Subject: [bug#54021] [PATCH] Better rhino
Date: Mon, 21 Feb 2022 07:54:18 -0800	[thread overview]
Message-ID: <87h78sqkph.fsf@gmail.com> (raw)
In-Reply-To: <87pmnnr2qq.fsf@gmail.com>

Efraim,

Thank you for your comments.  I always wonder what is preferred here --
a clean single patch or the diff of changes.  Here I'm providing the
diff; if you would like me to create a single patch I'm happy to provide
it.

Regards,
Frank

From 135ea5541a9a5e4e009b9ee90eae36bec2b74dce Mon Sep 17 00:00:00 2001
Message-Id: <135ea5541a9a5e4e009b9ee90eae36bec2b74dce.1645458837.git.frank.pursel@gmail.com>
From: Frank Pursel <frank.pursel@gmail.com>
Date: Mon, 21 Feb 2022 07:48:07 -0800
Subject: [PATCH] Additional refinements.

---
 gnu/packages/javascript.scm | 44 ++++++++++++++++---------------------
 1 file changed, 19 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 158abaded7..d8ebee3c3f 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -27,24 +27,22 @@ (define-module (gnu packages javascript)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages node)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages perl)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
-  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
-  #:use-module (guix build-system trivial)
+  #:use-module (guix build-system gnu)
   #:use-module (guix build-system minify)
-  #:use-module (guix build-system ant)
-  #:use-module (guix utils)
-  #:use-module (guix gexp))
+  #:use-module (guix build-system trivial)
+  #:use-module (guix utils))
 
 (define-public cjson
   (package
@@ -796,16 +794,14 @@ (define-public duktape
     (license license:expat)))
 
 (define-public rhino
-  (let* ((rel-ver "1.7.7.2")
-         (commit "935942527ff434b205e797df4185518e5369466e"))
     (package
       (name "rhino")
-      (version rel-ver)
+      (version "1.7.7.2")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
                       (url "https://github.com/mozilla/rhino.git")
-                      (commit commit)))
+                      (commit "935942527ff434b205e797df4185518e5369466e")))
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
@@ -813,17 +809,14 @@ (define-public rhino
                 (modules '((guix build utils)))
                 (snippet '(begin
                             ;; Remove benchmark testing
-                            (with-directory-excursion
-                                "testsrc"
-                              (delete-file-recursively "benchmarks"))
-                            (with-directory-excursion
-                             "testsrc/org/mozilla/javascript"
-                             (delete-file-recursively "benchmarks"))
+                            (delete-file-recursively "testsrc/benchmarks")
+                            (delete-file-recursively
+                             "testsrc/org/mozilla/javascript/benchmarks")
                             ;; Identify bundled jars
                             (format #t "~%~a~%" "Sourced jars")
                             (for-each (lambda (f)
                                         (format #t "~/~a~%" f))
-                                      (find-files "." ".*\\.jar$"))))))
+                                      (find-files "." "\\.jar$"))))))
       (build-system ant-build-system)
       (inputs (list bash-minimal))
       (native-inputs (list java-junit java-hamcrest-core java-snakeyaml))
@@ -848,7 +841,8 @@ (define-public rhino
                         (string-append "<!-- " all " -->"))
                        (("<pathelement location=\"\\$\\{jsr173.jar\\}\" */>" all)
                         (string-append "<!-- " all " -->"))
-                       (("<pathelement path=\"\\$\\{coverage.classes.dir\\}\" */>" all)
+                       (("<pathelement path=\"\\$\\{coverage.classes.dir\\}\" */>"
+                         all)
                         (string-append "<!-- " all " -->"))
                        (("<pathelement path=\"lib/emma.jar\"/>" all)
                         (string-append "<!-- " all " -->"))
@@ -862,7 +856,8 @@ (define-public rhino
                         (string-append "<fileset dir=\"" snakeyaml-lib
                          "\" includes=\"**/*.jar\"/>"))
                        ;; Disabling instrumentation.
-                       (("(<target name=\"junit\" depends=\"junit-compile),.*" all pre)
+                       (("(<target name=\"junit\" depends=\"junit-compile),.*"
+                         all pre)
                         (string-append pre "\">"))))
                    (invoke "ant" "junit")))))
            (replace 'install
@@ -873,8 +868,7 @@ (define-public rhino
                                (rhino (string-append bin "/rhino"))
                                (man (string-append out "/share/man/man1")))
                           (mkdir-p bin)
-                          (with-directory-excursion "man"
-                            (install-file "rhino.1" man))
+                          (install-file "man/rhino.1" man)
                           (install-file (string-append "build/" pkg+ver
                                                        "/js.jar")
                                         (string-append out "/share/java"))
@@ -889,6 +883,6 @@ (define-public rhino
       (synopsis "Javascript implemented in Java")
       (description
        "Rhino implements ECMAScript, also known as JavaScript, in Java as
-specified in the fifth edition of ECMA-262")
-      (license license:mpl2.0))))
+specified in the fifth edition of ECMA-262.")
+      (license license:mpl2.0)))
 
-- 
2.34.0






  parent reply	other threads:[~2022-02-21 15:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16  1:58 [bug#54021] [PATCH] Add rhino javascript package Frank Pursel
2022-02-16 17:00 ` Maxime Devos
2022-02-16 17:02 ` Maxime Devos
2022-02-16 17:08   ` Julien Lepiller
2022-02-16 17:08 ` Maxime Devos
2022-02-16 17:09 ` Maxime Devos
2022-02-16 17:21 ` Maxime Devos
2022-02-16 18:36   ` Frank Pursel
2022-02-16 18:43     ` Maxime Devos
2022-02-17  5:22 ` [bug#54021] [PATCH] Adding rhino package, revised patch Frank Pursel
2022-02-21 16:28   ` Maxime Devos
2022-02-18 20:42 ` [bug#54021] [PATCH] if, at first, you don't succeed Frank Pursel
2022-02-21 13:19   ` Efraim Flashner
2022-02-21 15:54 ` Frank Pursel [this message]
2022-02-21 18:45 ` [bug#54021] [PATCH] Removing all bundled jars prior to build Frank Pursel
2022-02-26 21:07   ` Julien Lepiller
2022-02-28 19:38 ` [bug#54021] [PATCH] package for rhino Frank Pursel
2022-02-28 20:45   ` Julien Lepiller
2022-02-28 21:45 ` [bug#54021] [PATCH] question -> answers Frank Pursel
2022-03-01 21:26   ` bug#54021: [PATCH] Add rhino javascript package Julien Lepiller

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h78sqkph.fsf@gmail.com \
    --to=frank.pursel@gmail.com \
    --cc=54021@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.