Add two new options to enable expat and Python support. Both are

currently disabled by default.  If Python support is enabled, then gdb
is able to use the pretty printer python libraries supplied with newer
versions of gcc to pretty print STL containers.

Reviewed by:	skreuzer
Feature safe:	yes
This commit is contained in:
John Baldwin 2011-01-11 20:52:28 +00:00
parent 7c8462bb91
commit 45a196cb6e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=267675

View file

@ -8,7 +8,7 @@
PORTNAME= gdb
PORTVERSION= 7.2
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:S,$,:gdb,}
MASTER_SITE_SUBDIR=gdb/:gdb
@ -27,9 +27,7 @@ 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
CFLAGS:= ${CFLAGS:C/ +$//} # blanks at EOL creep in sometimes
@ -42,7 +40,15 @@ MAN1= gdb${VER}.1
ONLY_FOR_ARCHS= i386 amd64 # untested elsewhere, might work
OPTIONS= DEBUG "Build with debugging symbols" off
OPTIONS= DEBUG "Build with debugging symbols" off \
EXPAT "Enable XML parsing for metadata" off \
PYTHON "Enable Python support" off
.include <bsd.port.options.mk>
.if defined(WITH_PYTHON)
USE_PYTHON= 2.4-2.7
.endif
.include <bsd.port.pre.mk>
@ -50,6 +56,19 @@ OPTIONS= DEBUG "Build with debugging symbols" off
CFLAGS+= -g
.endif
.if defined(WITH_EXPAT)
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2
CONFIGURE_ARGS+= --with-expat=yes
.else
CONFIGURE_ARGS+= --without-expat
.endif
.if defined(WITH_PYTHON)
CONFIGURE_ARGS+= --with-python=${PYTHON_CMD}
.else
CONFIGURE_ARGS+= --without-python
.endif
# XXX: add OSVERSION check after readline is removed from base
.if exists(${LOCALBASE}/lib/libreadline.so)
LIB_DEPENDS+= readline.6:${PORTSDIR}/devel/readline