Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 12:28:34 GMT
From:      Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169265: [MAINTAINER] OptionsNG and fix ports/168444
Message-ID:  <201206201228.q5KCSYc8048070@red.freebsd.org>
Resent-Message-ID: <201206201230.q5KCUBqQ096190@freefall.freebsd.org>

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

>Number:         169265
>Category:       ports
>Synopsis:       [MAINTAINER] OptionsNG and fix ports/168444
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 20 12:30:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Luca Pizzamiglio
>Release:        FreeBSD 8.3-STABLE
>Organization:
>Environment:
>Description:
Adopting the OptionsNG framework
Fix ports/168444 that could be closed
Bumping PORTREVISION.
>How-To-Repeat:

>Fix:
Adopt the patch

Patch attached with submission follows:

diff -rNu devel/gdb.orig/Makefile devel/gdb/Makefile
--- devel/gdb.orig/Makefile	2012-05-01 17:53:46.000000000 +0200
+++ devel/gdb/Makefile	2012-06-20 14:26:15.000000000 +0200
@@ -8,6 +8,7 @@
 
 PORTNAME=	gdb
 PORTVERSION=	7.4.1
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GNU:S,$,:gdb,}
 MASTER_SITE_SUBDIR=gdb/:gdb
@@ -45,38 +46,36 @@
 CFLAGS+=	-isystem ${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS=	DEBUG "Build with debugging symbols" off \
-		EXPAT "Enable XML parsing for metadata" off \
-		PYTHON "Enable Python support" off \
-		THREAD "Enable Thread support" on \
-		GDB_LINK "Create the gdb link" on
+OPTIONS_DEFINE=	DEBUG EXPAT PYTHON THREADS GDB_LINK
+GDB_LINK_DESC=	Create the gdb link
+OPTIONS_DEFAULT=	THREADS GDB_LINK
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_GDB_LINK)
+.if ${PORT_OPTIONS:MGDB_LINK)
 PLIST_SUB+=	GDB_LINK=""
 .else
 PLIST_SUB+=	GDB_LINK="@comment "
 .endif
 
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 USE_PYTHON=	2.5-2.7
 .endif
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MDEBUG}
 CFLAGS+=	-g
 .endif
 
-.if defined(WITH_EXPAT)
+.if ${PORT_OPTIONS:MEXPAT}
 LIB_DEPENDS+=	expat.6:${PORTSDIR}/textproc/expat2
 CONFIGURE_ARGS+=	--with-expat=yes
 .else
 CONFIGURE_ARGS+=	--without-expat
 .endif
 
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 CONFIGURE_ARGS+=	--with-python=${PYTHON_CMD}
 PLIST_SUB+=		PYTHON=""
 .else
@@ -91,7 +90,7 @@
 post-patch:
 	@${REINPLACE_CMD} -e 's/$$/ [GDB v${PORTVERSION} for FreeBSD]/' \
 		${WRKSRC}/gdb/version.in
-.if !defined(WITHOUT_THREAD)
+.if empty(PORT_OPTIONS:MTHREADS)
 	@${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb/
 .endif
 	@${CP} ${FILESDIR}/amd64bsd-nat.h ${WRKSRC}/gdb
@@ -100,10 +99,12 @@
 	${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb ${PREFIX}/bin/gdb${VER}
 	${LN} ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdbtui${VER}
 	${INSTALL_MAN} ${WRKSRC}/gdb/gdb.1 ${MAN1PREFIX}/man/man1/gdb${VER}.1
-.if defined(WITH_GDB_LINK)
+#.if defined(WITH_GDB_LINK)
+.if ${PORT_OPTIONS:MGDB_LINK)
 	${LN} -sf gdb${VER} ${PREFIX}/bin/gdb
 .endif
-.if defined(WITH_PYTHON)
+#.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 	(cd ${WRKSRC}/gdb; ${GMAKE} install-python )
 	(cd ${WRKSRC}/gdb/data-directory; ${GMAKE} install-python )
 .endif
diff -rNu devel/gdb.orig/files/fbsd-threads.c devel/gdb/files/fbsd-threads.c
--- devel/gdb.orig/files/fbsd-threads.c	2012-01-27 10:38:15.000000000 +0100
+++ devel/gdb/files/fbsd-threads.c	2012-06-20 14:19:23.000000000 +0200
@@ -439,6 +439,10 @@
   if (td_ta_new_p == NULL)
     return;
 
+  /* Don't try to attach to a dead target if there is no core file. */
+  if (!target_has_execution && core_bfd == NULL)
+    return;
+
   /* Nothing to do.  The thread library was already detected and the
      target vector was already activated.  */
   if (fbsd_thread_active)


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



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