allow to override cmake's Python search order, to enforce the version
selected by pkgsrc this automatically affects pkgs which use FIND_PACKAGE(PythonInterp) or FIND_PACKAGE(PythonLibs)
This commit is contained in:
parent
194cac4ec9
commit
d202e4278e
5 changed files with 54 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.47 2010/01/17 12:02:12 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.48 2010/02/12 13:45:54 drochner Exp $
|
||||
|
||||
DISTNAME= cmake-${CMAKE_API}.0
|
||||
PKGREVISION= 1
|
||||
PKGREVISION= 2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.cmake.org/files/v2.8/
|
||||
|
||||
|
@ -39,6 +39,9 @@ SUBST_MESSAGE.cmake= Fixing X11 prefix.
|
|||
SUBST_FILES.cmake+= Modules/Platform/UnixPaths.cmake
|
||||
SUBST_VARS.cmake= X11BASE
|
||||
|
||||
post-patch:
|
||||
${RM} ${WRKSRC}/Modules/*.orig
|
||||
|
||||
.include "../../devel/ncurses/buildlink3.mk"
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../textproc/xmlrpc-c/buildlink3.mk"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.21 2009/11/25 19:08:18 adam Exp $
|
||||
$NetBSD: distinfo,v 1.22 2010/02/12 13:45:54 drochner Exp $
|
||||
|
||||
SHA1 (cmake-2.8.0.tar.gz) = c35cb0d787c53aee768b154f05b68d3a20eccb3d
|
||||
RMD160 (cmake-2.8.0.tar.gz) = 27e80a14b4970d85b12aaf18fbe738c02dc0620f
|
||||
Size (cmake-2.8.0.tar.gz) = 3553247 bytes
|
||||
SHA1 (patch-aa) = b093f4992a7fea099d7c26a90b150ac0d057067a
|
||||
SHA1 (patch-ab) = f7372942f7e28b01c26794ce1a94914b68d1b24e
|
||||
SHA1 (patch-ac) = e5127b9e28375528e977898c59cb6b5044d76ebe
|
||||
|
|
21
devel/cmake/patches/patch-ab
Normal file
21
devel/cmake/patches/patch-ab
Normal file
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-ab,v 1.8 2010/02/12 13:45:54 drochner Exp $
|
||||
|
||||
--- Modules/FindPythonInterp.cmake.orig 2009-11-13 18:32:52.000000000 +0000
|
||||
+++ Modules/FindPythonInterp.cmake
|
||||
@@ -19,8 +19,15 @@
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
+# for pkgsrc: force Python version (set in pyversion.mk)
|
||||
+IF(DEFINED PYVERSSUFFIX)
|
||||
+ SET(_VERSIONS python${PYVERSSUFFIX})
|
||||
+ELSE(DEFINED PYVERSSUFFIX)
|
||||
+ SET(_VERSIONS python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python)
|
||||
+ENDIF(DEFINED PYVERSSUFFIX)
|
||||
+
|
||||
FIND_PROGRAM(PYTHON_EXECUTABLE
|
||||
- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
|
||||
+ NAMES ${_VERSIONS}
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
20
devel/cmake/patches/patch-ac
Normal file
20
devel/cmake/patches/patch-ac
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-ac,v 1.4 2010/02/12 13:45:54 drochner Exp $
|
||||
|
||||
--- Modules/FindPythonLibs.cmake.orig 2009-11-13 18:32:52.000000000 +0000
|
||||
+++ Modules/FindPythonLibs.cmake
|
||||
@@ -27,7 +27,14 @@ INCLUDE(CMakeFindFrameworks)
|
||||
# Search for the python framework on Apple.
|
||||
CMAKE_FIND_FRAMEWORKS(Python)
|
||||
|
||||
-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
||||
+# for pkgsrc: force Python version (set in pyversion.mk)
|
||||
+IF(DEFINED PYVERSSUFFIX)
|
||||
+ SET(_VERSIONS ${PYVERSSUFFIX})
|
||||
+ELSE(DEFINED PYVERSSUFFIX)
|
||||
+ SET(_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
||||
+ENDIF(DEFINED PYVERSSUFFIX)
|
||||
+
|
||||
+FOREACH(_CURRENT_VERSION ${_VERSIONS})
|
||||
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
|
||||
IF(WIN32)
|
||||
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: pyversion.mk,v 1.79 2010/02/10 19:16:48 joerg Exp $
|
||||
# $NetBSD: pyversion.mk,v 1.80 2010/02/12 13:45:54 drochner Exp $
|
||||
|
||||
# This file determines which Python version is used as a dependency for
|
||||
# a package.
|
||||
|
@ -175,5 +175,9 @@ PRINT_PLIST_AWK+= /^${PYLIB:S|/|\\/|g}/ \
|
|||
.endif
|
||||
|
||||
ALL_ENV+= PYTHON=${PYTHONBIN}
|
||||
.if defined(USE_CMAKE)
|
||||
# used by FindPythonInterp.cmake and FindPythonLibs.cmake
|
||||
CMAKE_ARGS+= -DPYVERSSUFFIX:STRING=${PYVERSSUFFIX}
|
||||
.endif
|
||||
|
||||
.endif # PYTHON_PYVERSION_MK
|
||||
|
|
Loading…
Reference in a new issue