Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/geos/files: 3.2.0-python.patch
Date: Sun, 27 Jun 2010 18:28:07
Message-Id: 20100627182803.7A7012CF96@corvid.gentoo.org
1 jlec 10/06/27 18:28:03
2
3 Added: 3.2.0-python.patch
4 Log:
5 More inteligent search in configure for python stuff
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-libs/geos/files/3.2.0-python.patch
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/geos/files/3.2.0-python.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/geos/files/3.2.0-python.patch?rev=1.1&content-type=text/plain
13
14 Index: 3.2.0-python.patch
15 ===================================================================
16 diff --git a/macros/ac_python_devel.m4 b/macros/ac_python_devel.m4
17 index d67842b..f3a3a3b 100644
18 --- a/macros/ac_python_devel.m4
19 +++ b/macros/ac_python_devel.m4
20 @@ -29,13 +29,10 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
21
22 # Check for Python include path
23 AC_MSG_CHECKING([for Python include path])
24 - for i in "$base_python_path/include/python$PYTHON_VERSION/" "$base_python_path/include/python/" "$base_python_path/include/" "$base_python_path/" ; do
25 - python_path=`find $i -type f -name Python.h -print 2> /dev/null | sed "1q"`
26 - if test -n "$python_path" ; then
27 - break
28 - fi
29 - done
30 - python_path=`echo $python_path | sed "s,/Python.h$,,"`
31 + python_path="${base_python_path}/include/python$PYTHON_VERSION/"
32 + if test ! -f "${python_path}"/Python.h ; then
33 + python_path=""
34 + fi
35 AC_MSG_RESULT([$python_path])
36 if test -z "$python_path" ; then
37 AC_MSG_ERROR([cannot find Python include path])
38 @@ -44,13 +41,10 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
39
40 # Check for Python library path
41 AC_MSG_CHECKING([for Python library path])
42 - for i in "$base_python_path/lib/python$PYTHON_VERSION/config/" "$base_python_path/lib/python$PYTHON_VERSION/" "$base_python_path/lib/python/config/" "$base_python_path/lib/python/" "$base_python_path/" "$base_python_path/libs/" ; do
43 - python_path=`find $i -name libpython$PYTHON_VERSION.* -print 2> /dev/null | sed "1q"`
44 - if test -n "$python_path" ; then
45 - break
46 - fi
47 - done
48 - python_path=`echo $python_path | sed "s,/libpython.*$,,"`
49 + python_path=`python$PYTHON_VERSION -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_var("LIBDIR"))'`
50 + if test ! -f "${python_path}"/libpython$PYTHON_VERSION.so ; then
51 + python_path=""
52 + fi
53 AC_MSG_RESULT([$python_path])
54 if test -z "$python_path" ; then
55 AC_MSG_ERROR([cannot find Python library path])