Browse Source

Merge pull request #4718 from termux/gdb-python

gdb: enable python support
build-on-device
Henrik Grimler 5 years ago
committed by GitHub
parent
commit
92fc9a7303
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/gdb/build.sh
  2. 27
      packages/gdb/python.patch

7
packages/gdb/build.sh

@ -2,20 +2,23 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gdb/
TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=8.3.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
TERMUX_PKG_DEPENDS="libc++, liblzma, libexpat, readline, ncurses, libmpfr, zlib"
TERMUX_PKG_BUILD_DEPENDS="python"
TERMUX_PKG_SUGGESTS="python"
TERMUX_PKG_BREAKS="gdb-dev"
TERMUX_PKG_REPLACES="gdb-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-system-readline
--with-curses
--with-python=$TERMUX_PREFIX/bin/python
ac_cv_func_getpwent=no
ac_cv_func_getpwnam=no
"
TERMUX_PKG_RM_AFTER_INSTALL="share/gdb/python share/gdb/syscalls share/gdb/system-gdbinit"
TERMUX_PKG_RM_AFTER_INSTALL="share/gdb/syscalls share/gdb/system-gdbinit"
TERMUX_PKG_MAKE_INSTALL_TARGET="-C gdb install"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
# Fix "undefined reference to 'rpl_gettimeofday'" when building:

27
packages/gdb/python.patch

@ -0,0 +1,27 @@
--- ../gdb-configure.orig 2019-12-30 14:01:28.446832655 +0100
+++ ./gdb/configure 2019-12-30 14:02:57.909984715 +0100
@@ -10485,21 +10485,21 @@
# We have a python program to use, but it may be too old.
# Don't flag an error for --with-python=auto (the default).
have_python_config=yes
- python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
+ python_includes=`@TERMUX_PREFIX@/bin/python-config --includes`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
as_fn_error $? "failure running python-config --includes" "$LINENO" 5
fi
fi
- python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
+ python_libs=`@TERMUX_PREFIX@/bin/python-config --ldflags`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
fi
fi
- python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
+ python_prefix=`@TERMUX_PREFIX@/bin/python-config --exec-prefix`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
Loading…
Cancel
Save