Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2013 10:46:24 GMT
From:      Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183048: [MAINTAINER] adding staging, new option facilities and fix a bug
Message-ID:  <201310171046.r9HAkONB009219@oldred.freebsd.org>
Resent-Message-ID: <201310171050.r9HAo0PP058296@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183048
>Category:       ports
>Synopsis:       [MAINTAINER] adding staging, new option facilities and fix a bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 10:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Luca Pizzamiglio
>Release:        FreeBSD 8.3-STABLE
>Organization:
>Environment:
>Description:
Adopting the new staging system.
Adopting the new option macros in Makefile.

Solving the PR ports/182280. It was an incomplete parameter detection when PYTHON and BUNDLED_READLINE options are active in 10.x system.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -Nru devel/gdb.orig/Makefile devel/gdb/Makefile
--- devel/gdb.orig/Makefile	2013-09-26 19:05:03.000000000 +0200
+++ devel/gdb/Makefile	2013-10-17 12:27:16.000000000 +0200
@@ -1,5 +1,5 @@
 # Created by: Steven Kreuzer <skreuzer@FreeBSD.org>
-# $FreeBSD: devel/gdb/Makefile 328393 2013-09-26 17:05:03Z tabthorpe $
+# $FreeBSD: devel/gdb/Makefile 325922 2013-09-01 22:31:44Z rakuco $
 
 PORTNAME=	gdb
 PORTVERSION=	7.6.1
@@ -18,17 +18,16 @@
 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 @@
 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 @@
 .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 @@
 
 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>
diff -Nru devel/gdb.orig/files/patch-gdb-python-python-config.py devel/gdb/files/patch-gdb-python-python-config.py
--- devel/gdb.orig/files/patch-gdb-python-python-config.py	1970-01-01 01:00:00.000000000 +0100
+++ devel/gdb/files/patch-gdb-python-python-config.py	2013-10-17 12:26:21.000000000 +0200
@@ -0,0 +1,11 @@
+--- gdb/python/python-config.py.orig	2013-10-17 11:24:52.000000000 +0200
++++ gdb/python/python-config.py	2013-10-17 11:25:04.000000000 +0200
+@@ -59,6 +59,8 @@
+ 
+     elif opt in ('--libs', '--ldflags'):
+         libs = []
++        if getvar('LDFLAGS') is not None:
++            libs.extend(getvar('LDFLAGS').split())
+         if getvar('LIBS') is not None:
+             libs.extend(getvar('LIBS').split())
+         if getvar('SYSLIBS') is not None:
diff -Nru devel/gdb.orig/pkg-plist devel/gdb/pkg-plist
--- devel/gdb.orig/pkg-plist	2013-09-26 04:30:22.000000000 +0200
+++ devel/gdb/pkg-plist	2013-10-17 12:26:40.000000000 +0200
@@ -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%%


>Release-Note:
>Audit-Trail:
>Unformatted:



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