diff options
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r-- | gnu/packages/java.scm | 1250 |
1 files changed, 1146 insertions, 104 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 13e261438d..e86c904e71 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -45,6 +45,7 @@ #:use-module (gnu packages ghostscript) ;lcms #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages linux) ;alsa #:use-module (gnu packages wget) @@ -340,12 +341,12 @@ build process and its dependencies, whereas Make uses Makefile format.") (license license:asl2.0))) (define-public icedtea-7 - (let* ((version "2.6.9") + (let* ((version "2.6.10") (drop (lambda (name hash) (origin (method url-fetch) (uri (string-append - "http://icedtea.classpath.org/download/drops/" + "http://icedtea.classpath.org/download/drops" "/icedtea7/" version "/" name ".tar.bz2")) (sha256 (base32 hash)))))) (package @@ -358,7 +359,7 @@ build process and its dependencies, whereas Make uses Makefile format.") version ".tar.xz")) (sha256 (base32 - "1slmajiakq7sk137vgqq9c93r5s620a46lw2jwbnzxhysjw3wkwf")) + "0am945k2zqrka2xn7lb5grmkad4lwncnhnwk8iq6f269birzsj8w")) (modules '((guix build utils))) (snippet '(substitute* "Makefile.in" @@ -769,25 +770,25 @@ build process and its dependencies, whereas Make uses Makefile format.") (native-inputs `(("openjdk-src" ,(drop "openjdk" - "08a4d1sg5m9l99lc7gafc7dmzmf4d8jvij5pffxv8rf6pk7psk24")) + "02klsxp9hlf5sial6mxpiq53hmrhlrg6x774j7bjjfhb7hpdvadh")) ("corba-drop" ,(drop "corba" - "12br49cfrqgvms0bnaij7fvnakvb6q8dlpqja64rg5q5r3x4gps8")) + "1vbly6khri241xda05gnwkpf2fk41d96ls96ximi084mx0a3w5rd")) ("jaxp-drop" ,(drop "jaxp" - "07v2y3pll6z2wma94qilgffwyn2n4jna01mrhqwkb27whfpjfkmz")) + "0s8zln64vdwdxwlw1vpfzm8xbpyhgsv3nqjmnv7y36qpsszg27a5")) ("jaxws-drop" ,(drop "jaxws" - "18rw64jjpq14v56d0q1xvz8knl0kf02rcday7fvlaxrbbj19km55")) + "0myd66bv8ib8krzgqv754bc564rd8xwpwabvf7my1apyb86vap3n")) ("jdk-drop" ,(drop "jdk" - "1ig7xipi3vzm6cphy5fdraxi72p27xsg2qb51yqx9qwsmlrv1zj4")) + "10b4lfv10vba07zblw0wii7mhrfhf32pf7410x5nz2q0smgszl2h")) ("langtools-drop" ,(drop "langtools" - "0sn9qv9nnhaan2smbhrv54lfhwsjhgd3b3h736p5d2hzpw8kicry")) + "0lvncxb5qzrlqkflrnd0l8vwy155cwj1jb07rkq10z2vx0bq7lq2")) ("hotspot-drop" ,(drop "hotspot" - "16ijxy8br8dla339m4i90wr9xpf7s8z3nrhfyxm7jahr8injpzyl")) + "0q6mdgbbd3681y3n0z1v783irdjhhi73z6sn5csczpyhjm318axb")) ("ant" ,ant) ("attr" ,attr) ("autoconf" ,autoconf) @@ -839,16 +840,16 @@ IcedTea build harness.") (license license:gpl2+)))) (define-public icedtea-8 - (let* ((version "3.3.0") + (let* ((version "3.4.0") (drop (lambda (name hash) (origin (method url-fetch) (uri (string-append - "http://icedtea.classpath.org/download/drops/" + "http://icedtea.classpath.org/download/drops" "/icedtea8/" version "/" name ".tar.xz")) (sha256 (base32 hash)))))) (package (inherit icedtea-7) - (version "3.3.0") + (version "3.4.0") (source (origin (method url-fetch) (uri (string-append @@ -856,7 +857,7 @@ IcedTea build harness.") version ".tar.xz")) (sha256 (base32 - "02vmxa6gc6gizcri1fy797qmmm9y77vgi7gy9pwkk4agcw4zyr5p")) + "16if055973y6yw7n5gczp8iksvc31cy4p5by9lkbniadqj4z665m")) (modules '((guix build utils))) (snippet '(begin @@ -928,31 +929,34 @@ IcedTea build harness.") `(("jdk" ,icedtea-7 "jdk") ("openjdk-src" ,(drop "openjdk" - "0889n19w6rvpzxgmmk9hlgzdh9ya95qkc2ajgpnzr3h69g15nz48")) + "0va5i3zr8y8ncv914rz914jda9d88gq0viww3smdqnln8n78rszi")) + ("aarch32-drop" + ,(drop "aarch32" + "0cway5a5hcfyh4pzl9zz5xr7lil4gsliy6r5iqbaasd2d9alvqiq")) ("corba-drop" ,(drop "corba" - "0qcb72hhlsjgp6h9wd048qgyc88b7lfnxyc51xfyav0nhpfjnj8r")) + "1l9zr97a3kq00bj4i8wcdsjlz3xlfldxd8zhkcxikinwd5n0n8a7")) ("jaxp-drop" ,(drop "jaxp" - "1vyc7dw10x5k45jmi348y8min6sg651ns12zzn30fjzhpfi36nds")) + "0lqxrsr3xlpwm2na6f2rpl7znrz34dkb9dg3zjmympyjy4kqljn7")) ("jaxws-drop" ,(drop "jaxws" - "1dki6p39z1ms94cjvj5hd9q75q75g244c0xib82pma3q74jg6hx4")) + "1b3chckk10dzrpa7cswmcf1jvryaiwkj8lihfqjr5j7l668jwr4h")) ("jdk-drop" ,(drop "jdk" - "17czby3nylcglp7l3d90a4pz1izc1sslifv8hrmynm9hn4m9d3k8")) + "15lq0k2jv2x26x6vqkbljdcxk35i3b60pcsw3j1sdfmlk1xy6wgc")) ("langtools-drop" ,(drop "langtools" - "1h4azc21k58g9gn2y686wrvn9ahgac0ii7jhrrrmb5c1kjs0y2qv")) + "17xkb8ahkg04ri0bp5wblcp1a2lp8j7c83ic5zdbggvgm339k5s8")) ("hotspot-drop" ,(drop "hotspot" - "12bfgwhrjfhgj6a2dsysdwhirg0jx88pi44y7s8a1bdan1mp03r8")) + "0xpx8ykaq0ki6r0dl3dzca2xgp1p82z8mvsxcs2931ib667ncgcp")) ("nashorn-drop" ,(drop "nashorn" - "0bg9r16jffc64fhyczn4jpx7bkfw7w62prw65mh66vshqk4lbh0f")) + "1bnn4731lhlvg8axy4mjxgvh646yl22hp52wipx8cfca4vkn2f1z")) ("shenandoah-drop" ,(drop "shenandoah" - "0abjlsvz669i06mlks28wnh11mm55y5613990pn5j7hfbw8a34q5")) + "0fpxl8zlii1hpm777r875ys2cr5ih3gb6p1nm9jfa6krjrccrxv1")) ,@(fold alist-delete (package-native-inputs icedtea-7) '("gcj" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" "jdk-drop" "langtools-drop" "hotspot-drop"))))))) @@ -1975,6 +1979,1010 @@ logging implementations. A library that uses the commons-logging API can be used with any logging implementation at runtime.") (license license:asl2.0))) +;; This is the last release of the 1.x series. +(define-public java-mockito-1 + (package + (name "java-mockito") + (version "1.10.19") + (source (origin + (method url-fetch) + (uri (string-append "http://repo1.maven.org/maven2/" + "org/mockito/mockito-core/" version + "/mockito-core-" version "-sources.jar")) + (sha256 + (base32 + "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "mockito.jar" + #:tests? #f ; no tests included + ;; FIXME: patch-and-repack does not support jars, so we have to apply + ;; patches in build phases. + #:phases + (modify-phases %standard-phases + ;; Mockito was developed against a different version of hamcrest, + ;; which does not require matcher implementations to provide an + ;; implementation of the "describeMismatch" method. We add this + ;; simple definition to pass the build with our version of hamcrest. + (add-after 'unpack 'fix-hamcrest-build-error + (lambda _ + (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" + (("public Matcher getActualMatcher\\(\\) .*" line) + (string-append " + public void describeMismatch(Object item, Description description) { + actualMatcher.describeMismatch(item, description); + }" + line))) + #t)) + ;; Mockito bundles cglib. We have a cglib package, so let's use + ;; that instead. + (add-after 'unpack 'use-system-libraries + (lambda _ + (with-directory-excursion "src/org/mockito/internal/creation/cglib" + (substitute* '("CGLIBHacker.java" + "CglibMockMaker.java" + "ClassImposterizer.java" + "DelegatingMockitoMethodProxy.java" + "MethodInterceptorFilter.java" + "MockitoNamingPolicy.java" + "SerializableMockitoMethodProxy.java" + "SerializableNoOp.java") + (("import org.mockito.cglib") "import net.sf.cglib"))) + #t))))) + (inputs + `(("java-junit" ,java-junit) + ("java-objenesis" ,java-objenesis) + ("java-cglib" ,java-cglib) + ("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "http://mockito.org") + (synopsis "Mockito is a mock library for Java") + (description "Mockito is a mocking library for Java which lets you write +tests with a clean and simple API. It generates mocks using reflection, and +it records all mock invocations, including methods arguments.") + (license license:asl2.0))) + +(define-public java-httpcomponents-httpcore + (package + (name "java-httpcomponents-httpcore") + (version "4.4.6") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache//httpcomponents/httpcore/" + "source/httpcomponents-core-" + version "-src.tar.gz")) + (sha256 + (base32 + "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "httpcomponents-httpcore.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "httpcore") #t))))) + (inputs + `(("java-commons-logging-minimal" ,java-commons-logging-minimal) + ("java-commons-lang3" ,java-commons-lang3))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-mockito" ,java-mockito-1))) + (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") + (synopsis "Low level HTTP transport components") + (description "HttpCore is a set of low level HTTP transport components +that can be used to build custom client and server side HTTP services with a +minimal footprint. HttpCore supports two I/O models: blocking I/O model based +on the classic Java I/O and non-blocking, event driven I/O model based on Java +NIO. + +This package provides the blocking I/O model library.") + (license license:asl2.0))) + +(define-public java-httpcomponents-httpcore-nio + (package (inherit java-httpcomponents-httpcore) + (name "java-httpcomponents-httpcore-nio") + (arguments + `(#:jar-name "httpcomponents-httpcore-nio.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "httpcore-nio") #t))))) + (inputs + `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) + ("java-hamcrest-core" ,java-hamcrest-core) + ,@(package-inputs java-httpcomponents-httpcore))) + (description "HttpCore is a set of low level HTTP transport components +that can be used to build custom client and server side HTTP services with a +minimal footprint. HttpCore supports two I/O models: blocking I/O model based +on the classic Java I/O and non-blocking, event driven I/O model based on Java +NIO. + +This package provides the non-blocking I/O model library based on Java +NIO."))) + +(define-public java-httpcomponents-httpcore-ab + (package (inherit java-httpcomponents-httpcore) + (name "java-httpcomponents-httpcore-ab") + (arguments + `(#:jar-name "httpcomponents-httpcore-ab.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "httpcore-ab") #t))))) + (inputs + `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) + ("java-commons-cli" ,java-commons-cli) + ("java-hamcrest-core" ,java-hamcrest-core) + ,@(package-inputs java-httpcomponents-httpcore))) + (synopsis "Apache HttpCore benchmarking tool") + (description "This package provides the HttpCore benchmarking tool. It is +an Apache AB clone based on HttpCore."))) + +(define-public java-httpcomponents-httpclient + (package + (name "java-httpcomponents-httpclient") + (version "4.5.3") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/httpcomponents/httpclient/" + "source/httpcomponents-client-" + version "-src.tar.gz")) + (sha256 + (base32 + "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "httpcomponents-httpclient.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "httpclient") #t))))) + (inputs + `(("java-commons-logging-minimal" ,java-commons-logging-minimal) + ("java-commons-codec" ,java-commons-codec) + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) + ("java-mockito" ,java-mockito-1) + ("java-junit" ,java-junit))) + (home-page "https://hc.apache.org/httpcomponents-client-ga/") + (synopsis "HTTP client library for Java") + (description "Although the @code{java.net} package provides basic +functionality for accessing resources via HTTP, it doesn't provide the full +flexibility or functionality needed by many applications. @code{HttpClient} +seeks to fill this void by providing an efficient, up-to-date, and +feature-rich package implementing the client side of the most recent HTTP +standards and recommendations.") + (license license:asl2.0))) + +(define-public java-httpcomponents-httpmime + (package (inherit java-httpcomponents-httpclient) + (name "java-httpcomponents-httpmime") + (arguments + `(#:jar-name "httpcomponents-httpmime.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "httpmime") #t))))) + (inputs + `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) + ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) + ("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core))))) + +(define-public java-commons-net + (package + (name "java-commons-net") + (version "3.6") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/commons/net/source/" + "commons-net-" version "-src.tar.gz")) + (sha256 + (base32 + "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) + (build-system ant-build-system) + (arguments + `(;; FIXME: MainTest.java tries to read "examples.properties" (which + ;; should be "resources/examples/examples.properties"), but gets "null" + ;; instead. + #:tests? #f + #:jar-name "commons-net.jar")) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "http://commons.apache.org/net/") + (synopsis "Client library for many basic Internet protocols") + (description "The Apache Commons Net library implements the client side of +many basic Internet protocols. The purpose of the library is to provide +fundamental protocol access, not higher-level abstractions.") + (license license:asl2.0))) + +(define-public java-jsch + (package + (name "java-jsch") + (version "0.1.54") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/jsch/jsch/" + version "/jsch-" version ".zip")) + (sha256 + (base32 + "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb")))) + (build-system ant-build-system) + (arguments + `(#:build-target "dist" + #:tests? #f ; no tests included + #:phases + (modify-phases %standard-phases + (replace 'install (install-jars "dist"))))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "http://www.jcraft.com/jsch/") + (synopsis "Pure Java implementation of SSH2") + (description "JSch is a pure Java implementation of SSH2. JSch allows you +to connect to an SSH server and use port forwarding, X11 forwarding, file +transfer, etc., and you can integrate its functionality into your own Java +programs.") + (license license:bsd-3))) + +(define-public java-commons-compress + (package + (name "java-commons-compress") + (version "1.13") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/commons/compress/source/" + "commons-compress-" version "-src.tar.gz")) + (sha256 + (base32 + "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "commons-compress.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'delete-bad-tests + (lambda _ + (with-directory-excursion "src/test/java/org/apache/commons/compress/" + ;; FIXME: These tests really should not fail. Maybe they are + ;; indicative of problems with our Java packaging work. + + ;; This test fails with a null pointer exception. + (delete-file "archivers/sevenz/SevenZOutputFileTest.java") + ;; This test fails to open test resources. + (delete-file "archivers/zip/ExplodeSupportTest.java") + + ;; FIXME: This test adds a dependency on powermock, which is hard to + ;; package at this point. + ;; https://github.com/powermock/powermock + (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) + #t))))) + (inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-mockito" ,java-mockito-1) + ("java-xz" ,java-xz))) + (home-page "https://commons.apache.org/proper/commons-compress/") + (synopsis "Java library for working with compressed files") + (description "The Apache Commons Compress library defines an API for +working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, +Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") + (license license:asl2.0))) + +(define-public java-commons-net + (package + (name "java-commons-net") + (version "3.6") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/commons/net/source/" + "commons-net-" version "-src.tar.gz")) + (sha256 + (base32 + "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) + (build-system ant-build-system) + (arguments + `(;; FIXME: MainTest.java tries to read "examples.properties" (which + ;; should be "resources/examples/examples.properties"), but gets "null" + ;; instead. + #:tests? #f + #:jar-name "commons-net.jar")) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "http://commons.apache.org/net/") + (synopsis "Client library for many basic Internet protocols") + (description "The Apache Commons Net library implements the client side of +many basic Internet protocols. The purpose of the library is to provide +fundamental protocol access, not higher-level abstractions.") + (license license:asl2.0))) + +(define-public java-osgi-annotation + (package + (name "java-osgi-annotation") + (version "6.0.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/osgi/org.osgi.annotation/" version "/" + "org.osgi.annotation-" version "-sources.jar")) + (sha256 + (base32 + "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests + #:jar-name "osgi-annotation.jar")) + (home-page "http://www.osgi.org") + (synopsis "Annotation module of OSGi framework") + (description + "OSGi, for Open Services Gateway initiative framework, is a module system +and service platform for the Java programming language. This package contains +the OSGi annotation module, providing additional services to help dynamic +components.") + (license license:asl2.0))) + +(define-public java-osgi-core + (package + (name "java-osgi-core") + (version "6.0.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/osgi/org.osgi.core/" version "/" + "org.osgi.core-" version "-sources.jar")) + (sha256 + (base32 + "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests + #:jar-name "osgi-core.jar")) + (inputs + `(("java-osgi-annotation" ,java-osgi-annotation))) + (home-page "http://www.osgi.org") + (synopsis "Core module of OSGi framework") + (description + "OSGi, for Open Services Gateway initiative framework, is a module system +and service platform for the Java programming language. This package contains +the OSGi Core module.") + (license license:asl2.0))) + +(define-public java-osgi-service-event + (package + (name "java-osgi-service-event") + (version "1.3.1") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/osgi/org.osgi.service.event/" + version "/org.osgi.service.event-" + version "-sources.jar")) + (sha256 + (base32 + "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests + #:jar-name "osgi-service-event.jar")) + (inputs + `(("java-osgi-annotation" ,java-osgi-annotation) + ("java-osgi-core" ,java-osgi-core))) + (home-page "http://www.osgi.org") + (synopsis "OSGi service event module") + (description + "OSGi, for Open Services Gateway initiative framework, is a module system +and service platform for the Java programming language. This package contains +the OSGi @code{org.osgi.service.event} module.") + (license license:asl2.0))) + +(define-public java-eclipse-osgi + (package + (name "java-eclipse-osgi") + (version "3.11.3") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.osgi/" + version "/org.eclipse.osgi-" + version "-sources.jar")) + (sha256 + (base32 + "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-equinox-osgi.jar")) + (inputs + `(("java-osgi-annotation" ,java-osgi-annotation))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Eclipse Equinox OSGi framework") + (description "This package provides an implementation of the OSGi Core +specification.") + (license license:epl1.0))) + +(define-public java-eclipse-equinox-common + (package + (name "java-eclipse-equinox-common") + (version "3.8.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.equinox.common/" + version "/org.eclipse.equinox.common-" + version "-sources.jar")) + (sha256 + (base32 + "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-equinox-common.jar")) + (inputs + `(("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Common Eclipse runtime") + (description "This package provides the common Eclipse runtime.") + (license license:epl1.0))) + +(define-public java-eclipse-core-jobs + (package + (name "java-eclipse-core-jobs") + (version "3.8.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.jobs/" + version "/org.eclipse.core.jobs-" + version "-sources.jar")) + (sha256 + (base32 + "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-jobs.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Eclipse jobs mechanism") + (description "This package provides the Eclipse jobs mechanism.") + (license license:epl1.0))) + +(define-public java-eclipse-equinox-registry + (package + (name "java-eclipse-equinox-registry") + (version "3.6.100") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.equinox.registry/" + version "/org.eclipse.equinox.registry-" + version "-sources.jar")) + (sha256 + (base32 + "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-equinox-registry.jar")) + (inputs + `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Eclipse extension registry support") + (description "This package provides support for the Eclipse extension +registry.") + (license license:epl1.0))) + +(define-public java-eclipse-equinox-app + (package + (name "java-eclipse-equinox-app") + (version "1.3.400") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.equinox.app/" + version "/org.eclipse.equinox.app-" + version "-sources.jar")) + (sha256 + (base32 + "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-equinox-app.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-osgi" ,java-eclipse-osgi) + ("java-osgi-service-event" ,java-osgi-service-event))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Equinox application container") + (description "This package provides the Equinox application container for +Eclipse.") + (license license:epl1.0))) + +(define-public java-eclipse-equinox-preferences + (package + (name "java-eclipse-equinox-preferences") + (version "3.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.equinox.preferences/" + version "/org.eclipse.equinox.preferences-" + version "-sources.jar")) + (sha256 + (base32 + "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-equinox-preferences.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "http://www.eclipse.org/equinox/") + (synopsis "Eclipse preferences mechanism") + (description "This package provides the Eclipse preferences mechanism with +the module @code{org.eclipse.equinox.preferences}.") + (license license:epl1.0))) + +(define-public java-eclipse-core-contenttype + (package + (name "java-eclipse-core-contenttype") + (version "3.5.100") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.contenttype/" + version "/org.eclipse.core.contenttype-" + version "-sources.jar")) + (sha256 + (base32 + "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-contenttype.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "http://www.eclipse.org/") + (synopsis "Eclipse content mechanism") + (description "This package provides the Eclipse content mechanism in the +@code{org.eclipse.core.contenttype} module.") + (license license:epl1.0))) + +(define-public java-eclipse-core-runtime + (package + (name "java-eclipse-core-runtime") + (version "3.12.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.runtime/" + version "/org.eclipse.core.runtime-" + version "-sources.jar")) + (sha256 + (base32 + "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-runtime.jar")) + (inputs + `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) + ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) + ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/") + (synopsis "Eclipse core runtime") + (description "This package provides the Eclipse core runtime with the +module @code{org.eclipse.core.runtime}.") + (license license:epl1.0))) + +(define-public java-eclipse-core-filesystem + (package + (name "java-eclipse-core-filesystem") + (version "1.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.filesystem/" + version "/org.eclipse.core.filesystem-" + version "-sources.jar")) + (sha256 + (base32 + "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-filesystem.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/") + (synopsis "Eclipse core file system") + (description "This package provides the Eclipse core file system with the +module @code{org.eclipse.core.filesystem}.") + (license license:epl1.0))) + +(define-public java-eclipse-core-expressions + (package + (name "java-eclipse-core-expressions") + (version "3.5.100") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.expressions/" + version "/org.eclipse.core.expressions-" + version "-sources.jar")) + (sha256 + (base32 + "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-expressions.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/") + (synopsis "Eclipse core expression language") + (description "This package provides the Eclipse core expression language +with the @code{org.eclipse.core.expressions} module.") + (license license:epl1.0))) + +(define-public java-eclipse-core-variables + (package + (name "java-eclipse-core-variables") + (version "3.3.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.variables/" + version "/org.eclipse.core.variables-" + version "-sources.jar")) + (sha256 + (base32 + "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-variables.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/platform") + (synopsis "Eclipse core variables") + (description "This package provides the Eclipse core variables module +@code{org.eclipse.core.variables}.") + (license license:epl1.0))) + +(define-public java-eclipse-ant-core + (package + (name "java-eclipse-ant-core") + (version "3.4.100") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.ant.core/" + version "/org.eclipse.ant.core-" + version "-sources.jar")) + (sha256 + (base32 + "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-ant-core.jar")) + (inputs + `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-core-variables" ,java-eclipse-core-variables) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/platform") + (synopsis "Ant build tool core libraries") + (description "This package provides the ant build tool core libraries with +the module @code{org.eclipse.ant.core}.") + (license license:epl1.0))) + +(define-public java-eclipse-core-resources + (package + (name "java-eclipse-core-resources") + (version "3.11.1") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.resources/" + version "/org.eclipse.core.resources-" + version "-sources.jar")) + (sha256 + (base32 + "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-resources.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) + ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) + ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) + ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-ant-core" ,java-eclipse-ant-core) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/") + (synopsis "Eclipse core resource management") + (description "This package provides the Eclipse core resource management +module @code{org.eclipse.core.resources}.") + (license license:epl1.0))) + +(define-public java-eclipse-compare-core + (package + (name "java-eclipse-compare-core") + (version "3.6.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.compare.core/" + version "/org.eclipse.compare.core-" + version "-sources.jar")) + (sha256 + (base32 + "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-compare-core.jar")) + (inputs + `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-osgi" ,java-eclipse-osgi) + ("java-icu4j" ,java-icu4j))) + (home-page "https://www.eclipse.org/") + (synopsis "Eclipse core compare support") + (description "This package provides the Eclipse core compare support +module @code{org.eclipse.compare.core}.") + (license license:epl1.0))) + +(define-public java-eclipse-team-core + (package + (name "java-eclipse-team-core") + (version "3.8.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.team.core/" + version "/org.eclipse.team.core-" + version "-sources.jar")) + (sha256 + (base32 + "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-team-core.jar")) + (inputs + `(("java-eclipse-compare-core" ,java-eclipse-compare-core) + ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) + ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) + ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) + ("java-eclipse-core-resources" ,java-eclipse-core-resources) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-osgi" ,java-eclipse-osgi))) + (home-page "https://www.eclipse.org/platform") + (synopsis "Eclipse team support core") + (description "This package provides the Eclipse team support core module +@code{org.eclipse.team.core}.") + (license license:epl1.0))) + +(define-public java-eclipse-core-commands + (package + (name "java-eclipse-core-commands") + (version "3.8.1") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.core.commands/" + version "/org.eclipse.core.commands-" + version "-sources.jar")) + (sha256 + (base32 + "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-core-commands.jar")) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) + (home-page "https://www.eclipse.org/platform") + (synopsis "Eclipse core commands") + (description "This package provides Eclipse core commands in the module +@code{org.eclipse.core.commands}.") + (license license:epl1.0))) + +(define-public java-eclipse-text + (package + (name "java-eclipse-text") + (version "3.6.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/platform/org.eclipse.text/" + version "/org.eclipse.text-" + version "-sources.jar")) + (sha256 + (base32 + "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-text.jar" + #:phases + (modify-phases %standard-phases + ;; When creating a new category we must make sure that the new list + ;; matches List<Position>. By default it seems to be too generic + ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. + ;; Without this we get this error: + ;; + ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: + ;; error: method put in interface Map<K,V> cannot be applied to given types; + ;; [javac] fPositions.put(category, new ArrayList<>()); + ;; [javac] ^ + ;; [javac] required: String,List<Position> + ;; [javac] found: String,ArrayList<Object> + ;; [javac] reason: actual argument ArrayList<Object> cannot be converted + ;; to List<Position> by method invocation conversion + ;; [javac] where K,V are type-variables: + ;; [javac] K extends Object declared in interface Map + ;; [javac] V extends Object declared in interface Map + ;; + ;; I don't know if this is a good fix. I suspect it is not, but it + ;; seems to work. + (add-after 'unpack 'fix-compilation-error + (lambda _ + (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" + (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") + "Positions.put(category, new ArrayList<Position>());")) + #t))))) + (inputs + `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-core-commands" ,java-eclipse-core-commands) + ("java-icu4j" ,java-icu4j))) + (home-page "http://www.eclipse.org/platform") + (synopsis "Eclipse text library") + (description "Platform Text is part of the Platform UI project and +provides the basic building blocks for text and text editors within Eclipse +and contributes the Eclipse default text editor.") + (license license:epl1.0))) + +(define-public java-eclipse-jdt-core + (package + (name "java-eclipse-jdt-core") + (version "3.12.3") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "org/eclipse/jdt/org.eclipse.jdt.core/" + version "/org.eclipse.jdt.core-" + version "-sources.jar")) + (sha256 + (base32 + "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests included + #:jar-name "eclipse-jdt-core.jar")) + (inputs + `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) + ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) + ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) + ("java-eclipse-core-resources" ,java-eclipse-core-resources) + ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) + ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) + ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) + ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) + ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) + ("java-eclipse-osgi" ,java-eclipse-osgi) + ("java-eclipse-text" ,java-eclipse-text))) + (home-page "https://www.eclipse.org/jdt") + (synopsis "Java development tools core libraries") + (description "This package provides the core libraries of the Eclipse Java +development tools.") + (license license:epl1.0))) + +(define-public java-javax-mail + (package + (name "java-javax-mail") + (version "1.5.6") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "com/sun/mail/javax.mail/" + version "/javax.mail-" + version "-sources.jar")) + (sha256 + (base32 + "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests + #:jar-name "javax-mail.jar")) + (home-page "https://javamail.java.net") + (synopsis "Reference implementation of the JavaMail API") + (description + "This package provides versions of the JavaMail API implementation, IMAP, +SMTP, and POP3 service providers, some examples, and documentation for the +JavaMail API.") + ;; GPLv2 only with "classpath exception". + (license license:gpl2))) + +(define-public java-log4j-api + (package + (name "java-log4j-api") + (version "2.4.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/logging/log4j/" version + "/apache-log4j-" version "-src.tar.gz")) + (sha256 + (base32 + "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; tests require unpackaged software + #:jar-name "log4j-api.jar" + #:make-flags + (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") + "/share/java")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-dir + (lambda _ (chdir "log4j-api") #t)) + ;; FIXME: The tests require additional software that has not been + ;; packaged yet, such as + ;; * org.apache.maven + ;; * org.apache.felix + (add-after 'enter-dir 'delete-tests + (lambda _ (delete-file-recursively "src/test") #t))))) + (inputs + `(("java-osgi-core" ,java-osgi-core) + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-junit" ,java-junit))) + (home-page "http://logging.apache.org/log4j/2.x/") + (synopsis "API module of the Log4j logging framework for Java") + (description + "This package provides the API module of the Log4j logging framework for +Java.") + (license license:asl2.0))) + (define-public java-commons-cli (package (name "java-commons-cli") @@ -2105,49 +3113,30 @@ This is a part of the Apache Commons Project.") (substitute* "lib/cpp/antlr/CharScanner.hpp" (("#include <map>") (string-append - "#include <map>\n" - "#define EOF (-1)\n" - "#include <strings.h>"))) + "#include <map>\n" + "#define EOF (-1)\n" + "#include <strings.h>"))) (substitute* "configure" - (("/bin/sh") "sh")))))) + (("/bin/sh") "sh")) + #t)))) (build-system gnu-build-system) (arguments - `(#:tests? #f + `(#:tests? #f ; no test target + #:imported-modules ((guix build ant-build-system) + (guix build syscalls) + ,@%gnu-build-system-modules) + #:modules (((guix build ant-build-system) #:prefix ant:) + (guix build gnu-build-system) + (guix build utils)) #:phases (modify-phases %standard-phases (add-after 'install 'strip-jar-timestamps - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (jar1 (string-append out "/lib/antlr.jar")) - (jar2 (string-append out "/share/antlr-2.7.7/antlr.jar"))) - ;; XXX: copied from (guix build ant-build-system) - (define (strip-jar jar dir) - (let ((manifest (string-append dir "/META-INF/MANIFEST.MF"))) - (mkdir-p dir) - (and (with-directory-excursion dir - (zero? (system* "jar" "xf" jar))) - (delete-file jar) - (for-each (lambda (file) - (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files dir #:directories? #t)) - (with-directory-excursion dir - (let* ((files (find-files "." ".*" #:directories? #t))) - (unless (zero? (apply system* - `("zip" "-X" ,jar ,manifest - ,@files))) - (error "'zip' failed")))) - (utime jar 0 0) - #t))) - (strip-jar jar1 "temp1") - (strip-jar jar2 "temp2")))) + (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) (add-after 'configure 'fix-bin-ls (lambda _ - (for-each (lambda (file) - (substitute* file - (("/bin/ls") "ls"))) - (find-files "." "Makefile"))))))) + (substitute* (find-files "." "Makefile") + (("/bin/ls") "ls")) + #t))))) (native-inputs `(("which" ,which) ("zip" ,zip) @@ -2163,9 +3152,9 @@ C++, or Python actions. ANTLR provides excellent support for tree construction, tree walking, and translation.") (license license:public-domain))) -(define-public stringtemplate3 +(define-public java-stringtemplate-3 (package - (name "stringtemplate3") + (name "java-stringtemplate") (version "3.2.1") (source (origin (method url-fetch) @@ -2177,21 +3166,30 @@ tree walking, and translation.") "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) (build-system ant-build-system) (arguments - `(#:jar-name "stringtemplate-3.2.1.jar" - #:tests? #f + `(#:jar-name (string-append ,name "-" ,version ".jar") + #:test-dir "test" + #:modules ((guix build ant-build-system) + (guix build utils) + (srfi srfi-1)) #:phases (modify-phases %standard-phases + (add-before 'check 'fix-tests + (lambda _ + (substitute* "build.xml" + (("\\$\\{test.home\\}/java") + "${test.home}/org")) + #t)) (add-before 'build 'generate-grammar (lambda _ - (let ((dir "src/org/antlr/stringtemplate/language/")) - (for-each (lambda (file) - (display file) - (newline) - (system* "antlr" "-o" dir (string-append dir file))) - '("template.g" "angle.bracket.template.g" "action.g" - "eval.g" "group.g" "interface.g")))))))) + (with-directory-excursion "src/org/antlr/stringtemplate/language/" + (every (lambda (file) + (format #t "~a\n" file) + (zero? (system* "antlr" file))) + '("template.g" "angle.bracket.template.g" "action.g" + "eval.g" "group.g" "interface.g")))))))) (native-inputs - `(("antlr" ,antlr2))) + `(("antlr" ,antlr2) + ("java-junit" ,java-junit))) (home-page "http://www.stringtemplate.org") (synopsis "Template engine to generate formatted text output") (description "StringTemplate is a java template engine (with ports for C#, @@ -2215,9 +3213,9 @@ StringTemplate also powers ANTLR.") ;; only grammar files with the antlr2 syntax. ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. -(define-public stringtemplate4 - (package - (name "stringtemplate4") +(define-public java-stringtemplate + (package (inherit java-stringtemplate-3) + (name "java-stringtemplate") (version "4.0.8") (source (origin (method url-fetch) @@ -2229,36 +3227,36 @@ StringTemplate also powers ANTLR.") "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) (build-system ant-build-system) (arguments - `(#:tests? #f - #:jar-name (string-append ,name "-" ,version ".jar") + `(#:jar-name (string-append ,name "-" ,version ".jar") + #:tests? #f ; FIXME: tests fail for unknown reasons + #:test-dir "test" + #:modules ((guix build ant-build-system) + (guix build utils) + (srfi srfi-1)) #:phases (modify-phases %standard-phases + (add-before 'check 'fix-test-target + (lambda _ + (substitute* "build.xml" + (("\\$\\{test.home\\}/java") "${test.home}/") + (("\\*Test.java") "Test*.java")) + #t)) (add-before 'build 'generate-grammar - (lambda* (#:key inputs #:allow-other-keys) - (chdir "src/org/stringtemplate/v4/compiler/") - (for-each (lambda (file) - (display file) - (newline) - (system* "antlr3" file)) - '("STParser.g" "Group.g" "CodeGenerator.g")) - (chdir "../../../../..")))))) + (lambda _ + (with-directory-excursion "src/org/stringtemplate/v4/compiler/" + (every (lambda (file) + (format #t "~a\n" file) + (zero? (system* "antlr3" file))) + '("STParser.g" "Group.g" "CodeGenerator.g")))))))) (inputs `(("antlr3" ,antlr3-bootstrap) ("antlr2" ,antlr2) - ("stringtemplate" ,stringtemplate3))) - (home-page "http://www.stringtemplate.org") - (synopsis "Template engine to generate formatted text output") - (description "StringTemplate is a java template engine (with ports for C#, -Objective-C, JavaScript, Scala) for generating source code, web pages, emails, -or any other formatted text output. StringTemplate is particularly good at -code generators, multiple site skins, and internationalization / localization. -StringTemplate also powers ANTLR.") - (license license:bsd-3))) + ("java-stringtemplate" ,java-stringtemplate-3) + ("java-junit" ,java-junit))))) -(define stringtemplate4-4.0.6 - (package - (inherit stringtemplate4) - (name "stringtemplate4") +(define java-stringtemplate-4.0.6 + (package (inherit java-stringtemplate) + (name "java-stringtemplate") (version "4.0.6") (source (origin (method url-fetch) @@ -2271,7 +3269,7 @@ StringTemplate also powers ANTLR.") (inputs `(("antlr3" ,antlr3-3.3) ("antlr2" ,antlr2) - ("stringtemplate" ,stringtemplate3))))) + ("java-stringtemplate" ,java-stringtemplate-3))))) (define-public antlr3 (package @@ -2358,12 +3356,12 @@ import org.antlr.grammar.v3.ANTLRTreePrinter;")) ("antlr3" ,antlr3-bootstrap))) (inputs `(("junit" ,java-junit) - ("stringtemplate" ,stringtemplate3) - ("stringtemplate4" ,stringtemplate4))) + ("stringtemplate" ,java-stringtemplate-3) + ("stringtemplate4" ,java-stringtemplate))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3) + `(("stringtemplate" ,java-stringtemplate-3) ("antlr" ,antlr2) - ("stringtemplate4" ,stringtemplate4-4.0.6))) + ("stringtemplate4" ,java-stringtemplate-4.0.6))) (home-page "http://www.antlr3.org") (synopsis "Framework for constructing recognizers, compilers, and translators") (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) @@ -2414,7 +3412,7 @@ tree walking, and translation.") (string-append "#!" (which "sh") "\n" "java -cp " jar "/antlr3-3.3.jar:" (string-concatenate - (find-files (assoc-ref inputs "stringtemplate") + (find-files (assoc-ref inputs "java-stringtemplate") ".*\\.jar")) ":" (string-concatenate @@ -2464,7 +3462,7 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")))) (inputs `(("junit" ,java-junit))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3) + `(("java-stringtemplate" ,java-stringtemplate-3) ("antlr" ,antlr2) ("antlr3" ,antlr3-3.1))))) @@ -2536,4 +3534,48 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")))) (inputs `(("junit" ,java-junit))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3))))) + `(("stringtemplate" ,java-stringtemplate-3))))) + +(define-public java-asm + (package + (name "java-asm") + (version "5.2") + (source (origin + (method url-fetch) + (uri (string-append "http://download.forge.ow2.org/asm/" + "asm-" version ".tar.gz")) + (sha256 + (base32 + "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr")))) + (build-system ant-build-system) + (arguments + `(#:build-target "compile" + #:test-target "test" + ;; The tests require an old version of Janino, which no longer compiles + ;; with the JDK7. + #:tests? #f + ;; We don't need these extra ant tasks, but the build system asks us to + ;; provide a path anyway. + #:make-flags (list (string-append "-Dobjectweb.ant.tasks.path=foo")) + #:phases + (modify-phases %standard-phases + (add-before 'install 'build-jars + (lambda* (#:key make-flags #:allow-other-keys) + ;; We cannot use the "jar" target because it depends on a couple + ;; of unpackaged, complicated tools. + (mkdir "dist") + (zero? (system* "jar" + "-cf" (string-append "dist/asm-" ,version ".jar") + "-C" "output/build/tmp" ".")))) + (replace 'install + (install-jars "dist"))))) + (native-inputs + `(("java-junit" ,java-junit))) + (home-page "http://asm.ow2.org/") + (synopsis "Very small and fast Java bytecode manipulation framework") + (description "ASM is an all purpose Java bytecode manipulation and +analysis framework. It can be used to modify existing classes or dynamically +generate classes, directly in binary form. The provided common +transformations and analysis algorithms allow to easily assemble custom +complex transformations and code analysis tools.") + (license license:bsd-3))) |