unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
@ 2018-05-23 17:12 Alex Vong
  2018-05-23 17:16 ` [bug#31570] [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-23 17:12 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995

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

Tags: patch

Hello,

This patch set will cause javacc to bootstrap from javacc-4 instead of
the bundled bootstrap jar. The next step would be to figure out how to
bootstrap javacc-4 by hand, which would be challenging I think...

Cheers,
Alex

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

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

* [bug#31570] [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4'.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
@ 2018-05-23 17:16 ` Alex Vong
  2018-05-23 17:17 ` [bug#31570] [PATCH 2/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-23 17:16 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-gnu-javacc-javacc-now-inherits-from-javacc-4.patch --]
[-- Type: text/x-diff, Size: 3941 bytes --]

From f9a32516aab9aca1b8797e685623ac8cfb188535 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 24 May 2018 00:21:49 +0800
Subject: [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4'.

* gnu/packages/java.scm (javacc, javacc-4): 'javacc' now inherits from
'javacc-4' instead of the opposite around.
---
 gnu/packages/java.scm | 47 ++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 90fd07c59..c64313046 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1861,27 +1861,31 @@ designs.")
                      license:asl2.0
                      license:cpl1.0)))))
 
-(define-public javacc
+(define-public javacc-4
   (package
     (name "javacc")
-    (version "7.0.3")
+    (version "4.1")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/javacc/javacc/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append "javacc-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/javacc/javacc.git")
+                    (commit "release_41")))
+              (file-name (string-append "javacc-" version "-checkout"))
               (sha256
                (base32
-                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
+                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
     (build-system ant-build-system)
+    ;; Tests fail with
+    ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
+    ;; JAVACODE failed
     (arguments
-     `(#:test-target "test"
+     `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'delete-bundled-libs
            (lambda _
              (delete-file-recursively "lib") #t))
-         (replace 'install (install-jars "target")))))
+         (replace 'install (install-jars "bin/lib")))))
     (home-page "https://javacc.org/")
     (synopsis "Java parser generator")
     (description "Java Compiler Compiler (JavaCC) is the most popular parser
@@ -1893,29 +1897,26 @@ as tree building (via a tool called JJTree included with JavaCC), actions,
 debugging, etc.")
     (license license:bsd-3)))
 
-(define-public javacc-4
-  (package (inherit javacc)
-    (version "4.1")
+(define-public javacc
+  (package
+    (inherit javacc-4)
+    (version "7.0.3")
     (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/javacc/javacc.git")
-                    (commit "release_41")))
-              (file-name (string-append "javacc-" version "-checkout"))
+              (method url-fetch)
+              (uri (string-append "https://github.com/javacc/javacc/"
+                                  "archive/" version ".tar.gz"))
+              (file-name (string-append "javacc-" version ".tar.gz"))
               (sha256
                (base32
-                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
-    ;; Tests fail with
-    ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
-    ;; JAVACODE failed
+                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
     (arguments
-     `(#:tests? #f
+     `(#:test-target "test"
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'delete-bundled-libs
            (lambda _
              (delete-file-recursively "lib") #t))
-         (replace 'install (install-jars "bin/lib")))))))
+         (replace 'install (install-jars "target")))))))
 
 ;; This is the last 3.x release of ECJ
 (define-public java-ecj-3
-- 
2.17.0


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

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

* [bug#31570] [PATCH 2/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
  2018-05-23 17:16 ` [bug#31570] [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
@ 2018-05-23 17:17 ` Alex Vong
  2018-05-24  9:22 ` [bug#31570] [PATCH 0/2] " Ricardo Wurmus
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-23 17:17 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0002-gnu-javacc-Bootstrap-from-javacc-4-instead-of-bootst.patch --]
[-- Type: text/x-diff, Size: 1677 bytes --]

From 567852350ba03246253218e56d87e5ab13e4bfaf Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 24 May 2018 00:32:51 +0800
Subject: [PATCH 2/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap
 binary.

* gnu/packages/java.scm (javacc)[arguments]: Use javacc-4, remove bootstrap
binary.
[native-inputs]: Add 'javacc-4'.
---
 gnu/packages/java.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c64313046..9ee795aba 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1910,13 +1910,21 @@ debugging, etc.")
                (base32
                 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
     (arguments
-     `(#:test-target "test"
+     `(#:make-flags ; bootstrap from javacc-4
+       (list (string-append "-Dbootstrap-jar="
+                            (assoc-ref %build-inputs "javacc")
+                            "/share/java/javacc.jar"))
+       #:test-target "test"
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'delete-bundled-libs
+         (add-after 'unpack 'delete-bundled-jars
            (lambda _
-             (delete-file-recursively "lib") #t))
-         (replace 'install (install-jars "target")))))))
+             (delete-file-recursively "bootstrap")
+             (delete-file-recursively "lib")
+             #t))
+         (replace 'install (install-jars "target")))))
+    (native-inputs
+     `(("javacc" ,javacc-4)))))
 
 ;; This is the last 3.x release of ECJ
 (define-public java-ecj-3
-- 
2.17.0


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

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

* [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
  2018-05-23 17:16 ` [bug#31570] [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
  2018-05-23 17:17 ` [bug#31570] [PATCH 2/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
@ 2018-05-24  9:22 ` Ricardo Wurmus
  2018-05-24 19:55   ` Alex Vong
  2018-05-25  0:21 ` [bug#31570] [PATCH 1/3] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2018-05-24  9:22 UTC (permalink / raw)
  To: Alex Vong; +Cc: 31570


Hi Alex,

> This patch set will cause javacc to bootstrap from javacc-4 instead of
> the bundled bootstrap jar. The next step would be to figure out how to
> bootstrap javacc-4 by hand, which would be challenging I think...

Thanks for this.

The patches look fine to me.

>         (modify-phases %standard-phases
> -         (add-after 'unpack 'delete-bundled-libs
> +         (add-after 'unpack 'delete-bundled-jars
>             (lambda _
> -             (delete-file-recursively "lib") #t))
> -         (replace 'install (install-jars "target")))))))
> +             (delete-file-recursively "bootstrap")
> +             (delete-file-recursively "lib")
> +             #t))

Can we delete these things in a snippet instead?

(I vaguely remember that we didn’t use snippets for jars because
patch-and-repack wouldn’t support the jar format, but I don’t know if
that’s still the case.)

-- 
Ricardo

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

* [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-24  9:22 ` [bug#31570] [PATCH 0/2] " Ricardo Wurmus
@ 2018-05-24 19:55   ` Alex Vong
  2018-05-25  0:19     ` Alex Vong
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Vong @ 2018-05-24 19:55 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: alexvong1995, 31570

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

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

[...]
> Can we delete these things in a snippet instead?
>
> (I vaguely remember that we didn’t use snippets for jars because
> patch-and-repack wouldn’t support the jar format, but I don’t know if
> that’s still the case.)

Indeed, it fails to build if I switch to use snippet. But I manage to
fix it by adding java-junit to native-inputs :) (since the error message
seems to be related to some missing junit symbols). Will send a revised
patch series later.

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

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

* [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-24 19:55   ` Alex Vong
@ 2018-05-25  0:19     ` Alex Vong
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-25  0:19 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: alexvong1995, 31570

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

Alex Vong <alexvong1995@gmail.com> writes:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>
> [...]
>> Can we delete these things in a snippet instead?
>>
>> (I vaguely remember that we didn’t use snippets for jars because
>> patch-and-repack wouldn’t support the jar format, but I don’t know if
>> that’s still the case.)
>
> Indeed, it fails to build if I switch to use snippet. But I manage to
> fix it by adding java-junit to native-inputs :) (since the error message
> seems to be related to some missing junit symbols). Will send a revised
> patch series later.

I decide to remove the tests instead of adding junit to native-inputs
since we are not running the tests for javacc-4 anyway. Here come the
patch series:

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

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

* [bug#31570] [PATCH 1/3] gnu: javacc: 'javacc' now inherits from 'javacc-4'.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
                   ` (2 preceding siblings ...)
  2018-05-24  9:22 ` [bug#31570] [PATCH 0/2] " Ricardo Wurmus
@ 2018-05-25  0:21 ` Alex Vong
  2018-05-25  0:22 ` [bug#31570] [PATCH 2/3] gnu: javacc: Use snippet to delete bundled jars Alex Vong
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-25  0:21 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-gnu-javacc-javacc-now-inherits-from-javacc-4.patch --]
[-- Type: text/x-diff, Size: 3941 bytes --]

From b46255b724c72d46c9c5f5418eaf7117de22ba92 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 24 May 2018 00:21:49 +0800
Subject: [PATCH 1/3] gnu: javacc: 'javacc' now inherits from 'javacc-4'.

* gnu/packages/java.scm (javacc, javacc-4): 'javacc' now inherits from
'javacc-4' instead of the opposite around.
---
 gnu/packages/java.scm | 47 ++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 90fd07c59..c64313046 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1861,27 +1861,31 @@ designs.")
                      license:asl2.0
                      license:cpl1.0)))))
 
-(define-public javacc
+(define-public javacc-4
   (package
     (name "javacc")
-    (version "7.0.3")
+    (version "4.1")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/javacc/javacc/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append "javacc-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/javacc/javacc.git")
+                    (commit "release_41")))
+              (file-name (string-append "javacc-" version "-checkout"))
               (sha256
                (base32
-                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
+                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
     (build-system ant-build-system)
+    ;; Tests fail with
+    ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
+    ;; JAVACODE failed
     (arguments
-     `(#:test-target "test"
+     `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'delete-bundled-libs
            (lambda _
              (delete-file-recursively "lib") #t))
-         (replace 'install (install-jars "target")))))
+         (replace 'install (install-jars "bin/lib")))))
     (home-page "https://javacc.org/")
     (synopsis "Java parser generator")
     (description "Java Compiler Compiler (JavaCC) is the most popular parser
@@ -1893,29 +1897,26 @@ as tree building (via a tool called JJTree included with JavaCC), actions,
 debugging, etc.")
     (license license:bsd-3)))
 
-(define-public javacc-4
-  (package (inherit javacc)
-    (version "4.1")
+(define-public javacc
+  (package
+    (inherit javacc-4)
+    (version "7.0.3")
     (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/javacc/javacc.git")
-                    (commit "release_41")))
-              (file-name (string-append "javacc-" version "-checkout"))
+              (method url-fetch)
+              (uri (string-append "https://github.com/javacc/javacc/"
+                                  "archive/" version ".tar.gz"))
+              (file-name (string-append "javacc-" version ".tar.gz"))
               (sha256
                (base32
-                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
-    ;; Tests fail with
-    ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
-    ;; JAVACODE failed
+                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
     (arguments
-     `(#:tests? #f
+     `(#:test-target "test"
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'delete-bundled-libs
            (lambda _
              (delete-file-recursively "lib") #t))
-         (replace 'install (install-jars "bin/lib")))))))
+         (replace 'install (install-jars "target")))))))
 
 ;; This is the last 3.x release of ECJ
 (define-public java-ecj-3
-- 
2.17.0


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

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

* [bug#31570] [PATCH 2/3] gnu: javacc: Use snippet to delete bundled jars.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
                   ` (3 preceding siblings ...)
  2018-05-25  0:21 ` [bug#31570] [PATCH 1/3] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
@ 2018-05-25  0:22 ` Alex Vong
  2018-05-25  0:23 ` [bug#31570] [PATCH 3/3] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
  2018-07-03 12:44 ` [bug#31570] [PATCH 0/2] " Julien Lepiller
  6 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-25  0:22 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0002-gnu-javacc-Use-snippet-to-delete-bundled-jars.patch --]
[-- Type: text/x-diff, Size: 3206 bytes --]

From 16079becafbd7d9272f68a9d91412846697e3626 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Fri, 25 May 2018 07:43:42 +0800
Subject: [PATCH 2/3] gnu: javacc: Use snippet to delete bundled jars.

* gnu/packages/java.scm (javacc-4)[source](snippet, modules): New fields.
[arguments]: Remove 'delete-bundled-libs' phase and add 'delete-tests'
phase.
* gnu/packages/java.scm (javacc)[source](snippet, modules): New fields.
[arguments]: Remove 'delete-bundled-libs' phase.
---
 gnu/packages/java.scm | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c64313046..ce4a6b8ac 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1873,7 +1873,10 @@ designs.")
               (file-name (string-append "javacc-" version "-checkout"))
               (sha256
                (base32
-                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
+                "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
+              (modules '((guix build utils)))
+              ;; delete bundled jars
+              (snippet '(begin (delete-file-recursively "lib") #t))))
     (build-system ant-build-system)
     ;; Tests fail with
     ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
@@ -1882,9 +1885,18 @@ designs.")
      `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'delete-bundled-libs
+         ;; Delete tests to avoid build failure (we don't run them anyway).
+         (add-after 'unpack 'delete-tests
            (lambda _
-             (delete-file-recursively "lib") #t))
+             (for-each delete-file
+                       '("src/org/javacc/JavaCCTestCase.java"
+                         "src/org/javacc/parser/ExpansionTest.java"
+                         "src/org/javacc/parser/OptionsTest.java"
+                         "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
+             (for-each delete-file-recursively
+                       '("src/org/javacc/parser/test"
+                         "src/org/javacc/jjdoc/test"))
+             #t))
          (replace 'install (install-jars "bin/lib")))))
     (home-page "https://javacc.org/")
     (synopsis "Java parser generator")
@@ -1908,14 +1920,14 @@ debugging, etc.")
               (file-name (string-append "javacc-" version ".tar.gz"))
               (sha256
                (base32
-                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
+                "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
+              (modules '((guix build utils)))
+              ;; delete bundled jars
+              (snippet '(begin (delete-file-recursively "lib") #t))))
     (arguments
      `(#:test-target "test"
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'delete-bundled-libs
-           (lambda _
-             (delete-file-recursively "lib") #t))
          (replace 'install (install-jars "target")))))))
 
 ;; This is the last 3.x release of ECJ
-- 
2.17.0


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

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

* [bug#31570] [PATCH 3/3] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
                   ` (4 preceding siblings ...)
  2018-05-25  0:22 ` [bug#31570] [PATCH 2/3] gnu: javacc: Use snippet to delete bundled jars Alex Vong
@ 2018-05-25  0:23 ` Alex Vong
  2018-07-03 12:44 ` [bug#31570] [PATCH 0/2] " Julien Lepiller
  6 siblings, 0 replies; 10+ messages in thread
From: Alex Vong @ 2018-05-25  0:23 UTC (permalink / raw)
  To: 31570; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0003-gnu-javacc-Bootstrap-from-javacc-4-instead-of-bootst.patch --]
[-- Type: text/x-diff, Size: 1732 bytes --]

From 5e84c4dc3a36fa304277801f4e259aa795cf92e3 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 24 May 2018 00:32:51 +0800
Subject: [PATCH 3/3] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap
 binary.

* gnu/packages/java.scm (javacc)[source](snippet): Delete bootstrap binary.
[arguments]: Set 'bootstrap-jar' path.
[native-inputs]: Add 'javacc-4'.
---
 gnu/packages/java.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ce4a6b8ac..5bcd94022 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1923,12 +1923,20 @@ debugging, etc.")
                 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
               (modules '((guix build utils)))
               ;; delete bundled jars
-              (snippet '(begin (delete-file-recursively "lib") #t))))
-    (arguments
-     `(#:test-target "test"
+              (snippet '(begin (for-each delete-file-recursively
+                                         '("bootstrap" "lib"))
+                               #t))))
+    (arguments
+     `(#:make-flags ; bootstrap from javacc-4
+       (list (string-append "-Dbootstrap-jar="
+                            (assoc-ref %build-inputs "javacc")
+                            "/share/java/javacc.jar"))
+       #:test-target "test"
        #:phases
        (modify-phases %standard-phases
-         (replace 'install (install-jars "target")))))))
+         (replace 'install (install-jars "target")))))
+    (native-inputs
+     `(("javacc" ,javacc-4)))))
 
 ;; This is the last 3.x release of ECJ
 (define-public java-ecj-3
-- 
2.17.0


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

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

* [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary.
  2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
                   ` (5 preceding siblings ...)
  2018-05-25  0:23 ` [bug#31570] [PATCH 3/3] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
@ 2018-07-03 12:44 ` Julien Lepiller
  6 siblings, 0 replies; 10+ messages in thread
From: Julien Lepiller @ 2018-07-03 12:44 UTC (permalink / raw)
  To: 31570

Le 2018-05-23 19:12, Alex Vong a écrit :
> Tags: patch
> 
> Hello,
> 
> This patch set will cause javacc to bootstrap from javacc-4 instead of
> the bundled bootstrap jar. The next step would be to figure out how to
> bootstrap javacc-4 by hand, which would be challenging I think...
> 
> Cheers,
> Alex

Hi Alex,

What's the status of this patch series? Do you think you can push them?

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

end of thread, other threads:[~2018-07-03 12:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-23 17:12 [bug#31570] [PATCH 0/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
2018-05-23 17:16 ` [bug#31570] [PATCH 1/2] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
2018-05-23 17:17 ` [bug#31570] [PATCH 2/2] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
2018-05-24  9:22 ` [bug#31570] [PATCH 0/2] " Ricardo Wurmus
2018-05-24 19:55   ` Alex Vong
2018-05-25  0:19     ` Alex Vong
2018-05-25  0:21 ` [bug#31570] [PATCH 1/3] gnu: javacc: 'javacc' now inherits from 'javacc-4' Alex Vong
2018-05-25  0:22 ` [bug#31570] [PATCH 2/3] gnu: javacc: Use snippet to delete bundled jars Alex Vong
2018-05-25  0:23 ` [bug#31570] [PATCH 3/3] gnu: javacc: Bootstrap from javacc-4 instead of bootstrap binary Alex Vong
2018-07-03 12:44 ` [bug#31570] [PATCH 0/2] " Julien Lepiller

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