packages: python-libextractor/ac_python_devel.patch (NEW) - based on libope...

glen glen at pld-linux.org
Sat Jul 17 22:56:42 CEST 2010


Author: glen                         Date: Sat Jul 17 20:56:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- based on libopensync/libopensync-py-m4.patch (r1.4)

---- Files affected:
packages/python-libextractor:
   ac_python_devel.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/python-libextractor/ac_python_devel.patch
diff -u /dev/null packages/python-libextractor/ac_python_devel.patch:1.1
--- /dev/null	Sat Jul 17 22:56:42 2010
+++ packages/python-libextractor/ac_python_devel.patch	Sat Jul 17 22:56:37 2010
@@ -0,0 +1,63 @@
+--- libextractor-python-0.5.4/m4/ac_python_devel.m4~	2005-08-04 01:13:40.000000000 +0300
++++ libextractor-python-0.5.4/m4/ac_python_devel.m4	2010-07-17 23:54:23.115990476 +0300
+@@ -9,46 +9,31 @@
+ 
+ 	# Check for Python include path
+ 	AC_MSG_CHECKING([for Python include path])
+-	python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+-	for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
+-		python_path=`find $i -type f -name Python.h -print | sed "1q"`
+-		if test -n "$python_path" ; then
+-			break
+-		fi
+-	done
+-	python_path=`echo $python_path | sed "s,/Python.h$,,"`
+-	AC_MSG_RESULT([$python_path])
+-	if test -z "$python_path" ; then
++	python_includes=`python-config --includes`
++	AC_MSG_RESULT([$python_includes])
++	if test -z "$python_includes" ; then
+ 		AC_MSG_WARN([cannot find Python include path])
+ 	else
+-	AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
++	AC_SUBST([PYTHON_CPPFLAGS],[-I$python_includes])
+ 
+ 	# Check for Python library path
+ 	AC_MSG_CHECKING([for Python library path])
+-	python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+-	for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
+-		python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
+-		if test -n "$python_path" ; then
+-			break
+-		fi
+-	done
+-	python_path=`echo $python_path | sed "s,/libpython.*$,,"`
+-	AC_MSG_RESULT([$python_path])
+-	if test -z "$python_path" ; then
++	python_ldflags=`python-config --ldflags`
++	AC_MSG_RESULT([$python_ldflags])
++	if test -z "$python_ldflags" ; then
+ 		AC_MSG_ERROR([cannot find Python library path])
+ 	fi
+-	AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
+-	#
+-	python_site=`echo $python_path | sed "s/config/site-packages/"`
++	AC_SUBST([PYTHON_LDFLAGS],[$python_ldflags])
++
++	# unused here
++	python_site=""
+ 	AC_SUBST([PYTHON_SITE_PKG],[$python_site])
+ 	#
+ 	# libraries which must be linked in when embedding
+ 	#
+-	AC_MSG_CHECKING(python extra libraries)
+-	PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+-                conf = distutils.sysconfig.get_config_var; \
+-                print conf('LOCALMODLIBS')+' '+conf('LIBS')"
+-	AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
++	# same as ldflags, but unused here
++	PYTHON_EXTRA_LIBS="$python_ldflags"
++	AC_MSG_RESULT($PYTHON_EXTRA_LIBS)
+ 	AC_SUBST(PYTHON_EXTRA_LIBS)
+ 	fi
+ ])
================================================================


More information about the pld-cvs-commit mailing list