gnu: Add javacc-3.
authorJulien Lepiller <julien@lepiller.eu>
Sun, 17 May 2020 16:01:32 +0000 (18:01 +0200)
committerJulien Lepiller <julien@lepiller.eu>
Fri, 17 Jul 2020 02:13:41 +0000 (04:13 +0200)
* gnu/packages/java.scm (javacc-3): New variable.

gnu/packages/java.scm

index e5e7586..f3c8abe 100644 (file)
@@ -2696,6 +2696,35 @@ as tree building (via a tool called JJTree included with JavaCC), actions,
 debugging, etc.")
     (license license:bsd-3)))
 
+;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
+;; in the bootstrap/ directory.
+(define-public javacc-3
+  (package
+    (inherit javacc-4)
+    (version "3.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/javacc/javacc.git")
+                    (commit "release_32")))
+              (file-name (string-append "javacc-" version "-checkout"))
+              (sha256
+               (base32
+                "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-java-version
+           (lambda _
+             (for-each
+               (lambda (file)
+                 (substitute* file
+                   (("debug=") "source=\"1.4\" debug=")))
+               (find-files "." "build.xml"))
+             #t))
+         (replace 'install (install-jars "bin/lib")))))))
+
 (define-public javacc
   (package
     (inherit javacc-4)