aboutsummaryrefslogtreecommitdiff
path: root/science/chemicalfun/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'science/chemicalfun/Makefile')
-rw-r--r--science/chemicalfun/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/science/chemicalfun/Makefile b/science/chemicalfun/Makefile
index 1b6b39050c28..6f1d9755098f 100644
--- a/science/chemicalfun/Makefile
+++ b/science/chemicalfun/Makefile
@@ -1,5 +1,5 @@
PORTNAME= chemicalfun
-DISTVERSION= 0.1.7
+DISTVERSION= 0.1.8
CATEGORIES= science # chemistry
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${PORTNAME}/get/${BB_COMMIT}${EXTRACT_SUFX}?dummy=/:src
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}:src
@@ -8,17 +8,21 @@ MAINTAINER= yuri@FreeBSD.org
COMMENT= C++ library for working with chemical reactions and formulas
WWW= https://bitbucket.org/gems4/chemicalfun/src/master/
-BUILD_DEPENDS= nlohmann-json>0:devel/nlohmann-json
+BUILD_DEPENDS= nlohmann-json>0:devel/nlohmann-json \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR}
LIB_DEPENDS= libfmt.so:devel/libfmt # due to SPDLOG_FMT_EXTERNAL
LIB_DEPENDS+= libspdlog.so:devel/spdlog
USES= cmake:testing compiler:c++17-lang eigen:3 localbase
BB_ACCOUNT= gems4
-BB_COMMIT= 7b43744ec72d
+BB_COMMIT= 46c628fef376
WRKSRC= ${WRKDIR}/${BB_ACCOUNT}-${PORTNAME}-${BB_COMMIT}
+CMAKE_ARGS= -DFREEBSD_PREFIX=${PREFIX} -DFREEBSD_STAGEDIR=${STAGEDIR} \
+ -DPython_EXECUTABLE=${PYTHON_CMD}
CMAKE_TESTING_ON= CHEMICALFUN_BUILD_TESTS # tests fail to compile, BitBucket offers no easy way to report this
CMAKE_TESTING_TARGET= ${ALL_TARGET} # hack to prevent test run
@@ -31,10 +35,14 @@ OPTIONS_SUB= yes
PYTHON_USES= python
PYTHON_CMAKE_BOOL= CHEMICALFUN_BUILD_PYTHON
-PYTHON_CMAKE_ON= -DFREEBSD_STAGEDIR=${STAGEDIR}
+PYTHON_CMAKE_ON= -DFREEBSD_PREFIX=${PREFIX}
PYTHON_BUILD_DEPENDS= pybind11>0:devel/pybind11
post-install-PYTHON-on:
+ # remove wrong *.pyc, see related bug https://bitbucket.org/gems4/chemicalfun/issues/1/please-support-stagedir
+ @${FIND} ${STAGEDIR} -name "*.pyc" -delete
+ @${FIND} ${STAGEDIR} -name __pycache__ -delete
+ # strip binary
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/chemicalfun/PyChemicalFun${PYTHON_EXT_SUFFIX}.so
post-test: