Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 11:36:43 +0200 (CEST)
From:      Tijl Coosemans <tijl@coosemans.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/167049: [patch] devel/gdb: fix GDB_LINK option
Message-ID:  <201204180936.q3I9ahaj023823@kalimero.tijl.coosemans.org>
Resent-Message-ID: <201204180940.q3I9e1eA029222@freefall.freebsd.org>

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

>Number:         167049
>Category:       ports
>Synopsis:       [patch] devel/gdb: fix GDB_LINK option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 18 09:40:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
>Description:
devel/gdb does not create a symbolic link when installed from ports,
only when installed as a package.
>How-To-Repeat:
>Fix:

--- gdb.patch begins here ---
diff -ur /usr/ports/devel/gdb/Makefile ./Makefile
--- /usr/ports/devel/gdb/Makefile	2012-04-01 18:13:10.000000000 +0200
+++ ./Makefile	2012-04-18 11:29:09.000000000 +0200
@@ -55,9 +55,9 @@
 .include <bsd.port.options.mk>
 
 .if defined(WITH_GDB_LINK)
-PLIST_SUB+=	GDB_LINK=true
+PLIST_SUB+=	GDB_LINK=""
 .else
-PLIST_SUB+=	GDB_LINK=false
+PLIST_SUB+=	GDB_LINK="@comment "
 .endif
 
 .if defined(WITH_PYTHON)
@@ -101,6 +101,9 @@
 	${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)
+	${LN} -sf gdb${VER} ${PREFIX}/bin/gdb
+.endif
 .if defined(WITH_PYTHON)
 	(cd ${WRKSRC}/gdb; ${GMAKE} install-python )
 	(cd ${WRKSRC}/gdb/data-directory; ${GMAKE} install-python )
diff -ur /usr/ports/devel/gdb/pkg-plist ./pkg-plist
--- /usr/ports/devel/gdb/pkg-plist	2012-04-01 18:13:10.000000000 +0200
+++ ./pkg-plist	2012-04-18 11:14:31.000000000 +0200
@@ -1,3 +1,4 @@
+%%GDB_LINK%%bin/gdb
 bin/gdb%%VER%%
 bin/gdbtui%%VER%%
 %%PYTHON%%share/gdb%%VER%%/python/gdb/__init__.py
@@ -11,5 +12,3 @@
 %%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb
 %%PYTHON%%@dirrm share/gdb%%VER%%/python
 %%PYTHON%%@dirrm share/gdb%%VER%%
-@exec if $( %%GDB_LINK%% ) ; then ln -fs %%PREFIX%%/bin/gdb%%VER%% %%PREFIX%%/bin/gdb; fi
-@unexec if $( %%GDB_LINK%% ) ; then rm -f %%PREFIX%%/bin/gdb; fi
--- gdb.patch ends here ---

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



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