Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2013 17:59:37 +0000 (UTC)
From:      Danilo Egea Gondolfo <danilo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r330660 - head/devel/gdb
Message-ID:  <201310171759.r9HHxbWD041941@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danilo
Date: Thu Oct 17 17:59:36 2013
New Revision: 330660
URL: http://svnweb.freebsd.org/changeset/ports/330660

Log:
  - Add stage support
  - Use options helpers
  - Fix a problem when PYTHON and BUNDLED_READLINE options are active
  
  PR:		ports/183048
  Submitted by:	Luca Pizzamiglio <luca.pizzamiglio@gmail.com> (maintainer)

Modified:
  head/devel/gdb/Makefile
  head/devel/gdb/pkg-plist

Modified: head/devel/gdb/Makefile
==============================================================================
--- head/devel/gdb/Makefile	Thu Oct 17 17:28:19 2013	(r330659)
+++ head/devel/gdb/Makefile	Thu Oct 17 17:59:36 2013	(r330660)
@@ -18,17 +18,16 @@ USES=		iconv gmake
 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-gdb-datadir=${STAGEDIR}${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
 		${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}
+VER=		${PORTVERSION:S/.//g}
 PLIST_SUB=	VER=${VER}
-MAN1=	gdb${VER}.1
+EXTRACT_AFTER_ARGS=	${EXCLUDE:S/^/--exclude /}
 
 ONLY_FOR_ARCHS=	i386 amd64 powerpc powerpc64	# untested elsewhere, might work
 
@@ -38,67 +37,39 @@ OPTIONS_SINGLE=	READLINE
 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
+GDB_LINK_DESC=		Create the gdb link
+TUI_DESC=		Text User Interface enabled
 OPTIONS_DEFAULT=	THREADS TUI GDB_LINK PORT_READLINE
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+# Activating the plist
+OPTIONS_SUB=yes
 
-.if ${PORT_OPTIONS:MGDB_LINK}
-PLIST_SUB+=	GDB_LINK=""
-.else
-PLIST_SUB+=	GDB_LINK="@comment "
-.endif
+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
+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
 
-.if ${PORT_OPTIONS:MTUI}
-CONFIGURE_ARGS+=	--enable-tui
-PLIST_SUB+=	TUI_LINK=""
-.else
-CONFIGURE_ARGS+=	--disable-tui
-PLIST_SUB+=	TUI_LINK="@comment "
-.endif
+.include <bsd.port.options.mk>
 
 .if empty(PORT_OPTIONS:MBUNDLED_READLINE)
 EXCLUDE+=	readline
-CONFIGURE_ARGS+=	--with-system-readline
-.endif
-
-.if ${PORT_OPTIONS:MBASE_READLINE}
-CFLAGS+=	-D_rl_echoing_p=readline_echoing_p
-USES+=		readline
-.endif
-
-.if ${PORT_OPTIONS:MPORT_READLINE}
-USES+=		readline:port
 .endif
 
 .if ${PORT_OPTIONS:MPYTHON}
 USE_PYTHON=	2.5-2.7
-CONFIGURE_ARGS+=	--with-python=${PYTHON_CMD}
-PLIST_SUB+=		PYTHON=""
-.else
-CONFIGURE_ARGS+=	--without-python
-PLIST_SUB+=		PYTHON="@comment "
 .endif
 
-.include <bsd.port.pre.mk>
-
 .if ${PORT_OPTIONS:MTHREADS}
 EXTRA_PATCHES=	${FILESDIR}/extrapatch-gdb-configure.tgt ${FILESDIR}/extrapatch-gdb-Makefile.in
 .endif
 
-.if ${PORT_OPTIONS:MDEBUG}
-CFLAGS+=	-g
-.endif
-
-.if ${PORT_OPTIONS:MEXPAT}
-LIB_DEPENDS+=	expat:${PORTSDIR}/textproc/expat2
-CONFIGURE_ARGS+=	--with-expat=yes
-.else
-CONFIGURE_ARGS+=	--without-expat
-.endif
-
 .if ${ARCH} == "amd64"
 CONFIGURE_TARGET=	x86_64-portbld-freebsd${OSREL}
 .endif
@@ -111,13 +82,13 @@ post-patch:
 .endif
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb ${PREFIX}/bin/gdb${VER}
-	${INSTALL_MAN} ${WRKSRC}/gdb/gdb.1 ${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 ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdbtui${VER}
+	${LN} -sf ${STAGEDIR}${PREFIX}/bin/gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdbtui${VER}
 .endif
 .if ${PORT_OPTIONS:MGDB_LINK}
-	${LN} -sf gdb${VER} ${PREFIX}/bin/gdb
+	${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb
 .endif
 .if ${PORT_OPTIONS:MPYTHON}
 	(cd ${WRKSRC}/gdb; ${GMAKE} install-python )
@@ -126,9 +97,9 @@ do-install:
 
 post-install:
 .if ${PORT_OPTIONS:MPYTHON}
-	${CHMOD} u+w ${PREFIX}/share/gdb${VER}/python/gdb/*.py*
-	${CHMOD} u+w ${PREFIX}/share/gdb${VER}/python/gdb/command/*.py*
-	${CHMOD} u+w ${PREFIX}/share/gdb${VER}/python/gdb/function/*.py*
+	${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*
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/gdb/pkg-plist
==============================================================================
--- head/devel/gdb/pkg-plist	Thu Oct 17 17:28:19 2013	(r330659)
+++ head/devel/gdb/pkg-plist	Thu Oct 17 17:59:36 2013	(r330660)
@@ -1,19 +1,20 @@
 %%GDB_LINK%%bin/gdb
 bin/gdb%%VER%%
-%%TUI_LINK%%bin/gdbtui%%VER%%
-%%PYTHON%%share/gdb%%VER%%/python/gdb/__init__.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/types.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/printing.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/prompt.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/command/__init__.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/command/pretty_printers.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/command/prompt.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/command/explore.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/command/type_printers.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/function/__init__.py
-%%PYTHON%%share/gdb%%VER%%/python/gdb/function/strfns.py
-%%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb/function
-%%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb/command
-%%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb
-%%PYTHON%%@dirrm share/gdb%%VER%%/python
-%%PYTHON%%@dirrm share/gdb%%VER%%
+%%TUI%%bin/gdbtui%%VER%%
+man/man1/gdb%%VER%%.1.gz
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/__init__.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/types.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/printing.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/prompt.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/__init__.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/pretty_printers.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/prompt.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/explore.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/type_printers.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/__init__.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/strfns.py
+%%PYTHON%%@dirrmtry %%DATADIR%%%%VER%%/python/gdb/function
+%%PYTHON%%@dirrmtry %%DATADIR%%%%VER%%/python/gdb/command
+%%PYTHON%%@dirrmtry %%DATADIR%%%%VER%%/python/gdb
+%%PYTHON%%@dirrmtry %%DATADIR%%%%VER%%/python
+%%PYTHON%%@dirrmtry %%DATADIR%%%%VER%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310171759.r9HHxbWD041941>