mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-19 00:13:33 +00:00
96261a1e5a
and bump dependent ports' revisions. Release notes: https://github.com/oneapi-src/oneTBB/releases/tag/v2021.12.0
81 lines
2.4 KiB
Makefile
81 lines
2.4 KiB
Makefile
PORTNAME= OpenSPH
|
|
DISTVERSION= 0.4.1
|
|
PORTREVISION= 2
|
|
CATEGORIES= science
|
|
|
|
MAINTAINER= yuri@FreeBSD.org
|
|
COMMENT= Library and graphical tools for running SPH and N-body simulations
|
|
WWW= https://gitlab.com/sevecekp/sph
|
|
|
|
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++17-lang qmake qt:5
|
|
USE_GITLAB= yes
|
|
USE_WX= 3.2
|
|
|
|
GL_SITE= https://gitlab.com
|
|
GL_ACCOUNT= sevecekp
|
|
GL_PROJECT= sph
|
|
GL_TAGNAME= a7f6f781059d8d19e6f24b1115e7ad3ad71678a8
|
|
|
|
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.2-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
|
|
|
|
post-patch: # workaround for https://gitlab.com/sevecekp/sph/-/issues/48
|
|
@${FIND} ${WRKSRC} -name "*.pro" | ${XARGS} ${REINPLACE_CMD} -e 's|c++14|c++17|'
|
|
|
|
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>
|