Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2010 13:22:02 -0700 (PDT)
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/151414: Add 'work' when WRKDIRPREFIX is used.
Message-ID:  <201010122022.o9CKM2Of025432@dragon.nuxi.org>
Resent-Message-ID: <201010122030.o9CKU5BW052865@freefall.freebsd.org>

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

>Number:         151414
>Category:       ports
>Synopsis:       Add 'work' when WRKDIRPREFIX is used.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 12 20:30:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     David O'Brien
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
The FreeBSD Project
>Environment:
	FreeBSD
>Description:
	It can be a lot of typing to enter a ports's extracted directory
	if WRKDIRPREFIX is used.  In addition to the extra typing, one
	must remember the value of WRKDIRPREFIX - which could be set
	differently depending on where scratch space is available.

>How-To-Repeat:
	
>Fix:

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.649
diff -u -p -r1.649 bsd.port.mk
--- bsd.port.mk	29 Sep 2010 20:51:55 -0000	1.649
+++ bsd.port.mk	12 Oct 2010 20:11:50 -0000
@@ -3664,6 +3698,9 @@ do-extract:
 		${CHOWN} -R 0:0 ${WRKDIR}; \
 	fi
 .endif
+.if !empty(WRKDIRPREFIX)
+	@ln -s ${WRKDIRPREFIX}${.CURDIR}/work ${.CURDIR}
+.endif
 .endif
 
 # Patch
@@ -4589,6 +4631,9 @@ do-clean:
 			${ECHO_MSG} "===>   ${WRKDIR} not writable, skipping"; \
 		fi; \
 	fi
+.if !empty(WRKDIRPREFIX)
+	@[ -L ${.CURDIR}/work ] && rm -f ${.CURDIR}/work
+.endif
 .endif
 
 .if !target(clean)
>Release-Note:
>Audit-Trail:
>Unformatted:



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