ports/151414: Add 'work' when WRKDIRPREFIX is used.

David O'Brien obrien at FreeBSD.org
Tue Oct 12 20:30:05 UTC 2010


>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:



More information about the freebsd-ports-bugs mailing list