# $NetBSD: Makefile.common,v 1.29 2025/03/19 09:18:14 adam Exp $
# used by devel/hdf5/Makefile
# used by devel/hdf5-c++/Makefile

DISTNAME=	hdf5-1.14.6
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_GITHUB:=HDFGroup/}
# needed for hdf5-c++
GITHUB_PROJECT=	hdf5
GITHUB_TAG=	hdf5_${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.hdfgroup.org/HDF5/
LICENSE=	original-bsd

USE_TOOLS+=	bash:run pax tr
TEST_TARGET=	test

DISTINFO_FILE=	${.CURDIR}/../../devel/hdf5/distinfo
PATCHDIR=	${.CURDIR}/../../devel/hdf5/patches

# These files are not used in the build. They use [[ ... ]].
CHECK_PORTABILITY_SKIP+=	HDF5Examples/*/*/*
CHECK_PORTABILITY_SKIP+=	bin/snapshot
CHECK_PORTABILITY_SKIP+=	hl/tools/h5watch/testh5watch.sh.in
CHECK_PORTABILITY_SKIP+=	java/test/junit.sh.in

# it appears that this file is informative only and is not actually
# used by any installed tools
CHECK_WRKREF_SKIP=	${PREFIX}/lib/libhdf5.settings

REPLACE_BASH+=		utils/subfiling_vfd/h5fuse.in

SUBST_CLASSES+=		unwrap
SUBST_STAGE.unwrap=	post-install
SUBST_SED.unwrap=	-e "s,${WRAPPER_BINDIR}/,,g"

post-extract:
	${CP} ${WRKSRC}/config/freebsd ${WRKSRC}/config/netbsd
	${CP} ${WRKSRC}/config/freebsd ${WRKSRC}/config/netbsdelf

.include "../../devel/cmake/build.mk"
