[bug#77590,v2,3/3] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java.
Commit Message
* gnu/packages/maths.scm (hdf-java): Update to 1.14.6.
[name]: Rename to hdf5-java.
[version]: Use the same as hdf5.
[source]: Use the same as hdf5.
[arguments]: Add (guix build ant-build-system) to #:modules
and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang,
'generate-flexbison and 'strip-jar-timestamps phases.
[native-inputs]: Use modify-inputs. Add zip.
[inputs]: Remove hdf4 and hdf5.
[synopsis, description]: Remove mention of HDF4.
[license]: Use the same as hdf5.
---
gnu/packages/maths.scm | 85 ++++++++++++++++++++----------------------
1 file changed, 40 insertions(+), 45 deletions(-)
@@ -2030,33 +2030,24 @@ (define-public hdf5-examples
(inputs (list hdf5 zlib))
(native-inputs (list autoconf-2.71 automake gfortran))))
-;; Keep this in sync with the current hdf5 package.
-(define-public hdf-java
+(define-public hdf5-java
(package
- (name "hdf-java")
- (version "1.14.3")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/HDFGroup/hdf5")
- (commit (string-append "hdf5-"
- (string-map
- (lambda (c) (if (char=? c #\.) #\_ c))
- version)))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs"))
- (modules '((guix build utils)))
- (snippet ; Make sure we don't use the bundled sources and binaries.
- '(for-each delete-file
- (find-files "java/lib" "\\.jar$")))))
+ (name "hdf5-java")
+ (version (package-version hdf5))
+ (source (package-source hdf5))
(build-system gnu-build-system)
(arguments
(list
#:configure-flags
#~(list "--enable-java"
"--disable-tools")
+ #:modules
+ '((guix build gnu-build-system)
+ ((guix build ant-build-system) #:prefix ant:)
+ (guix build utils))
+ #:imported-modules
+ `((guix build ant-build-system)
+ ,@%default-gnu-imported-modules)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'unbundle
@@ -2073,8 +2064,7 @@ (define-public hdf-java
(hamcrest
(search-input-file
inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar")))
- (substitute* (append (find-files "java" "Makefile.am")
- (find-files "java" "Makefile.in"))
+ (substitute* (find-files "java" "Makefile.am")
(("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar")
simple)
(("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar")
@@ -2084,10 +2074,10 @@ (define-public hdf-java
(("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar")
hamcrest))
(substitute* '("java/test/junit.sh.in"
- "java/examples/datatypes/JavaDatatypeExample.sh.in"
- "java/examples/datasets/JavaDatasetExample.sh.in"
- "java/examples/intro/JavaIntroExample.sh.in"
- "java/examples/groups/JavaGroupExample.sh.in")
+ "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in"
+ "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in"
+ "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in"
+ "HDF5Examples/JAVA/TUTR/runExample.sh.in")
(("^LIST_JAR_TESTFILES=\"" m)
(string-append m hamcrest "\n"
junit "\n"
@@ -2107,30 +2097,35 @@ (define-public hdf-java
(("/usr/bin/uname")
(search-input-file inputs "/bin/uname")))
(substitute* (find-files "java/test/testfiles/" ".*\\.txt$")
- (("JUnit version 4.11")
- "JUnit version 4.12-SNAPSHOT"))))))))
+ (("JUnit version 4.13.2")
+ "JUnit version 4.12-SNAPSHOT")))))
+ (add-after 'unpack 'patch-trace-shebang
+ (lambda _
+ (for-each patch-shebang
+ (find-files "bin" (lambda (file stat)
+ (executable-file? file))))))
+ (add-after 'unpack 'generate-flexbison
+ (lambda _
+ (invoke "bash" "bin/genparser" "hl/src")))
+ (add-after 'install 'strip-jar-timestamps
+ (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))
(native-inputs
- (list `(,icedtea "jdk")
- ;; For tests:
- java-hamcrest-core
- java-junit
- java-slf4j-simple))
+ (modify-inputs (package-native-inputs hdf5)
+ (prepend `(,icedtea "jdk"))
+ (prepend java-hamcrest-core)
+ (prepend java-junit)
+ (prepend java-slf4j-simple)
+ (prepend (@ (gnu packages compression) zip))
+ (delete "gfortran")))
(inputs
- (list hdf4
- hdf5
- java-slf4j-api
+ (list java-slf4j-api
libjpeg-turbo
zlib))
(home-page "https://www.hdfgroup.org")
- (synopsis "Java interface for the HDF4 and HDF5 libraries")
- (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use
-the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are
-implemented in C.")
-
- ;; BSD-style license:
- (license (license:x11-style
- "https://support.hdfgroup.org/ftp/HDF5/hdf-java\
-/current/src/unpacked/COPYING.html"))))
+ (synopsis "Java interface for the HDF5 library")
+ (description "The Java HDF5 Interface (JHI5) uses the Java Native
+Interface to wrap the HDF5 library, which is implemented in C.")
+ (license (package-license hdf5))))
(define-public hdf-eos2
(package