diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-02-10 23:42:52 +0800 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-02-10 23:42:52 +0800 |
commit | 0057d69d9fb01650a48b872e52e0e70242969ac0 (patch) | |
tree | 2b1e1693a813466b3a0eb9e33d6770b0142cf24d /math | |
parent | e6753d04beee4bbccade7b3584e7b8c15035b230 (diff) | |
download | freebsd-ports-gnome-0057d69d9fb01650a48b872e52e0e70242969ac0.tar.gz freebsd-ports-gnome-0057d69d9fb01650a48b872e52e0e70242969ac0.tar.zst freebsd-ports-gnome-0057d69d9fb01650a48b872e52e0e70242969ac0.zip |
Make Embree ray-tracing engine support optional, to simplify the upcoming
update of `graphics/embree'. No changes in generated package by default.
Diffstat (limited to 'math')
-rw-r--r-- | math/py-yt/Makefile | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/math/py-yt/Makefile b/math/py-yt/Makefile index 7dea6c57d3d6..f6f7c53dcdde 100644 --- a/math/py-yt/Makefile +++ b/math/py-yt/Makefile @@ -14,21 +14,34 @@ COMMENT= Analysis and visualization toolkit for volumetric data LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING.txt -BUILD_DEPENDS= ${PYNUMPY} \ - ${PYTHON_PKGNAMEPREFIX}pyembree>0:graphics/py-pyembree@${PY_FLAVOR} -LIB_DEPENDS= libembree.so:graphics/embree \ - libomp.so:devel/openmp +BUILD_DEPENDS= ${PYNUMPY} +LIB_DEPENDS= libomp.so:devel/openmp RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sympy>=1.0:math/py-sympy@${PY_FLAVOR} \ ${PYNUMPY} \ - ${PYTHON_PKGNAMEPREFIX}pyembree>0:graphics/py-pyembree@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}matplotlib>=1.5.3:math/py-matplotlib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ipython5>=1.0:devel/ipython5@${PY_FLAVOR} USES= dos2unix localbase python USE_PYTHON= distutils cython autoplist concurrent +OPTIONS_DEFINE= EMBREE +OPTIONS_DEFAULT= EMBREE +EMBREE_DESC= Embree ray-tracing engine support + +EMBREE_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyembree>0:graphics/py-pyembree@${PY_FLAVOR} +EMBREE_LIB_DEPENDS= libembree.so:graphics/embree +EMBREE_RUN_DEPENDS= ${EMBREE_BUILD_DEPENDS} + +post-patch-EMBREE-on: + @${REINPLACE_CMD} -e "s|check_for_pyembree() is not None|True|" \ + ${WRKSRC}/setup.py + +post-patch-EMBREE-off: + @${REINPLACE_CMD} -e "s|check_for_pyembree() is not None|False|" \ + ${WRKSRC}/setup.py + post-patch: - @${REINPLACE_CMD} -e "s|check_for_pyembree() is not None|True|; s|check_for_openmp() is True|True|" \ + @${REINPLACE_CMD} -e "s|check_for_openmp() is True|True|" \ ${WRKSRC}/setup.py @${REINPLACE_CMD} -e "s|\['-fopenmp', filename\]|['-I${LOCALBASE}/include', '-L${LOCALBASE}/lib', '-lm', '-fopenmp', filename]|" \ ${WRKSRC}/setupext.py |