summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-11-24 11:41:15 +0000
committernia <nia@pkgsrc.org>2019-11-24 11:41:15 +0000
commita38acd9fbd9f6f939f3007c58ac34240b5bb453a (patch)
tree0a9909e4ec84b82749d9b1b565b5e855c56d384a /lang
parentc78917a143552774c806a974f05ea3b0af83dcb2 (diff)
downloadpkgsrc-a38acd9fbd9f6f939f3007c58ac34240b5bb453a.tar.gz
python/tool.mk: Create linux-style python[2/3] wrappers automatically
Diffstat (limited to 'lang')
-rw-r--r--lang/python/tool.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/lang/python/tool.mk b/lang/python/tool.mk
index df406612c23..69024132397 100644
--- a/lang/python/tool.mk
+++ b/lang/python/tool.mk
@@ -1,9 +1,9 @@
-# $NetBSD: tool.mk,v 1.1 2011/10/14 08:55:54 obache Exp $
+# $NetBSD: tool.mk,v 1.2 2019/11/24 11:41:15 nia Exp $
#
# Create `python' interpreter wrapper for applicable Python bin.
#
# This mk fragment can be included in all packages that uses `python'
-# as a tool without version suffix.
+# as a tool without a pkgsrc-style version suffix.
#
# Keywords: python
#
@@ -19,11 +19,12 @@ BUILDLINK_TARGETS+= buildlink-bin-python
.PHONY: buildlink-bin-python
buildlink-bin-python:
+.for bin in python python${PYVERSSUFFIX:R}
${RUN} \
- f="${PYTHONBIN}"; \
- t="${BUILDLINK_DIR}/bin/python"; \
- if ${TEST} -f $$f -a ! -f $$t ; then \
- ${LN} -sf $$f $$t; \
+ t=${BUILDLINK_DIR}/bin/${bin}; \
+ if ${TEST} -f "${PYTHONBIN}" -a ! -f $$t; then \
+ ${LN} -sf "${PYTHONBIN}" $$t; \
fi
+.endfor
.endif # PYTHON_TOOL_MK