summaryrefslogtreecommitdiff
path: root/math/py-yt
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2020-02-10 15:42:52 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2020-02-10 15:42:52 +0000
commit0057d69d9fb01650a48b872e52e0e70242969ac0 (patch)
tree2b1e1693a813466b3a0eb9e33d6770b0142cf24d /math/py-yt
parentx11-servers/xwayland-devel: add missing runtime dependencies (diff)
Make Embree ray-tracing engine support optional, to simplify the upcoming
update of `graphics/embree'. No changes in generated package by default.
Notes
Notes: svn path=/head/; revision=525712
Diffstat (limited to 'math/py-yt')
-rw-r--r--math/py-yt/Makefile25
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