Update e-mail for Kei Kebreau.
[jackhill/guix/guix.git] / gnu / packages / patches / weechat-python.patch
1 Get Python LDFLAGS from 'pkg-config'.
2
3 The other approach is more complex and gets it wrong: it returns
4 "-L/path/to/python/lib/python-2.7.10/lib/python2.7/config -lpython -lwhatever";
5 since that config/ sub-directory contains libpython2.7.a, we end up
6 statically linking Python in Weechat's python.so, which we do not want.
7
8 --- weechat-1.3/configure.ac 2015-08-16 08:27:07.000000000 +0200
9 +++ weechat-1.3/configure.ac 2015-11-29 18:18:52.975197048 +0100
10 @@ -535,29 +535,7 @@ if test "x$enable_python" = "xyes" ; the
11 if test -r "$PYTHON_INCLUDE/Python.h"; then
12 PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
13 AC_MSG_RESULT(found)
14 - PYTHON_LIB=`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBPL'))"`
15 - PYTHON_LFLAGS="-lpython$PYTHON_VERSION "`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBS')+' '+distutils.sysconfig.get_config_var('SYSLIBS')+' '+distutils.sysconfig.get_config_var('LINKFORSHARED'))"`
16 - AC_MSG_CHECKING(for Python library)
17 - if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
18 - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
19 - AC_MSG_RESULT(found)
20 - elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
21 - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
22 - AC_MSG_RESULT(found)
23 - elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.dll.a"; then
24 - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
25 - AC_MSG_RESULT(found)
26 - elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
27 - PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
28 - AC_MSG_RESULT(found)
29 - else
30 - AC_MSG_WARN([
31 -*** Python library couldn't be found on your system.
32 -*** Try to install it with your software package manager.
33 -*** WeeChat will be built without Python support.])
34 - enable_python="no"
35 - not_found="$not_found python"
36 - fi
37 + PYTHON_LFLAGS=`pkg-config python2 --libs`
38 else
39 AC_MSG_WARN([
40 *** Python header files couldn't be found on your system.