Work toward getting antlr4
more/packages/java.scm
| 442 | 442 | #:source-dir "annotations/src/main/java")) | |
| 443 | 443 | (synopsis "") | |
| 444 | 444 | (description "") | |
| 445 | + | (home-page "https://github.com/google/j2objc") | |
| 445 | 446 | (license license:asl2.0))) | |
| 446 | 447 | ||
| 447 | 448 | ;; TODO: animal-sniffer-enforcer-rule and animal-sniffer-maven-plugin depend | |
… | |||
| 609 | 610 | (description "") | |
| 610 | 611 | (license license:x11))) | |
| 611 | 612 | ||
| 613 | + | ;; vanished from the face of the earth :/ | |
| 612 | 614 | (define-public java-jsonp | |
| 613 | 615 | (package | |
| 614 | 616 | (name "java-jsonp") | |
… | |||
| 660 | 662 | (home-page "") | |
| 661 | 663 | (synopsis "") | |
| 662 | 664 | (description "") | |
| 663 | - | (license license:asl2.0))) | |
| 665 | + | (license (list license:gpl2 | |
| 666 | + | ;; actually CDDL 1.1 | |
| 667 | + | license:cddl1.0)))) | |
| 664 | 668 | ||
| 665 | 669 | ;; requires jline, javax.servlet, org.fusesource.jansi, org.livetribe, | |
| 666 | 670 | ;; com.thoughtworks.xstream, org.apache.ivy, bsf | |
… | |||
| 799 | 803 | (system* "libtoolize") | |
| 800 | 804 | (system* "autoreconf" "-fiv")))))))) | |
| 801 | 805 | ||
| 802 | - | ;; javax.json.* | |
| 803 | - | ;; org.abego.treelayout.* | |
| 804 | - | ;; com.ibm.icu.* | |
| 805 | - | (define-public antlr4 | |
| 806 | + | (define-public java-json | |
| 807 | + | (package | |
| 808 | + | (name "java-json") | |
| 809 | + | (version "1.1.0-M2") | |
| 810 | + | (source (origin | |
| 811 | + | (method url-fetch) | |
| 812 | + | (uri (string-append "https://repo1.maven.org/maven2/javax/json/" | |
| 813 | + | "javax.json-api/" version "/javax.json-api-" | |
| 814 | + | version "-sources.jar")) | |
| 815 | + | (file-name (string-append name "-" version ".jar")) | |
| 816 | + | (sha256 | |
| 817 | + | (base32 | |
| 818 | + | "0gam8w52xjbmfc1inviyajk36jnj3lg4bzwhw05iq52kadycy6v0")))) | |
| 819 | + | (build-system ant-build-system) | |
| 820 | + | (arguments | |
| 821 | + | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
| 822 | + | #:tests? #f | |
| 823 | + | #:jdk ,icedtea-8 | |
| 824 | + | #:source-dir "src" | |
| 825 | + | #:phases | |
| 826 | + | (modify-phases %standard-phases | |
| 827 | + | (add-after 'unpack 'remove-module-info | |
| 828 | + | (lambda _ | |
| 829 | + | (format #t "~a\n" (getcwd)) | |
| 830 | + | (delete-file "src/module-info.java")))))) | |
| 831 | + | (home-page "") | |
| 832 | + | (synopsis "") | |
| 833 | + | (description "") | |
| 834 | + | (license license:asl2.0))) | |
| 835 | + | ||
| 836 | + | ;; We still need one file to be generated with ST4. | |
| 837 | + | ;; tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java | |
| 838 | + | ;; See https://github.com/kevinbirch/string-template-maven-plugin | |
| 839 | + | ;; We should take this and adapt to get a standalone tool. | |
| 840 | + | (define-public java-antlr4 | |
| 806 | 841 | (package | |
| 807 | - | (name "antlr4") | |
| 842 | + | (name "java-antlr4") | |
| 808 | 843 | (version "4.7") | |
| 809 | 844 | (source (origin | |
| 810 | 845 | (method url-fetch) | |
… | |||
| 818 | 853 | (arguments | |
| 819 | 854 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
| 820 | 855 | #:source-dir "runtime/Java/src:tool/src" | |
| 856 | + | #:jdk ,icedtea-8 | |
| 857 | + | #:tests? #f | |
| 821 | 858 | #:phases | |
| 822 | 859 | (modify-phases %standard-phases | |
| 823 | 860 | (add-before 'build 'generate-grammar | |
| 824 | 861 | (lambda* (#:key inputs #:allow-other-keys) | |
| 825 | - | (chdir "tool/src/org/antlr/v4/parse") | |
| 826 | - | (for-each (lambda (file) | |
| 827 | - | (format #t "~a\n" file) | |
| 828 | - | (system* "antlr3" file)) | |
| 829 | - | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" | |
| 830 | - | "GrammarTreeVisitor.g" "ATNBuilder.g" | |
| 831 | - | "ActionSplitter.g" "LeftRecursiveRuleWalker.g")) | |
| 832 | - | (chdir "../codegen") | |
| 833 | - | (copy-file "../parse/ANTLRParser.tokens" "ANTLRParser.tokens") | |
| 834 | - | (format #t "SourceGenTriggers.g\n") | |
| 835 | - | (system* "antlr3" "SourceGenTriggers.g") | |
| 836 | - | (chdir "../../../../../..")))))) | |
| 862 | + | (with-directory-excursion "tool/src/org/antlr/v4/parse" | |
| 863 | + | (for-each (lambda (file) | |
| 864 | + | (format #t "~a\n" file) | |
| 865 | + | (system* "antlr3" file)) | |
| 866 | + | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" | |
| 867 | + | "GrammarTreeVisitor.g" "ATNBuilder.g" | |
| 868 | + | "ActionSplitter.g" "LeftRecursiveRuleWalker.g"))) | |
| 869 | + | (with-directory-excursion "tool/src/org/antlr/v4/codegen" | |
| 870 | + | (copy-file "../parse/ANTLRParser.tokens" "ANTLRParser.tokens") | |
| 871 | + | (format #t "SourceGenTriggers.g\n") | |
| 872 | + | (system* "antlr3" "SourceGenTriggers.g"))))))) | |
| 837 | 873 | (inputs | |
| 838 | 874 | `(("antlr3" ,antlr3) | |
| 839 | 875 | ("icu4j" ,java-icu4j) | |
| 840 | - | ("java-jsonp" ,java-jsonp) | |
| 876 | + | ("java-json" ,java-json) | |
| 841 | 877 | ("treelayout" ,java-treelayout) | |
| 842 | 878 | ("stringtemplate4" ,stringtemplate4))) | |
| 843 | 879 | (home-page "https://antlr.org") | |
… | |||
| 845 | 881 | (description "") | |
| 846 | 882 | (license license:bsd-3))) | |
| 847 | 883 | ||
| 848 | - | ||
| 849 | 884 | ;; requires groovy 2.4.7. | |
| 850 | 885 | ;(define-public gradle | |
| 851 | 886 | ; (package | |