irc/weechat*: cmake/Find(Python|Ruby|etc).cmake don't respect
version from bsd.(python|ruby|etc).mk
Anonymous
swell.k at gmail.com
Thu Oct 7 02:46:47 UTC 2010
The port blindly assumes the first version of python|ruby|etc it finds
as the one user wants weechat plugin built against. Example for python
$ export PYTHON_DEFAULT_VERSION=python2.7
$ make install deinstall WITH_PYTHON=
...
===> Deinstalling weechat-0.3.3_1
pkg_delete: file '/usr/local/lib/weechat/plugins/python.so' doesn't exist
And excerpt from CMakeCache.txt
//Path to a program.
PYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python
//Path to a file.
PYTHON_INCLUDE_PATH:PATH=/usr/local/include/python2.5
//Path to a library.
PYTHON_LIBRARY:FILEPATH=/usr/local/lib/libpython2.6.so
//Dependencies for the target
python_LIB_DEPENDS:STATIC=general;/usr/local/lib/libpython2.6.so;general;weechat_scripts;
I guess FindPython.cmake doesn't respect LOCALBASE, too.
%%
Index: irc/weechat/Makefile
===================================================================
RCS file: /a/.cvsup/ports/irc/weechat/Makefile,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile
--- irc/weechat/Makefile 30 Sep 2010 04:14:36 -0000 1.49
+++ irc/weechat/Makefile 7 Oct 2010 02:44:32 -0000
@@ -64,6 +64,8 @@ PLIST_SUB+= ASPELL="@comment "
.if defined(WITH_PYTHON)
USE_PYTHON= yes
+CMAKE_ARGS+= -DPYTHON_VERSION=${PYTHON_VERSION} \
+ -DPYTHON_CMD=${PYTHON_CMD}
PLIST_SUB+= PYTHON=""
.else
CMAKE_ARGS+= -DDISABLE_PYTHON=yes
Index: irc/weechat/files/patch-cmake-FindPython.cmake
===================================================================
RCS file: irc/weechat/files/patch-cmake-FindPython.cmake
diff -N irc/weechat/files/patch-cmake-FindPython.cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ irc/weechat/files/patch-cmake-FindPython.cmake 7 Oct 2010 01:59:44 -0000
@@ -0,0 +1,21 @@
+--- cmake/FindPython.cmake~ 2010-09-28 13:09:52.000000000 +0400
++++ cmake/FindPython.cmake 2010-10-07 05:37:43.709648725 +0400
+@@ -34,8 +34,7 @@ IF(PYTHON_FOUND)
+ ENDIF(PYTHON_FOUND)
+
+ FIND_PROGRAM(PYTHON_EXECUTABLE
+- NAMES python python2.6 python2.5 python2.4 python2.3 python2.2
+- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
++ NAMES ${PYTHON_CMD}
+ )
+
+ IF(PYTHON_EXECUTABLE)
+@@ -65,7 +64,7 @@ IF(PYTHON_EXECUTABLE)
+ )
+
+ FIND_LIBRARY(PYTHON_LIBRARY
+- NAMES python python2.6 python2.5 python2.4 python2.3 python2.2
++ NAMES ${PYTHON_VERSION}
+ PATHS ${PYTHON_POSSIBLE_LIB_PATH}
+ )
+
%%
More information about the freebsd-ports
mailing list