#!/usr/bin/env modbuild

SOURCE_URL="https://support.hdfgroup.org/ftp/HDF5/current${V_MAJOR}${V_MINOR}/src/hdf5-$V.tar.bz2"

pbuild::configure() {
	test "$(basename "$CPP")" = "pgprepro" && {
		CPP=cpp
		CXX=g++
		echo "INFO: substituted pgprepro with cpp, and pgc++ with g++!"
	}
	"${MODULE_SRCDIR}"/configure \
		--prefix="${PREFIX}" \
		--enable-shared \
		--enable-cxx \
		--enable-unsupported \
		--enable-threadsafe \
		--with-pic \
		|| exit 1
}

pbuild::add_to_group 'Compiler'
pbuild::make_all

