aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2015-06-10 17:23:54 +0800
committermakc <makc@FreeBSD.org>2015-06-10 17:23:54 +0800
commit588bf47e7db11077a70e3eecd3b731b228785798 (patch)
tree589e6667720dca5d19518df6e15a48c7a5eb8ad8 /Mk/Uses
parent93be54f2809c478f224b550c6dcf40bf37d2f74d (diff)
downloadfreebsd-ports-gnome-588bf47e7db11077a70e3eecd3b731b228785798.tar.gz
freebsd-ports-gnome-588bf47e7db11077a70e3eecd3b731b228785798.tar.zst
freebsd-ports-gnome-588bf47e7db11077a70e3eecd3b731b228785798.zip
Pass the default Python version (or the version required by port)
for CMake based ports. By default CMake picks up the highest available version of Python package, therefore ports which use CMake may fail to build or link to different Python library than one could expect (e.g. bugs 199685, 200518). In essence this commit reverts r366996. PR: 168159 Exp-run by: antoine Approved by: mva
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/python.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 714bee4480f7..e960e5055e80 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -521,6 +521,10 @@ add-plist-post:
# Fix for programs that build python from a GNU auto* environment
CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}"
+# By default CMake picks up the highest available version of Python package.
+# Enforce the version required by the port or the default.
+CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER}
+
# Python 3rd-party modules
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:${PORTSDIR}/devel/py-game
PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:${PORTSDIR}/math/py-numeric