From c2934f34bffc7c9003deace0627ba30bd72a08af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 13 Sep 2021 11:50:31 -0300 Subject: [PATCH] avr-gdb: update to 11.1 and clean up. Also added build option for Guile. Co-authored-by: Evgeny Ermakov --- .../avr-gdb/patches/gdb-mips-linux-nat.patch | 11 +++ srcpkgs/avr-gdb/template | 79 +++++-------------- 2 files changed, 29 insertions(+), 61 deletions(-) create mode 100644 srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch diff --git a/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch new file mode 100644 index 00000000000..ec4e9c2666f --- /dev/null +++ b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch @@ -0,0 +1,11 @@ +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" diff --git a/srcpkgs/avr-gdb/template b/srcpkgs/avr-gdb/template index 73d9f9ac745..03a8e59405c 100644 --- a/srcpkgs/avr-gdb/template +++ b/srcpkgs/avr-gdb/template @@ -1,79 +1,36 @@ # Template file for 'avr-gdb' pkgname=avr-gdb -version=10.1 +version=11.1 revision=1 wrksrc=gdb-${version} build_style=gnu-configure -pycompile_dirs="/usr/share/gdb/python" -configure_args="\ - --target=avr \ - --program-prefix=avr- \ - --disable-werror \ - --disable-nls \ - --with-system-readline \ - --with-system-gdbinit=/etc/gdb/gdbinit \ - --with-system-zlib $(vopt_enable gdbserver) \ - $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static') \ - $(vopt_if python --with-python=/usr/bin/python3)" -hostmakedepends="texinfo perl $(vopt_if python python3-devel)" -makedepends="ncurses-devel zlib-devel readline-devel expat-devel - $(vopt_if python 'python3-devel gettext-devel')" -depends=gdb +configure_args="--target=avr --disable-werror --disable-nls --with-system-readline + --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib + $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)" +hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)" +makedepends="expat-devel ncurses-devel readline-devel zlib-devel gmp-devel + $(vopt_if guile guile-devel) $(vopt_if python 'gettext-devel python3-devel')" +depends="gdb-common" short_desc="GNU Debugger for AVR" maintainer="Artur Sinila " license="GPL-3.0-or-later" -homepage="https://www.gnu.org/software/gdb/" +homepage="https://www.gnu.org/software/gdb" distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz" -checksum=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 -python_version=3 +checksum=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 +make_check=no # See gdb/template. replaces="cross-avr-gdb>=0" +patch_args="-Np1" if [ "${CROSS_BUILD}" ]; then # Make python3.x detection work in cross builds - CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" - CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" + CPPFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" fi -CFLAGS+=" -fcommon" -CXXFLAGS+=" -fcommon" + # Package build options -build_options="gdbserver static python" -desc_option_gdbserver="Enable support for building GDB server" -# By default, don't enable any of build options -#build_options_default="gdbserver" -# Both options cannot be enabled at the same time -vopt_conflict gdbserver static - -post_extract() { - vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c - mkdir -p build -} - -do_configure() { - cd build - ../configure ${configure_args/with-sysroot/with-build-sysroot} \ - CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon" - export gl_cv_func_gettimeofday_clobber=no - export gl_cv_func_working_strerror=yes - export gl_cv_func_strerror_0_works=yes -} - -do_build() { - cd build - make ${makejobs} all -} - -do_install() { - cd build - make DESTDIR=${DESTDIR} ${makejobs} install - # resolve conflicts with binutils - rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib - rm -rf ${DESTDIR}/usr/lib64 - for f in bfd configure standards; do - rm -f ${DESTDIR}/usr/share/info/${f}.info* - done -} +build_options="guile python" +build_options_default="python" post_install() { - # resolve conflicts with binutils and native gdb - rm -fr usr/{share/{locale,gdb,info},include} + # resolve conflicts with gdb-common + rm -r ${DESTDIR}/usr/{share/{gdb,info},include} }