Updating the devel/gdb port to 7.6.2 Moreover, it adds the support to librt.so signals: now gdb recognizes and correctly handles the SIGLIBRT signal. Moreover, it changes the default value of the separate debug dir to /usr/lib/debug, the directory where FreeBSD stores separated debug files (thanks Andriy Gapon) Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->nemysis I'll take it.
This is an updated/cleaner version of the patch Thanks to nemysis@ for all precious tips and help!
State Changed From-To: open->closed Committed. Thanks!
Author: nemysis Date: Thu Jan 23 23:48:53 2014 New Revision: 340871 URL: http://svnweb.freebsd.org/changeset/ports/340871 QAT: https://qat.redports.org/buildarchive/r340871/ Log: - Update to 7.6.2 - Change CONFIGURE_ARGS - Reordering Options - Use the new format for LIB_DEPENDS - Break lines around 80 characters PR: ports/184796 Submitted by: Luca Pizzamiglio <luca.pizzamiglio@gmail.com> Added: head/devel/gdb/files/patch-sigev (contents, props changed) Modified: head/devel/gdb/Makefile head/devel/gdb/distinfo Modified: head/devel/gdb/Makefile ============================================================================== --- head/devel/gdb/Makefile Thu Jan 23 23:34:07 2014 (r340870) +++ head/devel/gdb/Makefile Thu Jan 23 23:48:53 2014 (r340871) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= gdb -PORTVERSION= 7.6.1 -PORTREVISION= 1 +PORTVERSION= 7.6.2 CATEGORIES= devel MASTER_SITES= GNU @@ -13,52 +12,56 @@ COMMENT= GNU GDB of newer version than c LICENSE= GPLv3 USE_BZIP2= yes -USE_CSTD= gnu89 USES= iconv gmake +USE_CSTD= gnu89 GNU_CONFIGURE= yes CONFIGURE_ENV= CONFIGURED_M4=m4 CONFIGURED_BISON=byacc CONFIGURE_ARGS= --program-suffix=${PORTVERSION:S/.//g} \ --with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \ + --with-separate-debug-dir=/usr/lib/debug \ ${ICONV_CONFIGURE_ARG} \ --without-libunwind-ia64 \ --enable-targets=all CFLAGS:= ${CFLAGS:C/ +$//} # blanks at EOL creep in sometimes CFLAGS+= -DRL_NO_COMPAT EXCLUDE= dejagnu expect sim texinfo intl +EXTRACT_AFTER_ARGS= ${EXCLUDE:S/^/--exclude /} + VER= ${PORTVERSION:S/.//g} PLIST_SUB= VER=${VER} -EXTRACT_AFTER_ARGS= ${EXCLUDE:S/^/--exclude /} ONLY_FOR_ARCHS= i386 amd64 powerpc powerpc64 # untested elsewhere, might work -OPTIONS_DEFINE= DEBUG EXPAT PYTHON THREADS TUI GDB_LINK -OPTIONS_SINGLE_READLINE= BASE_READLINE BUNDLED_READLINE PORT_READLINE +OPTIONS_DEFINE= DEBUG EXPAT GDB_LINK PYTHON THREADS TUI + +OPTIONS_DEFAULT= GDB_LINK THREADS TUI PORT_READLINE + OPTIONS_SINGLE= READLINE +OPTIONS_SINGLE_READLINE= BASE_READLINE BUNDLED_READLINE PORT_READLINE + +GDB_LINK_DESC= Create the gdb link BASE_READLINE_DESC= from base system(EXPERIMENTAL) BUNDLED_READLINE_DESC= from gdb distfile PORT_READLINE_DESC= from devel/readline port -GDB_LINK_DESC= Create the gdb link TUI_DESC= Text User Interface enabled -OPTIONS_DEFAULT= THREADS TUI GDB_LINK PORT_READLINE -# Activating the plist -OPTIONS_SUB=yes +OPTIONS_SUB= yes +BASE_READLINE_USES= readline +BASE_READLINE_CFLAGS= -D_rl_echoing_p=readline_echoing_p +BUNDLED_READLINE_CONFIGURE_OFF= --with-system-readline DEBUG_CFLAGS= -g EXPAT_CONFIGURE_ON= --with-expat=yes EXPAT_CONFIGURE_OFF= --without-expat -EXPAT_LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 -TUI_CONFIGURE_ENABLE= tui +EXPAT_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 PYTHON_CONFIGURE_ON= --with-python=${PYTHON_CMD} PYTHON_CONFIGURE_OFF= --without-python PORT_READLINE_USES= readline:port -BASE_READLINE_USES= readline -BASE_READLINE_CFLAGS= -D_rl_echoing_p=readline_echoing_p -BUNDLED_READLINE_CONFIGURE_OFF= --with-system-readline +TUI_CONFIGURE_ENABLE= tui .include <bsd.port.options.mk> -.if empty(PORT_OPTIONS:MBUNDLED_READLINE) +.if ! ${PORT_OPTIONS:MBUNDLED_READLINE} EXCLUDE+= readline .endif @@ -67,7 +70,8 @@ USE_PYTHON= 2 .endif .if ${PORT_OPTIONS:MTHREADS} -EXTRA_PATCHES= ${FILESDIR}/extrapatch-gdb-configure.tgt ${FILESDIR}/extrapatch-gdb-Makefile.in +EXTRA_PATCHES= ${FILESDIR}/extrapatch-gdb-configure.tgt \ + ${FILESDIR}/extrapatch-gdb-Makefile.in .endif .if ${ARCH} == "amd64" @@ -75,31 +79,37 @@ CONFIGURE_TARGET= x86_64-portbld-freebsd .endif post-patch: - @${REINPLACE_CMD} -e 's/$$/ [GDB v${PORTVERSION} for FreeBSD]/' \ + @${REINPLACE_CMD} -e 's|$$| [GDB v${PORTVERSION} for FreeBSD]|' \ ${WRKSRC}/gdb/version.in + .if ${PORT_OPTIONS:MTHREADS} @${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb/ .endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb ${STAGEDIR}${PREFIX}/bin/gdb${VER} - ${INSTALL_MAN} ${WRKSRC}/gdb/gdb.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/gdb${VER}.1 + ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb \ + ${STAGEDIR}${PREFIX}/bin/gdb${VER} + ${INSTALL_MAN} ${WRKSRC}/gdb/gdb.1 \ + ${STAGEDIR}${MAN1PREFIX}/man/man1/gdb${VER}.1 + .if ${PORT_OPTIONS:MTUI} ${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdbtui${VER} .endif + .if ${PORT_OPTIONS:MGDB_LINK} ${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb .endif + .if ${PORT_OPTIONS:MPYTHON} (cd ${WRKSRC}/gdb; ${GMAKE} DESTDIR=${STAGEDIR} install-python ) - (cd ${WRKSRC}/gdb/data-directory; ${GMAKE} DESTDIR=${STAGEDIR} install-python ) + (cd ${WRKSRC}/gdb/data-directory ; \ + ${GMAKE} DESTDIR=${STAGEDIR} install-python ) .endif -post-install: .if ${PORT_OPTIONS:MPYTHON} - ${CHMOD} u+w ${STAGEDIR}${PREFIX}/share/gdb${VER}/python/gdb/*.py* - ${CHMOD} u+w ${STAGEDIR}${PREFIX}/share/gdb${VER}/python/gdb/command/*.py* - ${CHMOD} u+w ${STAGEDIR}${PREFIX}/share/gdb${VER}/python/gdb/function/*.py* +. for f in gdb gdb/command gdb/function + @(cd ${STAGEDIR}${PREFIX}/share/gdb${VER}/python/${f} ; ${CHMOD} 644 *.py* ) +. endfor .endif .include <bsd.port.mk> Modified: head/devel/gdb/distinfo ============================================================================== --- head/devel/gdb/distinfo Thu Jan 23 23:34:07 2014 (r340870) +++ head/devel/gdb/distinfo Thu Jan 23 23:48:53 2014 (r340871) @@ -1,2 +1,2 @@ -SHA256 (gdb-7.6.1.tar.bz2) = e3dfa38a14a5457f9b8b26f7b5080ba5491bd10ae4d69bfe357cea87b7d162e4 -SIZE (gdb-7.6.1.tar.bz2) = 24338919 +SHA256 (gdb-7.6.2.tar.bz2) = 2f6a0e2ce1c66c9dedeb7f58a8d1298ad602ddcdaf15d23104e1f7832b96d0e8 +SIZE (gdb-7.6.2.tar.bz2) = 24269334 Added: head/devel/gdb/files/patch-sigev ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gdb/files/patch-sigev Thu Jan 23 23:48:53 2014 (r340871) @@ -0,0 +1,59 @@ +--- gdb/common/signals.c.orig 2013-01-01 07:32:54.000000000 +0100 ++++ gdb/common/signals.c 2013-11-25 16:12:56.000000000 +0100 +@@ -46,6 +46,12 @@ + # endif + #endif + ++#ifdef __FreeBSD__ ++# ifndef SIGLIBRT ++# define SIGLIBRT 33 /* Older versions do not define the constant */ ++# endif ++#endif ++ + /* This table must match in order and size the signals in enum + gdb_signal. */ + +@@ -334,6 +340,11 @@ + return GDB_SIGNAL_INFO; + #endif + ++#if defined (SIGLIBRT) ++ if ( hostsig == SIGLIBRT ) ++ return GDB_SIGNAL_FBSD_LIBRT; ++#endif ++ + #if defined (REALTIME_LO) + if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI) + { +@@ -591,6 +602,11 @@ + return SIGINFO; + #endif + ++#if defined (SIGLIBRT) ++ case GDB_SIGNAL_FBSD_LIBRT: ++ return SIGLIBRT; ++#endif ++ + default: + #if defined (REALTIME_LO) + retsig = 0; +--- gdb/infrun.c.orig 2013-08-30 17:58:55.000000000 +0200 ++++ gdb/infrun.c 2013-11-22 16:12:58.000000000 +0100 +@@ -7291,6 +7291,8 @@ + signal_print[GDB_SIGNAL_WINCH] = 0; + signal_stop[GDB_SIGNAL_PRIO] = 0; + signal_print[GDB_SIGNAL_PRIO] = 0; ++ signal_stop[GDB_SIGNAL_FBSD_LIBRT] = 0; ++ signal_print[GDB_SIGNAL_FBSD_LIBRT] = 0; + + /* These signals are used internally by user-level thread + implementations. (See signal(5) on Solaris.) Like the above +--- include/gdb/signals.def.orig 2013-01-01 07:41:30.000000000 +0100 ++++ include/gdb/signals.def 2013-11-25 16:13:42.000000000 +0100 +@@ -197,4 +197,5 @@ + /* If you are adding a new signal, add it just above this comment. */ + + /* Last and unused enum value, for sizing arrays, etc. */ +-SET (GDB_SIGNAL_LAST, 151, NULL, "GDB_SIGNAL_MAGIC") ++SET (GDB_SIGNAL_FBSD_LIBRT, 151, "SIGLIBRT", "GDB_SIGNAL_FBSD_LIBRT") ++SET (GDB_SIGNAL_LAST, 152, NULL, "GDB_SIGNAL_MAGIC") _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"