Date: Tuesday, August 17, 2010 @ 11:03:23 Author: allan Revision: 87672
upgpkg: gdb 7.1-3 -m Added: gdb/trunk/gdb-python-2.7.patch Modified: gdb/trunk/PKGBUILD ----------------------+ PKGBUILD | 24 ++++++++++++++++++------ gdb-python-2.7.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2010-08-17 14:53:17 UTC (rev 87671) +++ PKGBUILD 2010-08-17 15:03:23 UTC (rev 87672) @@ -4,31 +4,43 @@ pkgname=gdb pkgver=7.1 -pkgrel=2 +pkgrel=3 pkgdesc="The GNU Debugger" arch=('i686' 'x86_64') url="http://www.gnu.org/software/gdb/" license=('GPL3') -depends=('ncurses' 'expat' 'python') +depends=('ncurses' 'expat' 'python2') makedepends=('texinfo') backup=('etc/gdb/gdbinit') options=('!libtool') install=gdb.install source=(http://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.bz2 - tui-no-gdbarch.patch) + tui-no-gdbarch.patch + gdb-python-2.7.patch) md5sums=('21dce610476c054687b52770d2ddc657' - 'e2f3f6cb11d72e3727ed4f7c49ea395f') + 'e2f3f6cb11d72e3727ed4f7c49ea395f' + 'eae41a42d44edaf8bfd464e5b227583e') build() { cd ${srcdir}/${pkgname}-${pkgver} patch -Np1 -i $srcdir/tui-no-gdbarch.patch + # python-2.7 compatibility + patch -Np1 -i $srcdir/gdb-python-2.7.patch + + # ppl-0.11 compatibility + sed -i "/ppl_minor_version=/s#10#11#" configure + ./configure --prefix=/usr --disable-nls \ --with-system-readline \ --with-system-gdbinit=/etc/gdb/gdbinit - make || return 1 - make DESTDIR=${pkgdir} install || return 1 + make +} +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + # install "custom" system gdbinit install -dm755 $pkgdir/etc/gdb touch $pkgdir/etc/gdb/gdbinit Added: gdb-python-2.7.patch =================================================================== --- gdb-python-2.7.patch (rev 0) +++ gdb-python-2.7.patch 2010-08-17 15:03:23 UTC (rev 87672) @@ -0,0 +1,27 @@ +--- 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