Fri Oct 19 16:12:36 2018 UTC ()
Always give full interpreter path to cmake.

This was previously Darwin-only but I ran into the same situation when
building finance/gnucash on NetBSD. /usr/pkg/bin/python happened to be
2.7, but it was used instead of python3.7, leading to a build failure.
This commit fixes that.


(bsiegert)
diff -r1.125 -r1.126 pkgsrc/lang/python/pyversion.mk

cvs diff -r1.125 -r1.126 pkgsrc/lang/python/pyversion.mk (expand / switch to unified diff)

--- pkgsrc/lang/python/pyversion.mk 2018/10/07 23:56:23 1.125
+++ pkgsrc/lang/python/pyversion.mk 2018/10/19 16:12:36 1.126
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: pyversion.mk,v 1.125 2018/10/07 23:56:23 ryoon Exp $ 1# $NetBSD: pyversion.mk,v 1.126 2018/10/19 16:12:36 bsiegert Exp $
2 2
3# This file determines which Python version is used as a dependency for 3# This file determines which Python version is used as a dependency for
4# a package. 4# a package.
5# 5#
6# === User-settable variables === 6# === User-settable variables ===
7# 7#
8# PYTHON_VERSION_DEFAULT 8# PYTHON_VERSION_DEFAULT
9# The preferred Python version to use. 9# The preferred Python version to use.
10# 10#
11# Possible values: 27 34 35 36 37 11# Possible values: 27 34 35 36 37
12# Default: 27 12# Default: 27
13# 13#
14# === Infrastructure variables === 14# === Infrastructure variables ===
@@ -193,19 +193,20 @@ PYSITELIB!= ${PYTHONBIN} -c "import dist @@ -193,19 +193,20 @@ PYSITELIB!= ${PYTHONBIN} -c "import dist
193PRINT_PLIST_AWK+= /^${PYINC:S|/|\\/|g}/ \ 193PRINT_PLIST_AWK+= /^${PYINC:S|/|\\/|g}/ \
194 { gsub(/${PYINC:S|/|\\/|g}/, "$${PYINC}") } 194 { gsub(/${PYINC:S|/|\\/|g}/, "$${PYINC}") }
195PRINT_PLIST_AWK+= /^${PYSITELIB:S|/|\\/|g}/ \ 195PRINT_PLIST_AWK+= /^${PYSITELIB:S|/|\\/|g}/ \
196 { gsub(/${PYSITELIB:S|/|\\/|g}/, "$${PYSITELIB}") } 196 { gsub(/${PYSITELIB:S|/|\\/|g}/, "$${PYSITELIB}") }
197PRINT_PLIST_AWK+= /^${PYLIB:S|/|\\/|g}/ \ 197PRINT_PLIST_AWK+= /^${PYLIB:S|/|\\/|g}/ \
198 { gsub(/${PYLIB:S|/|\\/|g}/, "$${PYLIB}") } 198 { gsub(/${PYLIB:S|/|\\/|g}/, "$${PYLIB}") }
199.endif 199.endif
200 200
201ALL_ENV+= PYTHON=${PYTHONBIN} 201ALL_ENV+= PYTHON=${PYTHONBIN}
202.if defined(USE_CMAKE) 202.if defined(USE_CMAKE)
203# used by FindPythonInterp.cmake and FindPythonLibs.cmake 203# used by FindPythonInterp.cmake and FindPythonLibs.cmake
204CMAKE_ARGS+= -DPYVERSSUFFIX:STRING=${PYVERSSUFFIX} 204CMAKE_ARGS+= -DPYVERSSUFFIX:STRING=${PYVERSSUFFIX}
205# set this explicitly, as by default it will prefer the built in framework 205# set this explicitly, as by default it will prefer the built in framework
206CMAKE_ARGS.Darwin+= -DPYTHON_INCLUDE_DIR:PATH=${BUILDLINK_DIR}/${PYINC} 206# on Darwin
207CMAKE_ARGS.Darwin+= -DPYTHON_INCLUDE_PATH:PATH=${BUILDLINK_DIR}/${PYINC} 207CMAKE_ARGS+= -DPYTHON_INCLUDE_DIR:PATH=${BUILDLINK_DIR}/${PYINC}
208CMAKE_ARGS.Darwin+= -DPYTHON_EXECUTABLE:FILEPATH=${PYTHONBIN} 208CMAKE_ARGS+= -DPYTHON_INCLUDE_PATH:PATH=${BUILDLINK_DIR}/${PYINC}
 209CMAKE_ARGS+= -DPYTHON_EXECUTABLE:FILEPATH=${PYTHONBIN}
209.endif 210.endif
210 211
211.endif # PYTHON_PYVERSION_MK 212.endif # PYTHON_PYVERSION_MK