summaryrefslogtreecommitdiff
path: root/hdf4
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-29 14:59:29 +0200
committerErich Eckner <git@eckner.net>2020-05-29 14:59:29 +0200
commit0704ff9ebd38fbf568fdd7269b76ccc5acd4680d (patch)
tree9c85906fdb0dabf1f2be417043c678ac577b2e0e /hdf4
parent1fe4388cc3959428fbbb18bea84a57579110a907 (diff)
downloadarchlinuxewe-0704ff9ebd38fbf568fdd7269b76ccc5acd4680d.tar.xz
hdf4: back in the repos
Diffstat (limited to 'hdf4')
-rwxr-xr-xhdf4/PKGBUILD59
-rw-r--r--hdf4/config.patch14
2 files changed, 73 insertions, 0 deletions
diff --git a/hdf4/PKGBUILD b/hdf4/PKGBUILD
new file mode 100755
index 000000000..9beb5f9d6
--- /dev/null
+++ b/hdf4/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: George Eleftheriou <eleftg>
+# Contributor: XavierCLL <xavier dot corredor dot llano at gmail dot com>
+# Contributor: Jingbei Li <petronny>
+# Contributor: David Scholl <djscholl at gmail dot com>
+pkgname=hdf4
+pkgver=2.15
+pkgrel=1
+pkgdesc="General purpose library and file format for storing scientific data."
+arch=('i686' 'pentium4' 'x86_64')
+url="http://www.hdfgroup.org/hdf4.html"
+license=('custom')
+depends=('libaec' 'zlib' 'libjpeg-turbo' 'libtirpc' 'java-environment')
+makedepends=('gcc-libs' 'gcc-fortran' 'flex' 'bison')
+conflicts=('netcdf')
+source=("https://support.hdfgroup.org/ftp/HDF/releases/HDF4.${pkgver}/src/hdf-4.${pkgver}.tar.bz2")
+sha512sums=('7d4037800ef8950ed74f225355ef5458444bed26fc189fbbd2ce7d36009998013ac1f6ba5d4e60834acf8f6f73550357238745acc35e162679919400a48191e9')
+
+conflicts=('hdf4-java')
+provides=('hdf4-java')
+replaces=('hdf4-java')
+
+prepare() {
+ mkdir -p build
+ cd "hdf-4.${pkgver}"
+ autoreconf -i
+}
+
+build() {
+ cd build
+
+ "../hdf-4.${pkgver}"/configure \
+ CFLAGS="${CFLAGS} -fPIC" \
+ CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc/" \
+ LDFLAGS="${LDFLAGS} -ltirpc" \
+ FFLAGS="${FFLAGS} -fPIC -ffixed-line-length-none" \
+ LIBS="${LIBS} -ljpeg -laec -lsz" \
+ JAVADOC='javadoc -Xdoclint:none' \
+ --enable-shared \
+ --disable-static \
+ --disable-fortran \
+ --disable-netcdf \
+ --enable-java \
+ --enable-production \
+ --with-zlib \
+ --with-szlib=/usr \
+ --prefix=/opt/hdf4
+ make
+}
+
+package() {
+ cd build
+ make -j1 DESTDIR="${pkgdir}" install
+ install -dm 755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 "../hdf-4.${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -dm 755 "${pkgdir}/etc/ld.so.conf.d"
+ echo "/opt/${pkgname}/lib" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
+}
+
diff --git a/hdf4/config.patch b/hdf4/config.patch
new file mode 100644
index 000000000..c76492386
--- /dev/null
+++ b/hdf4/config.patch
@@ -0,0 +1,14 @@
+diff --git a/src/hdf-4.2.13/configure.ac b/src/hdf-4.2.13/configure.ac
+index 3030bad..6d7f654 100644
+--- a/src/hdf-4.2.13/configure.ac
++++ b/src/hdf-4.2.13/configure.ac
+@@ -685,6 +685,9 @@ case "$host" in
+ *-pc-cygwin*)
+ LIBS="$LIBS -ltirpc"
+ CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" ;;
++ *-linux-gnu*)
++ LIBS="$LIBS -ltirpc"
++ CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" ;;
+ *) ;;
+ esac
+