summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD84
3 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ec787ca4fc7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = hdf5-java
+ pkgdesc = General purpose library and file format for storing scientific data, w/java bindings
+ pkgver = 1.10.4
+ pkgrel = 1
+ url = https://www.hdfgroup.org/hdf5
+ arch = x86_64
+ license = custom
+ makedepends = cmake
+ makedepends = time
+ makedepends = gcc-fortran
+ makedepends = java-environment-openjdk=11
+ depends = zlib
+ depends = libaec
+ depends = bash
+ provides = hdf5-cpp-fortran
+ provides = hdf5-java
+ provides = hdf5
+ conflicts = hdf5
+ conflicts = hdf5-openmpi
+ replaces = hdf5-cpp-fortran
+ options = staticlibs
+ source = https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.4/src/hdf5-1.10.4.tar.bz2
+ sha256sums = 1267ff06aaedc04ca25f7c6026687ea2884b837043431195f153401d942b28df
+
+pkgname = hdf5-java
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..0740c9469dd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src/
+pkg/
+*.tar.gz
+*.tar.xz
+*.tar.bz2
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f927d08d88b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id$
+# Maintainer: Grey Christoforo <first name at last name dot net>
+
+pkgname=hdf5-java
+_pkgname=hdf5
+pkgver=1.10.4
+pkgrel=1
+pkgdesc="General purpose library and file format for storing scientific data, w/java bindings"
+arch=('x86_64')
+url="https://www.hdfgroup.org/hdf5"
+license=('custom')
+depends=('zlib' 'libaec' 'bash')
+makedepends=('cmake' 'time' 'gcc-fortran' 'java-environment-openjdk=11')
+replaces=('hdf5-cpp-fortran')
+provides=('hdf5-cpp-fortran' 'hdf5-java' 'hdf5')
+conflicts=('hdf5' 'hdf5-openmpi')
+options=('staticlibs')
+source=("https://support.hdfgroup.org/ftp/HDF5/releases/${_pkgname}-${pkgver:0:4}/${_pkgname}-${pkgver/_/-}/src/${_pkgname}-${pkgver/_/-}.tar.bz2")
+sha256sums=('1267ff06aaedc04ca25f7c6026687ea2884b837043431195f153401d942b28df')
+
+build() {
+ # Crazy workaround: run CMake to generate pkg-config file
+ mkdir -p build && cd build
+ JAVADOC='javadoc -Xdoclint:none' \
+ cmake ../${_pkgname}-${pkgver/_/-} \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DHDF5_BUILD_HL_LIB=ON \
+ -DHDF5_BUILD_CPP_LIB=ON \
+ -DHDF5_BUILD_FORTRAN=ON \
+ -DHDF5_BUILD_JAVA=ON \
+ -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
+ -DHDF5_ENABLE_SZIP_SUPPORT=ON \
+ -DHDF5_ENABLE_SZIP_ENCODING=ON
+ # But don’t build with it, it’s quite broken
+ cd ../${_pkgname}-${pkgver/_/-}
+ ./configure \
+ JAVADOC='javadoc -Xdoclint:none' \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/hdf5/ \
+ --enable-static \
+ --disable-sharedlib-rpath \
+ --enable-build-mode=production \
+ --enable-hl \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --with-pic \
+ --with-zlib \
+ --with-szlib
+ make
+}
+
+check() {
+ cd ${_pkgname}-${pkgver/_/-}
+ # Without this, checks are failing with messages like “error while loading shared libraries: libhdf5.so.101: cannot open shared object file: No such file or directory”
+ export LD_LIBRARY_PATH="${srcdir}"/${_pkgname}-${pkgver/_/-}/src/.libs/
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${_pkgname}-${pkgver/_/-}/c++/src/.libs/
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${_pkgname}-${pkgver/_/-}/fortran/src/.libs/
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${_pkgname}-${pkgver/_/-}/hl/src/.libs/
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${_pkgname}-${pkgver/_/-}/hl/c++/src/.libs/
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${_pkgname}-${pkgver/_/-}/hl/fortran/src/.libs/
+ make check
+}
+
+package() {
+ cd ${_pkgname}-${pkgver/_/-}
+
+ make DESTDIR="${pkgdir}" install
+
+ # Remove leftover test files
+ rm "${pkgdir}"/usr/include/tst{ds,image,lite,table}{,_tests}.mod
+
+ # Move examples to a proper place
+ install -dm755 "${pkgdir}"/usr/share/doc/${_pkgname}
+ mv "${pkgdir}"/usr/share/{hdf5_examples,doc/${_pkgname}/examples}
+
+ install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${_pkgname}
+
+ # Install pkg-config files from CMake tree
+ install -Dm644 ../build/CMakeFiles/hdf5{,_hl}{,_cpp}-${pkgver}.pc -t "${pkgdir}"/usr/lib/pkgconfig/
+}
+