devel/gdb Port
Anonymous
swell.k at gmail.com
Mon Nov 8 19:24:22 UTC 2010
Steven Kreuzer <skreuzer at freebsd.org> writes:
> With the help of jhb@, I have a port of gdb 7.1 that has been modified
> to recognize freebsd threads. I would like to get this added to the
> ports tree but I would like some feedback as to how it should be
> added.
>
> Currently, the latest version of gdb in the ports tree is 6.6 and its
> under devel/gdb66. I was thinking of adding this as gdb71 but the
> latest version of the 7.x branch is 7.2 and someone already created a
> port for it (ports/151077) but it doesn't recognize threads.
>
> So, for the 7 branch, would it make sense to check in version 7.1 as
> devel/gdb7 and eventually update it to 7.2, or should it be checked in
> as devel/gdb71?
>
> shar file can be found at http://exit2shell.com/~skreuzer/patches/gdb71.shar
- fix build with devel/readline[*]
- explicitly disable xml/unwind/python support
- drop gettext dep, unused
Note, lang/gcc* (and lang/clang) searches in LOCALBASE by default unlike
gcc in base. Having it in *FLAGS by default reduces difference between
build using ports compiler and base one.
[*] http://docs.freebsd.org/cgi/mid.cgi?AANLkTinkwsFXpXE=CxcDjTGPVo3aa8EQ1_ve0h3NiB5E
%%
--- gdb71/Makefile
+++ gdb71/Makefile
@@ -17,15 +17,21 @@ COMMENT= GNU GDB of newer version than comes with the system
USE_BZIP2= yes
USE_GMAKE= yes
-USE_GETTEXT= yes
USE_ICONV= yes
GNU_CONFIGURE= yes
-CONFIGURE_ENV+= CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
+CONFIGURE_ENV+= CONFIGURED_M4=m4 CONFIGURED_BISON=byacc LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --program-suffix=${PORTVERSION:S/.//g} \
+ --with-libiconv-prefix=${LOCALBASE} \
+ --with-system-readline \
+ --without-expat \
+ --without-libunwind \
+ --without-python \
--enable-target=all \
- --enable-tui --with-libiconv-prefix=${LOCALBASE}
+ --enable-tui
CFLAGS:= ${CFLAGS:C/ +$//} # blanks at EOL creep in sometimes
+CFLAGS+= -I${LOCALBASE}/include
CFLAGS+= -DRL_NO_COMPAT
+LDFLAGS+= -L${LOCALBASE}/lib
EXCLUDE= dejagnu expect readline sim texinfo intl
EXTRACT_AFTER_ARGS=| ${TAR} -xf - ${EXCLUDE:S/^/--exclude /}
VER= ${PORTVERSION:S/.//}
@@ -36,6 +42,11 @@ ONLY_FOR_ARCHS= i386 amd64 # untested elsewhere, might work
.include <bsd.port.pre.mk>
+# XXX: add OSVERSION check after readline is removed from base
+.if exists(${LOCALBASE}/lib/libreadline.so)
+LIB_DEPENDS+= readline.6:${PORTSDIR}/devel/readline
+.endif
+
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
@@ -43,11 +54,6 @@ CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
post-patch:
@${REINPLACE_CMD} -e 's/$$/ [GDB v${PORTVERSION} for FreeBSD]/' \
${WRKSRC}/gdb/version.in
- @${REINPLACE_CMD} -e 's/^READLINE/#READLINE/' \
- -e 's/^readline/#readline/' \
- -e 's,^LIBICONV =.*,LIBICONV=-L${LOCALBASE}/lib -liconv,' \
- ${WRKSRC}/gdb/Makefile.in
- ${ECHO} 'READLINE = -lreadline' >> ${WRKSRC}/gdb/Makefile.in
@${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb
do-install:
%%
More information about the freebsd-ports
mailing list