aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-03-14 17:37:20 +0100
committerRicardo Wurmus <rekado@elephly.net>2018-03-14 17:37:20 +0100
commit8c72ed923d77ee55989965bb02628043799b9548 (patch)
tree802e6eb910719a98fa09bf7c2bd884097f649adc /gnu/packages/java.scm
parent189be331acfda1c242a9c85fca8d2a0356742f48 (diff)
parentaac6cbbfede0bbfafdbbeeb460f00a244333895d (diff)
downloadpatches-8c72ed923d77ee55989965bb02628043799b9548.tar
patches-8c72ed923d77ee55989965bb02628043799b9548.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm1349
1 files changed, 1170 insertions, 179 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d3fa88adbd..b4f64e2c2e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -59,6 +59,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux) ;alsa
+ #:use-module (gnu packages maths)
#:use-module (gnu packages web)
#:use-module (gnu packages wget)
#:use-module (gnu packages pkg-config)
@@ -1587,7 +1588,8 @@ IcedTea build harness.")
(modules '((guix build utils)))
(snippet
'(begin
- (substitute* "acinclude.m4"
+ (substitute* '("configure"
+ "acinclude.m4")
;; Do not embed build time
(("(DIST_ID=\"Custom build).*$" _ prefix)
(string-append prefix "\"\n"))
@@ -1596,65 +1598,90 @@ IcedTea build harness.")
"DIST_NAME=\"guix\""))
#t))))
(arguments
- (substitute-keyword-arguments (package-arguments icedtea-7)
- ((#:configure-flags flags)
- `(let ((jdk (assoc-ref %build-inputs "jdk")))
- `(;;"--disable-bootstrap"
- "--enable-bootstrap"
- "--enable-nss"
- "--disable-downloading"
- "--disable-system-pcsc"
- "--disable-system-sctp"
- "--disable-tests" ;they are run in the check phase instead
- "--with-openjdk-src-dir=./openjdk.src"
- ,(string-append "--with-jdk-home=" jdk))))
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'fix-x11-extension-include-path)
- (delete 'patch-paths)
- (delete 'set-additional-paths)
- (delete 'patch-patches)
- (add-after 'unpack 'patch-jni-libs
- ;; Hardcode dynamically loaded libraries.
- (lambda _
- (let* ((library-path (search-path-as-string->list
- (getenv "LIBRARY_PATH")))
- (find-library (lambda (name)
- (search-path
- library-path
- (string-append "lib" name ".so")))))
- (for-each
- (lambda (file)
- (catch 'decoding-error
- (lambda ()
- (substitute* file
- (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
- _ name version)
- (format #f "\"~a\"" (find-library name)))
- (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
- (format #f "\"~a\"" (find-library name)))))
- (lambda _
- ;; Those are safe to skip.
- (format (current-error-port)
- "warning: failed to substitute: ~a~%"
- file))))
- (find-files "openjdk.src/jdk/src/solaris/native"
- "\\.c|\\.h"))
- #t)))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((doc (string-append (assoc-ref outputs "doc")
- "/share/doc/icedtea"))
- (jre (assoc-ref outputs "out"))
- (jdk (assoc-ref outputs "jdk")))
- (copy-recursively "openjdk.build/docs" doc)
- (copy-recursively "openjdk.build/images/j2re-image" jre)
- (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
- ;; Install the nss.cfg file to JRE to enable SSL/TLS
- ;; support via NSS.
- (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
- (string-append jre "/lib/security/nss.cfg"))
- #t)))))))
+ `(#:imported-modules
+ ((guix build ant-build-system)
+ (guix build syscalls)
+ ,@%gnu-build-system-modules)
+ ,@(substitute-keyword-arguments (package-arguments icedtea-7)
+ ((#:modules modules)
+ `((guix build utils)
+ (guix build gnu-build-system)
+ ((guix build ant-build-system) #:prefix ant:)
+ (ice-9 match)
+ (ice-9 popen)
+ (srfi srfi-19)
+ (srfi srfi-26)))
+ ((#:configure-flags flags)
+ `(let ((jdk (assoc-ref %build-inputs "jdk")))
+ `( ;;"--disable-bootstrap"
+ "--enable-bootstrap"
+ "--enable-nss"
+ "--disable-downloading"
+ "--disable-system-pcsc"
+ "--disable-system-sctp"
+ "--disable-tests" ;they are run in the check phase instead
+ "--with-openjdk-src-dir=./openjdk.src"
+ ,(string-append "--with-jdk-home=" jdk))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'fix-x11-extension-include-path)
+ (delete 'patch-paths)
+ (delete 'set-additional-paths)
+ (delete 'patch-patches)
+ ;; Prevent the keytool from recording the current time when
+ ;; adding certificates at build time.
+ (add-after 'unpack 'patch-keystore
+ (lambda _
+ (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
+ (("date = new Date\\(\\);")
+ "\
+date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
+new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
+new Date();"))
+ #t))
+ (add-after 'unpack 'patch-jni-libs
+ ;; Hardcode dynamically loaded libraries.
+ (lambda _
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-library (lambda (name)
+ (search-path
+ library-path
+ (string-append "lib" name ".so")))))
+ (for-each
+ (lambda (file)
+ (catch 'decoding-error
+ (lambda ()
+ (substitute* file
+ (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
+ _ name version)
+ (format #f "\"~a\"" (find-library name)))
+ (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
+ (format #f "\"~a\"" (find-library name)))))
+ (lambda _
+ ;; Those are safe to skip.
+ (format (current-error-port)
+ "warning: failed to substitute: ~a~%"
+ file))))
+ (find-files "openjdk.src/jdk/src/solaris/native"
+ "\\.c|\\.h"))
+ #t)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((doc (string-append (assoc-ref outputs "doc")
+ "/share/doc/icedtea"))
+ (jre (assoc-ref outputs "out"))
+ (jdk (assoc-ref outputs "jdk")))
+ (copy-recursively "openjdk.build/docs" doc)
+ (copy-recursively "openjdk.build/images/j2re-image" jre)
+ (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
+ ;; Install the nss.cfg file to JRE to enable SSL/TLS
+ ;; support via NSS.
+ (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
+ (string-append jre "/lib/security/nss.cfg"))
+ #t)))
+ (add-after 'install 'strip-jar-timestamps
+ (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
(native-inputs
`(("jdk" ,icedtea-7 "jdk")
("openjdk-src"
@@ -2015,6 +2042,510 @@ debugging, etc.")
(delete-file-recursively "lib") #t))
(replace 'install (install-jars "bin/lib")))))))
+;; This is the last 3.x release of ECJ
+(define-public java-ecj-3
+ (package
+ (name "java-ecj")
+ (version "3.8.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://archive.eclipse.org/eclipse/"
+ "downloads/drops/R-" version
+ "-201301310800/ecjsrc-" version ".jar"))
+ (sha256
+ (base32
+ "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f ; none included
+ #:jdk ,icedtea-7 ; doesn't build with JDK8+
+ #:make-flags (list "-f" "src/build.xml")
+ #:build-target "build"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-manifest
+ (lambda _
+ ;; Record the main class to make ecj executable.
+ (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
+ (lambda (in out)
+ (display "Manifest-Version: 1.0
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
+ out)))))
+ (replace 'install (install-jars ".")))))
+ (home-page "https://eclipse.org")
+ (synopsis "Eclipse Java development tools core batch compiler")
+ (description "This package provides the Eclipse Java core batch compiler.")
+ (license license:epl1.0)))
+
+;; This is needed for java-cisd-args4j
+(define-public java-ecj-3.5
+ (package (inherit java-ecj-3)
+ (version "3.5.1")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "http://archive.eclipse.org/eclipse/"
+ "downloads/drops/R-" version
+ "-200909170800/ecjsrc-" version ".zip"))
+ (sha256
+ (base32
+ "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f ; none included
+ #:jdk ,icedtea-7 ; doesn't build with JDK8+
+ #:build-target "build"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-manifest
+ (lambda _
+ ;; Record the main class to make ecj executable.
+ (with-atomic-file-replacement "META-INF/MANIFEST.MF"
+ (lambda (in out)
+ (dump-port in out)
+ (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
+ out)))))
+ (replace 'install (install-jars ".")))))
+ (native-inputs
+ `(("unzip" ,unzip)))))
+
+(define-public java-cisd-base
+ (let ((revision 38938)
+ (base-version "14.12.0"))
+ (package
+ (name "java-cisd-base")
+ (version (string-append base-version "-" (number->string revision)))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "base/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version "/base/"))
+ (revision revision)))
+ (file-name (string-append "java-cisd-base-" version "-checkout"))
+ (sha256
+ (base32
+ "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete included gradle jar
+ (delete-file-recursively "gradle/wrapper")
+ ;; Delete pre-built native libraries
+ (delete-file-recursively "libs")
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:make-flags '("-file" "build/build.xml")
+ #:test-target "jar-test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-build-resources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "build-resources")
+ "../build_resources")
+ #t))
+ (add-after 'unpack-build-resources 'fix-dependencies
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build/build.xml"
+ (("\\$\\{lib\\}/testng/testng-jdk15.jar")
+ (string-append (assoc-ref inputs "java-testng")
+ "/share/java/java-testng.jar"))
+ (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
+ (string-append (assoc-ref inputs "java-commons-lang")
+ "/share/java/commons-lang-"
+ ,(package-version java-commons-lang) ".jar"))
+ (("\\$\\{lib\\}/commons-io/commons-io.jar")
+ (string-append (assoc-ref inputs "java-commons-io")
+ "/share/java/commons-io-"
+ ,(package-version java-commons-io)
+ "-SNAPSHOT.jar"))
+ ;; Remove dependency on svn
+ (("<build-info.*") "")
+ (("\\$\\{revision.number\\}")
+ ,(number->string revision))
+ (("\\$\\{version.number\\}") ,base-version))
+ ;; Remove dependency on classycle
+ (substitute* "../build_resources/ant/build-common.xml"
+ (("<taskdef name=\"dependency-checker.*") "")
+ (("classname=\"classycle.*") "")
+ (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
+ #t))
+ ;; A few tests fail because of the lack of a proper /etc/groups and
+ ;; /etc/passwd file in the build container.
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
+ (("Unix.isOperational\\(\\)") "false"))
+ #t))
+ ;; These decorators are almost useless and pull in an unpackaged
+ ;; dependency.
+ (add-after 'unpack 'remove-useless-decorators
+ (lambda _
+ (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
+ (("@Private") "")
+ (("import ch.rinn.restrictions.Private;") ""))
+ (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
+ (("@Friend.*") "")
+ (("import ch.rinn.restrictions.Friend;") ""))
+ #t))
+ (add-before 'configure 'build-native-code
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jdk (assoc-ref inputs "jdk"))
+ (dir ,(match (%current-system)
+ ("i686-linux"
+ "i386-Linux")
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-Linux")
+ ((or "x86_64-linux")
+ "amd64-Linux")
+ (_ "unknown-Linux"))))
+ (with-directory-excursion "source/c"
+ (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
+ (string-append "-I" jdk "/include")
+ (string-append "-I" jdk "/include/linux")
+ "-o" "libunix.so")
+ (invoke "gcc" "-shared" "-O3" "-fPIC"
+ "-DMACHINE_BYTE_ORDER=1"
+ "copyCommon.c"
+ "copyByteChar.c"
+ "copyByteDouble.c"
+ "copyByteFloat.c"
+ "copyByteInt.c"
+ "copyByteLong.c"
+ "copyByteShort.c"
+ (string-append "-I" jdk "/include")
+ (string-append "-I" jdk "/include/linux")
+ "-o" "libnativedata.so"))
+ (install-file "source/c/libunix.so"
+ (string-append "libs/native/unix/" dir))
+ (install-file "source/c/libnativedata.so"
+ (string-append "libs/native/nativedata/" dir))
+ #t)))
+ ;; In the "check" phase we only build the test executable.
+ (add-after 'check 'run-tests
+ (lambda _
+ (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
+ (delete-file "targets/dist/sis-base-test.jar")
+ #t))
+ (replace 'install (install-jars "targets/dist")))))
+ (native-inputs
+ `(("jdk" ,icedtea-8)
+ ("java-commons-lang" ,java-commons-lang)
+ ("java-commons-io" ,java-commons-io)
+ ("java-testng" ,java-testng)
+ ("build-resources"
+ ,(origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "base/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version
+ "/build_resources/"))
+ (revision revision)))
+ (sha256
+ (base32
+ "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
+ (home-page "http://svnsis.ethz.ch")
+ (synopsis "Utility classes for libraries from ETH Zurich")
+ (description "This library supplies some utility classes needed for
+libraries from the SIS division at ETH Zurich like jHDF5.")
+ ;; The C sources are under a non-copyleft license, which looks like a
+ ;; variant of the BSD licenses. The whole package is under the ASL2.0.
+ (license (list license:asl2.0
+ (license:non-copyleft "file://source/c/COPYING"))))))
+
+(define-public java-cisd-args4j
+ (let ((revision 39162)
+ (base-version "9.11.2"))
+ (package
+ (name "java-cisd-args4j")
+ (version (string-append base-version "-" (number->string revision)))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "args4j/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version "/args4j/"))
+ (revision revision)))
+ (file-name (string-append "java-cisd-args4j-" version "-checkout"))
+ (sha256
+ (base32
+ "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:make-flags '("-file" "build/build.xml")
+ #:tests? #f ; there are no tests
+ ;; There are weird build failures with JDK8, such as: "The type
+ ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
+ ;; referenced from required .class files"
+ #:jdk ,icedtea-7
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple)
+ (sxml transform)
+ (sxml xpath))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-build-resources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "../build_resources")
+ (invoke "tar" "xf" (assoc-ref inputs "build-resources")
+ "-C" "../build_resources"
+ "--strip-components=1")
+ (mkdir-p "../build_resources/lib")
+ #t))
+ (add-after 'unpack-build-resources 'fix-dependencies
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; FIXME: There should be a more convenient abstraction for
+ ;; editing XML files.
+ (with-directory-excursion "../build_resources/ant/"
+ (chmod "build-common.xml" #o664)
+ (call-with-output-file "build-common.xml.new"
+ (lambda (port)
+ (sxml->xml
+ (pre-post-order
+ (with-input-from-file "build-common.xml"
+ (lambda _ (xml->sxml #:trim-whitespace? #t)))
+ `(;; Remove dependency on classycle and custom ant tasks
+ (taskdef . ,(lambda (tag . kids)
+ (let ((name ((sxpath '(name *text*)) kids)))
+ (if (or (member "build-info" name)
+ (member "dependency-checker" name)
+ (member "build-java-subprojects" name)
+ (member "project-classpath" name))
+ '() ; skip
+ `(,tag ,@kids)))))
+ (typedef . ,(lambda (tag . kids)
+ (let ((name ((sxpath '(name *text*)) kids)))
+ (if (member "recursive-jar" name)
+ '() ; skip
+ `(,tag ,@kids)))))
+ (build-java-subprojects . ,(lambda _ '()))
+ ;; Ignore everything else
+ (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
+ (*text* . ,(lambda (_ txt) txt))))
+ port)))
+ (rename-file "build-common.xml.new" "build-common.xml"))
+ (substitute* "build/build.xml"
+ (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
+ (string-append (assoc-ref inputs "java-cisd-base")
+ "/share/java/sis-base.jar"))
+ ;; Remove dependency on svn
+ (("<build-info.*") "")
+ (("\\$\\{revision.number\\}")
+ ,(number->string revision))
+ (("\\$\\{version.number\\}") ,base-version)
+ ;; Don't use custom ant tasks.
+ (("recursive-jar") "jar")
+ (("<project-classpath.*") ""))
+ #t))
+ (replace 'install (install-jars "targets/dist")))))
+ (inputs
+ `(("java-cisd-base" ,java-cisd-base)))
+ (native-inputs
+ `(("ecj" ,java-ecj-3.5)
+ ("build-resources"
+ ,(origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "args4j/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version
+ "/build_resources/"))
+ (revision revision)))
+ (sha256
+ (base32
+ "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
+ (modules '((guix build utils)))
+ ;; Delete bundled pre-built jars.
+ (snippet
+ '(begin (delete-file-recursively "lib/") #t))))))
+ (home-page "http://svnsis.ethz.ch")
+ (synopsis "Command line parser library")
+ (description "This package provides a parser for command line arguments.")
+ (license license:asl2.0))))
+
+(define-public java-cisd-jhdf5
+ (let ((revision 39162)
+ (base-version "14.12.6"))
+ (package
+ (name "java-cisd-jhdf5")
+ (version (string-append base-version "-" (number->string revision)))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "jhdf5/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version "/jhdf5/"))
+ (revision revision)))
+ (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
+ (sha256
+ (base32
+ "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete included gradle jar
+ (delete-file-recursively "gradle/wrapper")
+ ;; Delete pre-built native libraries
+ (delete-file-recursively "libs")
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:make-flags '("-file" "build/build.xml")
+ #:build-target "jar-all"
+ #:test-target "jar-test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ ;; Don't erase results from the build phase when building tests.
+ (add-after 'unpack 'separate-test-target-from-clean
+ (lambda _
+ (substitute* "build/build.xml"
+ (("\"jar-test\" depends=\"clean, ")
+ "\"jar-test\" depends=\""))
+ #t))
+ (add-after 'unpack 'unpack-build-resources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "build-resources")
+ "../build_resources")
+ (delete-file-recursively "../build_resources/lib/")
+ (mkdir-p "../build_resources/lib")
+ ;; Remove dependency on classycle
+ (substitute* "../build_resources/ant/build-common.xml"
+ (("<taskdef name=\"dependency-checker.*") "")
+ (("classname=\"classycle.*") "")
+ (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
+ ;; Remove dependency on svn
+ (substitute* "build/build.xml"
+ (("<build-info.*") "")
+ (("\\$\\{revision.number\\}")
+ ,(number->string revision))
+ (("\\$\\{version.number\\}") ,base-version))
+ #t))
+ (add-after 'unpack-build-resources 'fix-dependencies
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "../build_resources/ant/build-common.xml"
+ (("../libraries/testng/testng-jdk15.jar")
+ (string-append (assoc-ref inputs "java-testng")
+ "/share/java/java-testng.jar")))
+ (substitute* "build/build.xml"
+ (("\\$\\{lib\\}/sis-base/sis-base.jar")
+ (string-append (assoc-ref inputs "java-cisd-base")
+ "/share/java/sis-base.jar"))
+ (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
+ (string-append (assoc-ref inputs "java-cisd-args4j")
+ "/share/java/cisd-args4j.jar"))
+ (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
+ (string-append (assoc-ref inputs "java-commons-lang")
+ "/share/java/commons-lang-"
+ ,(package-version java-commons-lang) ".jar"))
+ (("\\$\\{lib\\}/commons-io/commons-io.jar")
+ (string-append (assoc-ref inputs "java-commons-io")
+ "/share/java/commons-io-"
+ ,(package-version java-commons-io)
+ "-SNAPSHOT.jar"))
+ (("\\$\\{lib\\}/testng/testng-jdk15.jar")
+ (string-append (assoc-ref inputs "java-testng")
+ "/share/java/java-testng.jar"))
+ (("\\$\\{lib\\}/junit4/junit.jar")
+ (string-append (assoc-ref inputs "java-junit")
+ "/share/java/junit.jar"))
+ (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
+ (string-append (assoc-ref inputs "java-hamcrest-core")
+ "/share/java/hamcrest-core.jar")))
+ ;; Remove dependency on ch.rinn.restrictions
+ (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
+ (substitute* '("BitSetConversionUtils.java"
+ "HDF5Utils.java")
+ (("import ch.rinn.restrictions.Private;") "")
+ (("@Private") "")))
+ (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
+ (substitute* '("BitSetConversionTest.java"
+ "h5ar/HDF5ArchiverTest.java")
+ (("import ch.rinn.restrictions.Friend;") "")
+ (("@Friend.*") ""))
+ ;; Remove leftovers from removing @Friend
+ (substitute* "h5ar/HDF5ArchiverTest.java"
+ (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
+ "")))
+ #t))
+ (add-before 'configure 'build-native-library
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jdk (assoc-ref inputs "jdk"))
+ (hdf5 (assoc-ref inputs "hdf5"))
+ (dir ,(match (%current-system)
+ ("i686-linux"
+ "i386-Linux")
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-Linux")
+ ((or "x86_64-linux")
+ "amd64-Linux")
+ (_ "unknown-Linux"))))
+ (with-directory-excursion "source/c"
+ (apply invoke `("gcc" "-shared" "-O3"
+ "-fPIC"
+ "-Wl,--exclude-libs,ALL"
+ ,@(find-files "jhdf5" "\\.c$")
+ ,@(find-files "hdf-java" "\\.c$")
+ ,(string-append "-I" hdf5 "/include")
+ ,(string-append "-I" jdk "/include")
+ ,(string-append "-I" jdk "/include/linux")
+ ,(string-append hdf5 "/lib/libhdf5.a")
+ "-o" "libjhdf5.so" "-lz")))
+ (install-file "source/c/libjhdf5.so"
+ (string-append "libs/native/jhdf5/" dir))
+ #t)))
+ ;; In the "check" phase we only build the test executable.
+ (add-after 'check 'run-tests
+ (lambda _
+ (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
+ (delete-file "targets/dist/sis-jhdf5-test.jar")
+ #t))
+ (replace 'install
+ (install-jars "targets/dist")))))
+ (inputs
+ `(("java-cisd-base" ,java-cisd-base)
+ ("java-cisd-args4j" ,java-cisd-args4j)
+ ("java-commons-lang" ,java-commons-lang)
+ ("java-commons-io" ,java-commons-io)
+ ("hdf5" ,hdf5)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("jdk" ,icedtea-8)
+ ("java-testng" ,java-testng)
+ ("java-junit" ,java-junit)
+ ("java-jmock" ,java-jmock)
+ ("java-hamcrest-core" ,java-hamcrest-core)
+ ("build-resources"
+ ,(origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
+ "jhdf5/tags/release/"
+ (version-major+minor base-version)
+ ".x/" base-version
+ "/build_resources/"))
+ (revision revision)))
+ (sha256
+ (base32
+ "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
+ (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
+ (synopsis "Java binding for HDF5")
+ (description "JHDF5 is a high-level API in Java for reading and writing
+HDF5 files, building on the libraries provided by the HDF Group.")
+ ;; The C sources are under a non-copyleft license, which looks like a
+ ;; variant of the BSD licenses. The whole package is under the ASL2.0.
+ (license (list license:asl2.0
+ (license:non-copyleft "file://source/c/COPYING"))))))
+
(define-public java-classpathx-servletapi
(package
(name "java-classpathx-servletapi")
@@ -2480,7 +3011,7 @@ mechanism of Java. It is especially useful for dynamic loading of application
components.")
(license license:asl2.0)))
-(define-public java-plexus-container-default-bootstrap
+(define java-plexus-container-default-bootstrap
(package
(name "java-plexus-container-default-bootstrap")
(version "1.7.1")
@@ -2657,6 +3188,418 @@ archives (jar).")
`(("archiver" ,java-plexus-archiver)
("hamcrest" ,java-hamcrest-core)))))
+(define-public java-plexus-component-annotations
+ (package
+ (inherit java-plexus-container-default)
+ (name "java-plexus-component-annotations")
+ (arguments
+ `(#:jar-name "plexus-component-annotations.jar"
+ #:source-dir "plexus-component-annotations/src/main/java"
+ #:tests? #f)); no tests
+ (inputs '())
+ (native-inputs '())
+ (synopsis "Plexus descriptors generator")
+ (description "This package is a Maven plugin to generate Plexus descriptors
+from source tags and class annotations.")))
+
+(define-public java-plexus-cipher
+ (package
+ (name "java-plexus-cipher")
+ (version "1.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
+ "/archive/plexus-cipher-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-cipher.jar"
+ #:source-dir "src/main/java"
+ #:jdk ,icedtea-8
+ #:tests? #f; FIXME: requires sisu-inject-bean
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes")
+ (mkdir-p "build/classes/META-INF/sisu")
+ (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
+ (lambda _
+ (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
+ #t)))))
+ (inputs
+ `(("java-cdi-api" ,java-cdi-api)
+ ("java-javax-inject" ,java-javax-inject)))
+ (home-page "https://github.com/sonatype/plexus-cipher")
+ (synopsis "Encryption/decryption Component")
+ (description "Plexus-cipher contains a component to deal with encryption
+and decryption.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-compiler-api
+ (package
+ (name "java-plexus-compiler-api")
+ (version "2.8.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
+ "/archive/plexus-compiler-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-compiler-api.jar"
+ #:source-dir "plexus-compiler-api/src/main/java"
+ #:jdk ,icedtea-8
+ #:test-dir "plexus-compiler-api/src/test"))
+ (inputs
+ `(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-util" ,java-plexus-utils)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/codehaus-plexus/plexus-compiler")
+ (synopsis "Plexus Compilers component's API to manipulate compilers")
+ (description "This package contains the API used by components to manipulate
+compilers.")
+ (license (list license:asl2.0
+ license:expat))))
+
+(define-public java-plexus-compiler-javac
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-javac")
+ (arguments
+ `(#:jar-name "plexus-compiler-javac.jar"
+ #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
+ #:jdk ,icedtea-8
+ #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
+ #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
+ (inputs
+ `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (synopsis "Javac Compiler support for Plexus Compiler component")
+ (description "This package contains the Javac Compiler support for Plexus
+Compiler component.")))
+
+(define-public java-plexus-sec-dispatcher
+ (package
+ (name "java-plexus-sec-dispatcher")
+ (version "1.4") ;; Newest release listed at the Maven Central Repository.
+ (source (origin
+ ;; This project doesn't tag releases or publish tarballs, so we take
+ ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
+ (method url-fetch)
+ (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
+ "archive/7db8f88048.tar.gz"))
+ (sha256
+ (base32
+ "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (arguments
+ `(#:jar-name "plexus-sec-dispatcher.jar"
+ #:source-dir "src/main/java"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-models
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (modello-single-mode file version mode)
+ (zero? (system* "java"
+ "org.codehaus.modello.ModelloCli"
+ file mode "src/main/java" version
+ "false" "true")))
+ (let ((file "src/main/mdo/settings-security.mdo"))
+ (and
+ (modello-single-mode file "1.0.0" "java")
+ (modello-single-mode file "1.0.0" "xpp3-reader")
+ (modello-single-mode file "1.0.0" "xpp3-writer")))))
+ (add-before 'build 'generate-components.xml
+ (lambda _
+ (mkdir-p "build/classes/META-INF/plexus")
+ (with-output-to-file "build/classes/META-INF/plexus/components.xml"
+ (lambda _
+ (display
+ "<component-set>\n
+ <components>\n
+ <component>\n
+ <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
+ <role-hint>default</role-hint>\n
+ <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
+ <description></description>\n
+ <requirements>\n
+ <requirement>\n
+ <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
+ <field-name>_cipher</field-name>\n
+ </requirement>\n
+ <requirement>\n
+ <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
+ <field-name>_decryptors</field-name>\n
+ </requirement>\n
+ </requirements>\n
+ <configuration>\n
+ <_configuration-file>~/.settings-security.xml</_configuration-file>\n
+ </configuration>\n
+ </component>\n
+ </components>\n
+</component-set>\n")))))
+ (add-before 'check 'fix-paths
+ (lambda _
+ (copy-recursively "src/test/resources" "target"))))))
+ (inputs
+ `(("java-plexus-cipher" ,java-plexus-cipher)))
+ (native-inputs
+ `(("java-modello-core" ,java-modello-core)
+ ;; for modello:
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-guava" ,java-guava)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+ ("java-sisu-build-api" ,java-sisu-build-api)
+ ;; modello plugins:
+ ("java-modellop-plugins-java" ,java-modello-plugins-java)
+ ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
+ ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
+ ;; for tests
+ ("java-junit" ,java-junit)))
+ (build-system ant-build-system)
+ (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
+ (synopsis "Plexus Security Dispatcher Component")
+ (description "This package is the Plexus Security Dispatcher Component.
+This component decrypts a string passed to it.")
+ (license license:asl2.0)))
+
+(define-public java-sisu-build-api
+ (package
+ (name "java-sisu-build-api")
+ (version "0.0.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/sonatype/sisu-build-api/"
+ "archive/plexus-build-api-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "sisu-build-api.jar"
+ #:source-dir "src/main/java"
+ #:jdk ,icedtea-8
+ #:tests? #f; FIXME: how to run the tests?
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes")
+ (substitute* (find-files "build/classes")
+ (("\\$\\{project.version\\}") ,version))
+ #t))
+ (add-before 'build 'generate-plexus-compontent
+ (lambda _
+ (mkdir-p "build/classes/META-INF/plexus")
+ ;; This file is required for plexus to inject this package.
+ ;; FIXME: how is it generated?
+ (with-output-to-file "build/classes/META-INF/plexus/components.xml"
+ (lambda _
+ (display
+ "<component-set>\n
+ <components>\n
+ <component>\n
+ <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
+ <role-hint>default</role-hint>\n
+ <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
+ <description>Filesystem based non-incremental build context implementation\n
+which behaves as if all files were just created.</description>\n
+ </component>\n
+ </components>\n
+</component-set>\n")))
+ #t)))))
+ (inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (home-page "https://github.com/sonatype/sisu-build-api/")
+ (synopsis "Base build API for maven")
+ (description "This package contains the base build API for maven and
+a default implementation of it. This API is about scanning files in a
+project and determining what files need to be rebuilt.")
+ (license license:asl2.0)))
+
+(define-public java-modello-core
+ (package
+ (name "java-modello-core")
+ (version "1.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/codehaus-plexus/modello"
+ "/archive/modello-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "modello-core.jar"
+ #:source-dir "modello-core/src/main/java"
+ #:test-dir "modello-core/src/test"
+ #:main-class "org.codehaus.modello.ModelloCli"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes/META-INF/plexus")
+ (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
+ "build/classes/META-INF/plexus/components.xml")
+ #t))
+ (add-before 'check 'fix-tests
+ (lambda _
+ (with-directory-excursion "modello-core/src/test/java/org/codehaus"
+ (substitute* '("modello/core/DefaultModelloCoreTest.java"
+ "modello/core/io/ModelReaderTest.java")
+ (("src/test") "modello-core/src/test")))
+ #t)))))
+ (inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-sisu-build-api" ,java-sisu-build-api)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+ ("java-guava" ,java-guava)))
+ (home-page "http://codehaus-plexus.github.io/modello/")
+ (synopsis "Framework for code generation from a simple model")
+ (description "Modello is a framework for code generation from a simple model.
+
+Modello generates code from a simple model format: based on a plugin
+architecture, various types of code and descriptors can be generated from the
+single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
+XSD and documentation.")
+ (license (list
+ license:expat
+ ;; Although this package uses only files licensed under expat,
+ ;; other parts of the source are licensed under different
+ ;; licenses. We include them to be inherited by other packages.
+ license:asl2.0
+ ;; Some files in modello-plugin-java are licensed under a
+ ;; 5-clause BSD license.
+ (license:non-copyleft
+ (string-append "file:///modello-plugins/modello-plugin-java/"
+ "src/main/java/org/codehaus/modello/plugin/"
+ "java/javasource/JNaming.java"))))))
+
+(define-public java-modello-plugins-java
+ (package
+ (inherit java-modello-core)
+ (name "java-modello-plugins-java")
+ (arguments
+ `(#:jar-name "modello-plugins-java.jar"
+ #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
+ #:test-dir "modello-plugins/modello-plugin-java/src/test"
+ #:jdk ,icedtea-8
+ #:tests? #f; requires maven-model, which depends on this package
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
+ "build/classes")
+ #t)))))
+ (inputs
+ `(("java-modello-core" ,java-modello-core)
+ ,@(package-inputs java-modello-core)))
+ (synopsis "Modello Java Plugin")
+ (description "Modello Java Plugin generates Java objects for the model.")))
+
+(define-public java-modello-plugins-xml
+ (package
+ (inherit java-modello-core)
+ (name "java-modello-plugins-xml")
+ (arguments
+ `(#:jar-name "modello-plugins-xml.jar"
+ #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
+ #:test-dir "modello-plugins/modello-plugin-xml/src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively
+ "modello-plugins/modello-plugin-xml/src/main/resources"
+ "build/classes")
+ #t))
+ (add-before 'check 'fix-paths
+ (lambda _
+ (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
+ (substitute*
+ "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
+ (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
+ (inputs
+ `(("java-modello-core" ,java-modello-core)
+ ("java-modello-plugins-java" ,java-modello-plugins-java)
+ ,@(package-inputs java-modello-core)))
+ (synopsis "Modello XML Plugin")
+ (description "Modello XML Plugin contains shared code for every plugins
+working on XML representation of the model.")))
+
+(define-public java-modello-test
+ (package
+ (inherit java-modello-core)
+ (name "java-modello-test")
+ (arguments
+ `(#:jar-name "modello-test.jar"
+ #:source-dir "modello-test/src/main/java"
+ #:tests? #f; no tests
+ #:jdk ,icedtea-8))
+ (inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (synopsis "Modello test package")
+ (description "The modello test package contains the basis to create
+Modello generator unit-tests, including sample models and xml files to test
+every feature for every plugin.")))
+
+(define-public java-modello-plugins-xpp3
+ (package
+ (inherit java-modello-core)
+ (name "java-modello-plugins-xpp3")
+ (arguments
+ `(#:jar-name "modello-plugins-xpp3.jar"
+ #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
+ #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
+ ;; One of the test dependencies is maven-model which depends on this package.
+ #:tests? #f
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
+ "build/classes")
+ #t)))))
+ (inputs
+ `(("java-modello-core" ,java-modello-core)
+ ("java-modello-plugins-java" ,java-modello-plugins-java)
+ ("java-modello-plugins-xml" ,java-modello-plugins-xml)
+ ,@(package-inputs java-modello-core)))
+ (native-inputs
+ `(("java-xmlunit" ,java-xmlunit)
+ ("java-modello-test" ,java-modello-test)
+ ,@(package-native-inputs java-modello-core)))
+ (synopsis "Modello XPP3 Plugin")
+ (description "The modello XPP3 plugin generates XML readers and writers based
+on the XPP3 API (XML Pull Parser).")))
+
(define-public java-asm
(package
(name "java-asm")
@@ -2940,39 +3883,30 @@ The jMock library
(package (inherit java-hamcrest-core)
(name "java-hamcrest-all")
(arguments
- (substitute-keyword-arguments (package-arguments java-hamcrest-core)
- ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
- ;; found, although it is part of the hamcrest-core library that has
- ;; just been built.
- ;;
- ;; Fixing this one test is insufficient, though, and upstream confirmed
- ;; that the latest hamcrest release fails its unit tests when built
- ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
- ((#:tests? _) #f)
- ((#:build-target _) "bigjar")
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Some build targets override the classpath, so we need to patch
- ;; the build.xml to ensure that required dependencies are on the
- ;; classpath.
- (add-after 'unpack 'patch-classpath-for-integration
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "build.xml"
- ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
- (string-join
- (cons line
- (append
- (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
- (find-files (assoc-ref inputs "java-junit") "\\.jar$")
- (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
- (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
- ";")))
- #t))))))
+ `(#:jdk ,icedtea-8
+ ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
+ ((#:build-target _) "bigjar")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Some build targets override the classpath, so we need to patch
+ ;; the build.xml to ensure that required dependencies are on the
+ ;; classpath.
+ (add-after 'unpack 'patch-classpath-for-integration
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
+ (string-join
+ (cons line
+ (append
+ (find-files (assoc-ref inputs "java-junit") "\\.jar$")
+ (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
+ (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
+ ";")))
+ #t)))))))
(inputs
`(("java-junit" ,java-junit)
("java-jmock" ,java-jmock-1)
("java-easymock" ,java-easymock)
- ("java-hamcrest-core" ,java-hamcrest-core)
,@(package-inputs java-hamcrest-core)))))
(define-public java-jopt-simple
@@ -5103,7 +6037,9 @@ tree walking, and translation.")
version ".tar.gz"))
(sha256
(base32
- "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
+ "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
+ (patches
+ (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
(arguments
`(#:jar-name (string-append ,name "-" ,version ".jar")
#:source-dir (string-join '("tool/src/main/java"
@@ -5185,7 +6121,6 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
(define antlr3-3.1
(package
(inherit antlr3)
- (name "antlr3-3.1")
(version "3.1")
(source (origin
(method url-fetch)
@@ -5194,9 +6129,11 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
version ".tar.gz"))
(sha256
(base32
- "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
+ "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
+ (patches
+ (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
(arguments
- `(#:jar-name (string-append ,name "-" ,version ".jar")
+ `(#:jar-name (string-append "antlr3-" ,version ".jar")
#:source-dir "src:runtime/Java/src"
#:tests? #f
#:phases
@@ -5228,12 +6165,13 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
(for-each (lambda (file)
(display file)
(newline)
- (system* "antlr" "-o" dir (string-append dir file)))
+ (invoke "antlr" "-o" dir (string-append dir file)))
'("antlr.g" "antlr.print.g" "assign.types.g"
"buildnfa.g" "define.g")))
(format #t "codegen.g\n")
- (system* "antlr" "-o" "src/org/antlr/codegen"
- "src/org/antlr/codegen/codegen.g")))
+ (invoke "antlr" "-o" "src/org/antlr/codegen"
+ "src/org/antlr/codegen/codegen.g")
+ #t))
(add-before 'build 'fix-build-xml
(lambda _
(substitute* "build.xml"
@@ -6056,7 +6994,8 @@ it manages project dependencies, gives diffs jars, and much more.")
;; packaging. It uses the version referenced in pom.xml. We replace
;; it with our own version.
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
- (("2.4.0.201411031534") "3.4.0")))))))
+ (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
+ ,(package-version java-aqute-bndlib))))))))
(inputs
`(("lang" ,java-ops4j-base-lang)
("io" ,java-ops4j-base-io)
@@ -6365,6 +7304,7 @@ configuration.")
(method url-fetch)
(uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
@@ -6956,7 +7896,7 @@ those in Perl and JavaScript.")
(define-public java-testng
(package
(name "java-testng")
- (version "6.14.2")
+ (version "6.14.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -6965,7 +7905,7 @@ those in Perl and JavaScript.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0ngj88dpbqqdx9084cmiasmn9q3v5dgx45qbvxpip47nxc5x14xy"))))
+ "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
(build-system ant-build-system)
(arguments
`(#:jdk ,icedtea-8; java.util.function
@@ -7030,54 +7970,56 @@ to use.")
(license license:asl2.0)))
(define-public java-jnacl
- (package
- (name "java-jnacl")
- (version "0.1.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/neilalexander/jnacl")
- (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
- (sha256
- (base32
- "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
- (build-system ant-build-system)
- (arguments
- `(#:jar-name "java-jnacl.jar"
- #:source-dir "src/main/java"
- #:jdk ,icedtea-8
- #:phases
- (modify-phases %standard-phases
- (add-before 'build 'fix-tests
- (lambda _
- (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
- (("assertions.Assertions") "assertions.api.Assertions"))
- (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
- (("assertions.Assertions") "assertions.api.Assertions"))
- #t))
- (replace 'check
- (lambda _
- (system* "ant" "compile-tests")
- (and
- (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
- ":build/classes"
- ":build/test-classes")
- "org.testng.TestNG" "-testclass"
- "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
- (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
- ":build/classes"
- ":build/test-classes")
- "org.testng.TestNG" "-testclass"
- "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
- (native-inputs
- `(("java-testng" ,java-testng)
- ("java-fest-util" ,java-fest-util)
- ("java-fest-assert" ,java-fest-assert)))
- (home-page "https://github.com/neilalexander/jnacl")
- (synopsis "Java implementation of NaCl")
- (description "Pure Java implementation of the NaCl: Networking and
+ (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
+ (revision "2"))
+ (package
+ (name "java-jnacl")
+ (version (string-append "0.1.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/neilalexander/jnacl.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "jnacl.jar"
+ #:source-dir "src/main/java"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-tests
+ (lambda _
+ (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
+ "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
+ (("assertions.Assertions") "assertions.api.Assertions"))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "ant" "compile-tests")
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":build/classes"
+ ":build/test-classes")
+ "org.testng.TestNG" "-testclass"
+ "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":build/classes"
+ ":build/test-classes")
+ "org.testng.TestNG" "-testclass"
+ "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
+ #t)))))
+ (native-inputs
+ `(("java-testng" ,java-testng)
+ ("java-fest-util" ,java-fest-util)
+ ("java-fest-assert" ,java-fest-assert)))
+ (home-page "https://github.com/neilalexander/jnacl")
+ (synopsis "Java implementation of NaCl")
+ (description "Pure Java implementation of the NaCl: Networking and
Cryptography library.")
- (license license:mpl2.0)))
+ (license license:bsd-2))))
(define-public java-mvel2
(package
@@ -7172,8 +8114,9 @@ configuration and string construction.")
(add-before 'build 'run-javacc
(lambda _
(with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
- (and (zero? (system* "java" "jjtree" "Parser.jjt"))
- (zero? (system* "java" "javacc" "Parser.jj")))))))))
+ (invoke "java" "jjtree" "Parser.jjt")
+ (invoke "java" "javacc" "Parser.jj"))
+ #t)))))
(inputs
`(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
(native-inputs
@@ -7213,7 +8156,8 @@ by technical operatives or consultants working with enterprise platforms.")
(add-before 'configure 'generate-source
(lambda _
(with-directory-excursion "src/build/source_templates"
- (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
+ (invoke "mvel2" "../gen_sources.mvel" "../../java"))
+ #t)))))
(native-inputs
`(("mvel" ,java-mvel2)))
(home-page "https://jpountz.github.io/lz4-java")
@@ -7243,7 +8187,8 @@ algorithms and xxHash hashing algorithm.")
(lambda _
(mkdir-p "src")
(with-directory-excursion "src"
- (zero? (system* "unzip" "../src.zip"))))))))
+ (invoke "unzip" "../src.zip"))
+ #t)))))
(native-inputs
`(("unzip" ,unzip)
("junit" ,java-junit)))
@@ -7274,7 +8219,8 @@ for the Java programming language.")
(lambda _
(mkdir-p "src")
(with-directory-excursion "src"
- (zero? (system* "unzip" "../src.zip"))))))))
+ (invoke "unzip" "../src.zip"))
+ #t)))))
(native-inputs
`(("unzip" ,unzip)
("junit" ,java-junit)))
@@ -7631,7 +8577,8 @@ protocol-independent framework to build mail and messaging applications.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))))
+ "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
+ (patches (search-patches "java-jeromq-fix-tests.patch"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-jeromq.jar"
@@ -7645,7 +8592,13 @@ protocol-independent framework to build mail and messaging applications.")
;; Failures
"**/DealerSpecTest.java"
"**/CustomDecoderTest.java"
- "**/CustomEncoderTest.java")))
+ "**/CustomEncoderTest.java"
+ "**/ConnectRidTest.java"
+ "**/ReqSpecTest.java"
+ "**/PushPullSpecTest.java"
+ "**/PubSubHwmTest.java"
+ "**/RouterSpecTest.java"
+ "**/ProxyTest.java")))
(inputs
`(("java-jnacl" ,java-jnacl)))
(native-inputs
@@ -7901,26 +8854,23 @@ including pre-existing objects that you do not have source-code of.")
(modify-phases %standard-phases
(add-before 'build 'build-native
(lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion "hawtjni-generator/src/main/resources/"
- (and
- (system* "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
- "-fPIC" "-O2"
- (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
- (system* "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
- "-fPIC" "-O2"
- (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
- (system* "gcc" "-o" "libhawtjni.so" "-shared"
- "hawtjni.o" "hawtjni-callback.o")))))
+ (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
+ (with-directory-excursion "hawtjni-generator/src/main/resources/"
+ (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
+ "-fPIC" "-O2" include)
+ (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
+ "-fPIC" "-O2" include)
+ (invoke "gcc" "-o" "libhawtjni.so" "-shared"
+ "hawtjni.o" "hawtjni-callback.o")))
+ #t))
(add-after 'install 'install-native
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(inc (string-append out "/include")))
- (mkdir-p lib)
- (mkdir-p inc)
(with-directory-excursion "hawtjni-generator/src/main/resources/"
- (copy-file "libhawtjni.so" (string-append lib "/libhawtjni.so"))
- (copy-file "hawtjni.h" (string-append inc "/hawtjni.h"))))
+ (install-file "libhawtjni.so" lib)
+ (install-file "hawtjni.h" inc)))
#t)))))
(inputs
`(("java-commons-cli" ,java-commons-cli)
@@ -7957,14 +8907,14 @@ that is part of the SWT Tools project.")
(with-directory-excursion "src/main/native-package/src"
(substitute* "jansi_ttyname.c"
(("#include \"jansi_.*") ""))
- (and
- (system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
- (string-append "-I" (assoc-ref inputs "java-hawtjni")
- "/include")
- (string-append "-I" (assoc-ref inputs "jdk")
- "/include/linux")
- "-fPIC" "-O2")
- (system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))))
+ (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
+ (string-append "-I" (assoc-ref inputs "java-hawtjni")
+ "/include")
+ (string-append "-I" (assoc-ref inputs "jdk")
+ "/include/linux")
+ "-fPIC" "-O2")
+ (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
+ #t)))
(add-before 'build 'install-native
(lambda _
(let ((dir (string-append "build/classes/META-INF/native/"
@@ -7977,7 +8927,6 @@ that is part of the SWT Tools project.")
#t))
(add-after 'install 'install-native
(lambda* (#:key outputs #:allow-other-keys)
- (mkdir-p (string-append (assoc-ref outputs "out") "/include"))
(install-file "src/main/native-package/src/jansi.h"
(string-append (assoc-ref outputs "out") "/include"))
#t)))))
@@ -7985,8 +8934,9 @@ that is part of the SWT Tools project.")
`(("java-hawtjni" ,java-hawtjni)))
(home-page "https://fusesource.github.io/jansi/")
(synopsis "Native library for jansi")
- (description "Java-jansi-native contains the native library for the jansi
-frobnication library/framework.")
+ (description "This package provides the native library for jansi, a small
+Java library that allows you to use ANSI escape sequences to format your
+console output.")
(license license:asl2.0)))
(define-public java-jansi
@@ -8370,3 +9320,44 @@ against expected outcomes.")
("java-junit" ,java-junit)))
(native-inputs
`(("java-mockito-1" ,java-mockito-1)))))
+
+(define-public java-openchart2
+ (package
+ (name "java-openchart2")
+ (version "1.4.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://download.approximatrix.com/openchart2/"
+ "openchart2-" version ".source.zip"))
+ (sha256
+ (base32
+ "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-junit-errors
+ (lambda _
+ (with-directory-excursion "unittest/src/com/approximatrix/charting/"
+ (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
+ "coordsystem/ticklocator/NumericYTickLocatorTest.java"
+ "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
+ "model/DefaultChartDataModelConstraintsTest.java"
+ "model/MultiScatterDataModelConstraintsTest.java"
+ "model/threedimensional/DotPlotDataModelConstraintsTest.java")
+ (("(assertEquals[^;]+);" before _)
+ (string-append (string-drop-right before 2) ", 1E-6);"))))
+ #t))
+ (replace 'install (install-jars ".")))))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-junit" ,java-junit)
+ ("java-hamcrest-core" ,java-hamcrest-core)))
+ (home-page "http://approximatrix.com/products/openchart2/")
+ (synopsis "Simple plotting for Java")
+ (description "Openchart2 provides a simple, yet powerful, interface for
+Java programmers to create two-dimensional charts and plots. The library
+features an assortment of graph styles, including advanced scatter plots, bar
+graphs, and pie charts.")
+ (license license:lgpl2.1+)))