1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/science/opensph/Makefile
Yuri Victorovich 5c13bc9d98 science/opensph: Only for amd64 i386
Reported by:	fallout
2022-03-29 14:02:08 -07:00

77 lines
2.2 KiB
Makefile

PORTNAME= OpenSPH
DISTVERSION= 0.3.8
PORTREVISION= 4 # accounts for the upstream moving 0.3.8 release, including bugfixes
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
COMMENT= Library and graphical tools for running SPH and N-body simulations
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= unconditional use of -msse4.1 and inclusion of immintrin.h
TEST_DEPENDS= catch>0:devel/catch
USES= compiler:c++14-lang qmake qt:5
USE_GITLAB= yes
USE_WX= 3.1
GL_SITE= https://gitlab.com
GL_ACCOUNT= sevecekp
GL_PROJECT= sph
GL_COMMIT= 7de6c044339f649e3d19e61f735a6a24572b792a
QMAKE_SOURCE_PATH= ${WRKSRC}/sph.pro
QMAKE_ARGS= CONFIG+=release
CXXFLAGS+= -DSPH_CONFIG_SET
TEST_WRKSRC= ${WRKDIR}/test
BINARY_ALIAS= wx-config=${LOCALBASE}/bin/wxgtk3u-3.1-config
PLIST_FILES= bin/opensph bin/opensph-cli bin/opensph-info
OPTIONS_DEFINE= CHAISCRIPT EIGEN HDF5 OPENMP TBB VDB
OPTIONS_DEFAULT= CHAISCRIPT EIGEN HDF5 OPENMP TBB VDB
CHAISCRIPT_DESC= Be able to read and modify particle data from a script
CHAISCRIPT_QMAKE_ON= CONFIG+=use_chaiscript
CHAISCRIPT_BUILD_DEPENDS= ${LOCALBASE}/include/chaiscript/chaiscript.hpp:lang/chaiscript
EIGEN_DESC= Eigen for additional methods to set up initial conditions
EIGEN_QMAKE_ON= CONFIG+=use_eigen
EIGEN_USES= eigen:3
HDF5_DESC= Be able to read files generated by miluphcuda code
HDF5_QMAKE_ON= CONFIG+=use_hdf5
HDF5_LIB_DEPENDS= libhdf5.so:science/hdf5
OPENMP_QMAKE_ON= CONFIG+=use_openmp
TBB_DESC= Parallelize with Intel Threading Building Blocks
TBB_QMAKE_ON= CONFIG+=use_tbb
TBB_LIB_DEPENDS= libtbb.so:devel/onetbb
VDB_DESC= Use OpenVDB for converting particles to volumetric data
VDB_QMAKE_ON= CONFIG+=use_vdb
VDB_LIB_DEPENDS= libImath.so:math/Imath \
libopenvdb.so:misc/openvdb \
libtbb.so:devel/onetbb
do-test:
@${REINPLACE_CMD} -e 's|Path(.*|Path("${TEST_WRKSRC}");|' ${WRKSRC}/test/utils/Config.h
@${MKDIR} ${TEST_WRKSRC}
@cd ${_QMAKE_WRKSRC} && \
${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \
${WRKSRC}/test.pro \
${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS}
@cd ${BUILD_WRKSRC} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS}
@cd ${TEST_WRKSRC} && \
${WRKSRC}/test/test
.include <bsd.port.mk>