cruxports/hdf5/Pkgfile

57 lines
1.4 KiB
Plaintext

# Description: A general purpose library and file format for storing scientific data.
# URL: http://www.hdfgroup.org/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Contributor: Danny Rawlins, crux at romster dot me
# Depends on: szip zlib openssl gcc-fortran
# Nice to have: openjdk8
name=hdf5
version=1.12.2
release=1
source=(https://support.hdfgroup.org/ftp/HDF5/releases/$name-${version:0:4}/$name-$version/src/$name-$version.tar.bz2)
build() {
mkdir build && cd build
cmake ../$name-$version \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DHDF5_BUILD_HL_LIB=ON \
-DHDF5_BUILD_CPP_LIB=ON \
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
-DHDF5_ENABLE_SZIP_SUPPORT=ON \
-DHDF5_ENABLE_SZIP_ENCODING=ON \
-DUSE_LIBAEC=ON
# CMake was just to generate the pkg-config file.
# Actual building happens below.
cd ../$name-$version
./configure \
--prefix=/usr \
--mandir=$PKG/usr/share/man \
--disable-static \
--disable-sharedlib-rpath \
--enable-hl \
--enable-build-mode=production \
--enable-fortran \
--with-pic \
--with-ssl \
--with-pthread \
--with-szlib \
--with-zlib
make
make DESTDIR=$PKG install
rm -rf $PKG/usr/share/hdf5_examples
rmdir --ignore-fail-on-non-empty -p $PKG/usr/share
# strip .la files
rm -f $PKG/usr/lib/*.la
find $PKG -type f -name README -delete
}