libhdf5: add package
[termux-packages] / packages / libhdf5 / build.sh
1 TERMUX_PKG_HOMEPAGE=https://portal.hdfgroup.org/display/support
2 TERMUX_PKG_DESCRIPTION="Hierarchical Data Format 5 (HDF5)"
3 _HDF5_MAJOR=1
4 _HDF5_MINOR=10
5 _HDF5_PATCH=1
6 TERMUX_PKG_VERSION=${_HDF5_MAJOR}.${_HDF5_MINOR}.${_HDF5_PATCH}
7 TERMUX_PKG_SHA256=9c5ce1e33d2463fb1a42dd04daacbc22104e57676e2204e3d66b1ef54b88ebf2
8 TERMUX_PKG_SRCURL=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${_HDF5_MAJOR}.${_HDF5_MINOR}/hdf5-$TERMUX_PKG_VERSION/src/hdf5-$TERMUX_PKG_VERSION.tar.bz2
9 TERMUX_PKG_DEPENDS="libzopfli"
10 TERMUX_PKG_FORCE_CMAKE=true
11 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-C$TERMUX_PKG_BUILDER_DIR/aarch64/TryRunResults_out.cmake "
12
13 termux_step_pre_configure () {
14 cp $TERMUX_PKG_BUILDER_DIR/aarch64/{H5Tinit.c,H5lib_settings.c} $TERMUX_PKG_BUILDDIR/
15 mkdir -p $TERMUX_PKG_BUILDDIR/shared/
16 cp $TERMUX_PKG_BUILDER_DIR/aarch64/{H5Tinit.c,H5lib_settings.c} $TERMUX_PKG_BUILDDIR/shared/
17 }
18
19 termux_step_post_configure () {
20 cp $TERMUX_PKG_BUILDER_DIR/aarch64/{H5Tinit.c,H5lib_settings.c} $TERMUX_PKG_BUILDDIR/shared/
21 }
22
23 termux_step_post_make_install() {
24 # Add a pkg-config file
25 cat > "$PKG_CONFIG_LIBDIR/hdf5.pc" <<-HERE
26 prefix=$TERMUX_PREFIX
27 exec_prefix=\${prefix}
28 libdir=\${exec_prefix}/lib
29 includedir=\${exec_prefix}/include
30
31 Name: hdf5
32 Description: $TERMUX_PKG_DESCRIPTION
33 Version: $TERMUX_PKG_VERSION
34 Requires:
35 Libs: -L\${libdir} -lhdf5
36 Cflags: -I\${includedir}
37
38 HERE
39 }