diff options
author | nros <nros> | 2016-03-07 18:27:32 +0000 |
---|---|---|
committer | nros <nros> | 2016-03-07 18:27:32 +0000 |
commit | f0af49ee68c9b1cbbb953f450056b50bbc09e663 (patch) | |
tree | ef9c064a49e535c561bd12785ab9b041df934a44 /devel | |
parent | 2f7e0647cfe38e06731392a6890fe894e36cfe36 (diff) | |
download | pkgsrc-f0af49ee68c9b1cbbb953f450056b50bbc09e663.tar.gz |
Add a tool.mk in devel/py-cython to be used by packages that need cython as
a tool without suffix. Based on lang/python/tool.mk.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-cython/tool.mk | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/devel/py-cython/tool.mk b/devel/py-cython/tool.mk new file mode 100644 index 00000000000..ca516d933f3 --- /dev/null +++ b/devel/py-cython/tool.mk @@ -0,0 +1,28 @@ +# $NetBSD: tool.mk,v 1.1 2016/03/07 18:27:32 nros Exp $ +# +# This mk fragment can be included in all packages that uses `cython' +# and `cythonize' as tools without version suffix. +# +# Keywords: python +# + +.if !defined(CYTHON_TOOL_MK) +CYTHON_TOOL_MK= defined + +.if !defined(PYTHON_PYVERSION_MK) +.include "../../lang/python/pyversion.mk" +.endif + +BUILDLINK_TARGETS+= buildlink-bin-cython + +.PHONY: buildlink-bin-cython +buildlink-bin-cython: +.for CYTHONTOOL in cython cythonize + ${RUN} \ + f="${PREFIX}/bin/${CYTHONTOOL}${PYVERSSUFFIX}"; \ + t="${BUILDLINK_DIR}/bin/${CYTHONTOOL}"; \ + if ${TEST} -f $$f -a ! -f $$t ; then \ + ${LN} -sf $$f $$t; \ + fi +.endfor +.endif # CYTHON_TOOL_MK |