[Pkg-libvirt-commits] [libguestfs] 05/06: Added fix for recognizing the correct libpython

Hilko Bengen bengen at moszumanska.debian.org
Sun Dec 22 18:13:54 UTC 2013


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.15.11-1
in repository libguestfs.

commit c88c9e951af140e020375a082fffdc67b1630164
Author: Hilko Bengen <bengen at debian.org>
Date:   Sun Dec 11 19:06:47 2011 +0100

    Added fix for recognizing the correct libpython
---
 ...-for-libpython-squeeze-s-python3.1-does-n.patch |  46 ++++++
 ...0013-autoreconf.patch => 0014-autoreconf.patch} | 174 +++++++++++++++++++--
 debian/patches/series                              |   3 +-
 3 files changed, 208 insertions(+), 15 deletions(-)

diff --git a/debian/patches/0013-Fixed-check-for-libpython-squeeze-s-python3.1-does-n.patch b/debian/patches/0013-Fixed-check-for-libpython-squeeze-s-python3.1-does-n.patch
new file mode 100644
index 0000000..1c6a0f2
--- /dev/null
+++ b/debian/patches/0013-Fixed-check-for-libpython-squeeze-s-python3.1-does-n.patch
@@ -0,0 +1,46 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Fri, 9 Dec 2011 10:39:26 +0100
+Subject: Fixed check for libpython -- squeeze's python3.1 does not have the
+ 'mu' suffix
+
+---
+ configure.ac |   23 ++++++++++++-----------
+ 1 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 91d08d5..5a89d74 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -739,19 +739,20 @@ AS_IF([test "x$enable_python" != "xno"],
+                 AC_MSG_RESULT([$PYTHON_INSTALLDIR])
+             fi
+ 
+-            dnl Look for libpython and some optional symbols in it.
++            dnl Look for some optional symbols in libpython.
+             old_LIBS="$LIBS"
+-            if test "x$PYTHON_VERSION_MAJOR" = "x3"; then
+-                dnl libpython3 is called "libpython3.Xmu.so"
+-                LIBPYTHON="python${PYTHON_VERSION}mu"
+-            else
+-                LIBPYTHON="python$PYTHON_VERSION"
+-            fi
+-            AC_CHECK_LIB([$LIBPYTHON], [PyList_Size], [],
+-                         [AC_MSG_FAILURE([$LIBPYTHON is not installed])])
+ 
+-            AC_CHECK_FUNCS([PyCapsule_New \
+-                            PyString_AsString])
++            PYTHON_BLDLIBRARY=`$PYTHON -c "import distutils.sysconfig; \
++                                           print (distutils.sysconfig.get_config_var('BLDLIBRARY'))"`
++            AC_CHECK_LIB([c],[PyCapsule_New],
++                         [AC_DEFINE([HAVE_PYCAPSULE_NEW],1,
++                                    [Found PyCapsule_New in libpython])],
++                         [],[$PYTHON_BLDLIBRARY])
++            AC_CHECK_LIB([c],[PyString_AsString],
++                         [AC_DEFINE([HAVE_PYSTRING_ASSTRING],1,
++                                    [Found PyString_AsString in libpython])],
++                         [],[$PYTHON_BLDLIBRARY])
++
+             LIBS="$old_LIBS"
+         fi
+ 
+-- 
diff --git a/debian/patches/0013-autoreconf.patch b/debian/patches/0014-autoreconf.patch
similarity index 87%
rename from debian/patches/0013-autoreconf.patch
rename to debian/patches/0014-autoreconf.patch
index 0b47859..abb4646 100644
--- a/debian/patches/0013-autoreconf.patch
+++ b/debian/patches/0014-autoreconf.patch
@@ -3,26 +3,27 @@ Date: Sat, 20 Aug 2011 20:43:22 +0200
 Subject: autoreconf
 
 ---
- Makefile.in          |   50 ++++++++++++-------------
- aclocal.m4           |   14 ++++---
+ Makefile.in          |   50 +++++++-------
+ aclocal.m4           |   14 ++--
  cat/Makefile.in      |    2 +-
  clone/Makefile.in    |    2 +-
- configure            |   97 ++++++++++++++++++++++++++++---------------------
+ config.h.in          |    4 +-
+ configure            |  186 +++++++++++++++++++++++++++++---------------------
  daemon/Makefile.in   |    4 +-
  df/Makefile.in       |    2 +-
  edit/Makefile.in     |    2 +-
  fuse/Makefile.in     |    2 +-
  haskell/Makefile.in  |    3 +-
  images/Makefile.in   |    2 +-
- java/Makefile.in     |    5 ++-
- ocaml/Makefile.in    |   19 +++++-----
- perl/Makefile.in     |    8 +++-
+ java/Makefile.in     |    5 +-
+ ocaml/Makefile.in    |   19 +++---
+ perl/Makefile.in     |    8 ++-
  python/Makefile.in   |    3 +-
- resize/Makefile.in   |    7 ++--
- ruby/Makefile.in     |   12 +++---
- sparsify/Makefile.in |    8 ++--
- tools/Makefile.in    |    6 ++--
- 19 files changed, 134 insertions(+), 114 deletions(-)
+ resize/Makefile.in   |    7 +-
+ ruby/Makefile.in     |   12 ++--
+ sparsify/Makefile.in |    8 +-
+ tools/Makefile.in    |    6 +-
+ 20 files changed, 189 insertions(+), 152 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
 index c40c362..3fd9268 100644
@@ -212,8 +213,25 @@ index 5c3f5b3..2fcacf4 100644
  all: all-am
  
  .SUFFIXES:
+diff --git a/config.h.in b/config.h.in
+index dae6bce..1e5b162 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -889,10 +889,10 @@
+ /* Define if the POSIX multithreading library has read/write locks. */
+ #undef HAVE_PTHREAD_RWLOCK
+ 
+-/* Define to 1 if you have the `PyCapsule_New' function. */
++/* Found PyCapsule_New in libpython */
+ #undef HAVE_PYCAPSULE_NEW
+ 
+-/* Define to 1 if you have the `PyString_AsString' function. */
++/* Found PyString_AsString in libpython */
+ #undef HAVE_PYSTRING_ASSTRING
+ 
+ /* Define to 1 if you have the `raise' function. */
 diff --git a/configure b/configure
-index f948dd0..25be5db 100755
+index f948dd0..5e625a4 100755
 --- a/configure
 +++ b/configure
 @@ -45148,7 +45148,10 @@ else
@@ -528,7 +546,135 @@ index f948dd0..25be5db 100755
          fi
  	# Put the nasty error message in config.log where it belongs
  	echo "$FUSE_PKG_ERRORS" >&5
-@@ -51202,7 +51216,7 @@ ac_config_files="$ac_config_files podwrapper.sh"
+@@ -50019,19 +50033,16 @@ $as_echo "$PYTHON_INSTALLDIR" >&6; }
+             fi
+ 
+                         old_LIBS="$LIBS"
+-            if test "x$PYTHON_VERSION_MAJOR" = "x3"; then
+-                                LIBPYTHON="python${PYTHON_VERSION}mu"
+-            else
+-                LIBPYTHON="python$PYTHON_VERSION"
+-            fi
+-            as_ac_Lib=`$as_echo "ac_cv_lib_$LIBPYTHON''_PyList_Size" | $as_tr_sh`
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PyList_Size in -l$LIBPYTHON" >&5
+-$as_echo_n "checking for PyList_Size in -l$LIBPYTHON... " >&6; }
+-if eval \${$as_ac_Lib+:} false; then :
++
++            PYTHON_BLDLIBRARY=`$PYTHON -c "import distutils.sysconfig; \
++                                           print (distutils.sysconfig.get_config_var('BLDLIBRARY'))"`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PyCapsule_New in -lc" >&5
++$as_echo_n "checking for PyCapsule_New in -lc... " >&6; }
++if ${ac_cv_lib_c_PyCapsule_New+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-l$LIBPYTHON  $LIBS"
++LIBS="-lc $PYTHON_BLDLIBRARY $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -50041,54 +50052,74 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char PyList_Size ();
++char PyCapsule_New ();
+ int
+ main ()
+ {
+-return PyList_Size ();
++return PyCapsule_New ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+-  eval "$as_ac_Lib=yes"
++  ac_cv_lib_c_PyCapsule_New=yes
+ else
+-  eval "$as_ac_Lib=no"
++  ac_cv_lib_c_PyCapsule_New=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-eval ac_res=\$$as_ac_Lib
+-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_LIB$LIBPYTHON" | $as_tr_cpp` 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_PyCapsule_New" >&5
++$as_echo "$ac_cv_lib_c_PyCapsule_New" >&6; }
++if test "x$ac_cv_lib_c_PyCapsule_New" = xyes; then :
+ 
+-  LIBS="-l$LIBPYTHON $LIBS"
++$as_echo "#define HAVE_PYCAPSULE_NEW 1" >>confdefs.h
+ 
+-else
+-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "$LIBPYTHON is not installed
+-See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ 
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PyString_AsString in -lc" >&5
++$as_echo_n "checking for PyString_AsString in -lc... " >&6; }
++if ${ac_cv_lib_c_PyString_AsString+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lc $PYTHON_BLDLIBRARY $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-            for ac_func in PyCapsule_New \
+-                            PyString_AsString
+-do :
+-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char PyString_AsString ();
++int
++main ()
++{
++return PyString_AsString ();
++  ;
++  return 0;
++}
+ _ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_c_PyString_AsString=yes
++else
++  ac_cv_lib_c_PyString_AsString=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_PyString_AsString" >&5
++$as_echo "$ac_cv_lib_c_PyString_AsString" >&6; }
++if test "x$ac_cv_lib_c_PyString_AsString" = xyes; then :
++
++$as_echo "#define HAVE_PYSTRING_ASSTRING 1" >>confdefs.h
+ 
+ fi
+-done
++
+ 
+             LIBS="$old_LIBS"
+         fi
+@@ -51202,7 +51233,7 @@ ac_config_files="$ac_config_files podwrapper.sh"
  
  ac_config_files="$ac_config_files run"
  
@@ -537,7 +683,7 @@ index f948dd0..25be5db 100755
  
  cat >confcache <<\_ACEOF
  # This file is a shell script that caches the results of configure
-@@ -52416,7 +52430,6 @@ do
+@@ -52416,7 +52447,6 @@ do
      "clone/Makefile") CONFIG_FILES="$CONFIG_FILES clone/Makefile" ;;
      "csharp/Makefile") CONFIG_FILES="$CONFIG_FILES csharp/Makefile" ;;
      "daemon/Makefile") CONFIG_FILES="$CONFIG_FILES daemon/Makefile" ;;
diff --git a/debian/patches/series b/debian/patches/series
index 90217d5..8e4665e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,5 @@
 0010-Fix-include.patch
 0011-Install-Java-bindings-to-jni-subdirectory.patch
 0012-ruby-install-to-vendor_ruby.patch
-0013-autoreconf.patch
+0013-Fixed-check-for-libpython-squeeze-s-python3.1-does-n.patch
+0014-autoreconf.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list