From 0be27b810757f1e8cf2945adcc6c87e2c22bc887 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Mon, 30 Dec 2019 14:25:02 +0100 Subject: [PATCH 1/2] gdb: enable python support --- packages/gdb/build.sh | 6 ++++-- packages/gdb/python.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 packages/gdb/python.patch diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index f1ce9a8bf..0bbb752b2 100644 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -2,20 +2,22 @@ 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_SUGGEST="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: diff --git a/packages/gdb/python.patch b/packages/gdb/python.patch new file mode 100644 index 000000000..241c75450 --- /dev/null +++ b/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 From a7663144c8e723f4c1e4d81ada6ef41d7b452e31 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Mon, 30 Dec 2019 21:36:22 +0100 Subject: [PATCH 2/2] Fix typo SUGGEST->SUGGESTS and add python as BUILD_DEPENDS --- packages/gdb/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index 0bbb752b2..08026e8c5 100644 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -6,7 +6,8 @@ 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_SUGGEST="python" +TERMUX_PKG_BUILD_DEPENDS="python" +TERMUX_PKG_SUGGESTS="python" TERMUX_PKG_BREAKS="gdb-dev" TERMUX_PKG_REPLACES="gdb-dev" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="