--- /dev/null
+--- gdb-7.0/gdb/configure.ac~ 2010-07-08 14:54:43.770583270 +0200
++++ gdb-7.0/gdb/configure.ac 2010-07-08 14:56:17.539947910 +0200
+@@ -881,6 +881,12 @@
+ LIBS="$LIBS ${python_libs}"
+ have_libpython=no
+ if test "${have_libpython}" = no; then
++ AC_TRY_LIBPYTHON(python2.7, have_libpython)
++ if test "${HAVE_LIBPYTHON2_7}" = yes; then
++ AC_DEFINE(HAVE_LIBPYTHON2_7, 1, [Define if Python 2.7 is being used.])
++ fi
++ fi
++ if test "${have_libpython}" = no; then
+ AC_TRY_LIBPYTHON(python2.6, have_libpython)
+ if test "${HAVE_LIBPYTHON2_6}" = yes; then
+ AC_DEFINE(HAVE_LIBPYTHON2_6, 1, [Define if Python 2.6 is being used.])
+--- gdb-7.0/gdb/python/python-internal.h~ 2010-07-08 14:54:43.136858331 +0200
++++ gdb-7.0/gdb/python/python-internal.h 2010-07-08 14:56:56.739736159 +0200
+@@ -45,6 +45,9 @@
+ #elif HAVE_LIBPYTHON2_6
+ #include "python2.6/Python.h"
+ #include "python2.6/frameobject.h"
++#elif HAVE_LIBPYTHON2_7
++#include "python2.7/Python.h"
++#include "python2.7/frameobject.h"
+ #else
+ #error "Unable to find usable Python.h"
+ #endif
Summary(zh_TW.UTF-8): [.-A開發]C和.$)B其.-A他語.$)B言的調試器
Name: gdb
Version: 7.0
-Release: 5
+Release: 6
License: GPL v3+
Group: Development/Debuggers
Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.bz2
Patch1002: %{name}-passflags.patch
Patch1005: %{name}-pretty-print-by-default.patch
Patch1006: buildid-locate-rpm-pld.patch
+Patch1007: %{name}-python.patch
URL: http://www.gnu.org/software/gdb/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
%patch1002 -p1
%patch1005 -p1
%patch1006 -p1
+%patch1007 -p1
mv $(basename %{SOURCE4} .tar.bz2) libstdcxxpython
PLD Linux (%{version}-%{release})
EOF
+sed -i -e 's#_GCC_AUTOCONF_VERSION\], \[2\.64\]#_GCC_AUTOCONF_VERSION], [2.65]#g' config/override.m4
+
%build
-for dir in $(find gdb -name 'configure.in'); do
+for dir in $(find gdb -name 'configure.in' -o -name 'configure.ac'); do
dir=$(dirname "$dir")
olddir=$(pwd)
cd $dir
rm -f aclocal.m4
%{__aclocal}
%{__autoconf}
- %{__autoheader}
+ grep -q AC_CONFIG_HEADER configure.* && %{__autoheader}
cd $olddir
done
cp -f /usr/share/automake/config.* .