From owner-freebsd-ports Mon Jul 17 3:39:49 2000 Delivered-To: freebsd-ports@freebsd.org Received: from blizzard.sabbo.net (blizzard.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id 74CDB37B5C9; Mon, 17 Jul 2000 03:39:37 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.106]) by blizzard.sabbo.net (8.9.1/8.9.3) with ESMTP id NAA15890; Mon, 17 Jul 2000 13:37:56 +0300 (EEST) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.9.3/8.9.3) with ESMTP id NAA15369; Mon, 17 Jul 2000 13:39:26 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3972E25C.7CDA3E2C@FreeBSD.org> Date: Mon, 17 Jul 2000 13:39:24 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.73 [en] (WinNT; I) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: ports@FreeBSD.org Cc: asami@FreeBSD.org Subject: bsd.port.mk feature requiest [patch] Content-Type: multipart/mixed; boundary="------------44CEE1A18DF2B26B959D66B1" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------44CEE1A18DF2B26B959D66B1 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Hi Porters! After some amount of extensive porting I found that WRKDIRPREFIX is quite useful options which helps to keep crap generated bu the port builds away from /usr/ports, but unfortunately it turns into a problem when you have to not only build ports but make some debugging/upgrading/fixing. Without this option you could use convenient trial/error/fix scheme, but when WRKDIRPREFIX is defined the port and its ${WRKDIR} could be too far away from each other, which makes this process a too painful. Therefore I came with the following patch, which I believe combines best from the two cases (i.e. WRKDIRPREFIX and !WRKDIRPREFIX) simply by installing symlink from ${WRKDIR} to ${.CURRDIR}/work, so with this option enabled you can have WRKDIRPREFIX defined to keep crap in one place, while still able to do " cd myport ; make [bah error!] cd work/myport ; vi configure; diff -du configure.orig configure > ../../patches/patch-aa ; cd ../../ ; make" ;). -Maxim --------------44CEE1A18DF2B26B959D66B1 Content-Type: text/plain; charset=koi8-r; name="symlink.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="symlink.patch" --- bsd.port.mk 2000/07/17 08:53:31 1.1 +++ bsd.port.mk 2000/07/17 09:11:06 @@ -225,6 +225,9 @@ # unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless # NO_WRKSUBDIR is set, in which case simply ${WRKDIR}). # NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. +# CREATE_WRKDIR_SYMLINK - Create symlink from ${WRKDIR} to ${.CURDIR}/work. Very usefill +# when you use ${WRKDIRPREFIX} but still want ${WRKDIR} +# to be quickly accesible for debugging purposes. # PATCHDIR - A directory containing any additional patches you made # to port this software to FreeBSD (default: # ${MASTERDIR}/patches) @@ -1591,6 +1594,15 @@ do-extract: @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} +.if defined(CREATE_WRKDIR_SYMLINK) + @if [ x"${.CURDIR}/work" != x"${WRKDIR}" ]; then \ + if [ -w ${.CURDIR} ]; then \ + ${LN} -sf ${WRKDIR} ${.CURDIR}/work; \ + else \ + ${ECHO_MSG} "===> ${CURDIR} not writable, link not created"; \ + fi; \ + fi +.endif @for file in ${EXTRACT_ONLY}; do \ if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ then \ @@ -2065,6 +2077,15 @@ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ fi; \ fi +.if defined(CREATE_WRKDIR_SYMLINK) + @if [ -L ${.CURDIR}/work ]; then \ + if [ -w ${.CURDIR} ]; then \ + ${RM} -f ${.CURDIR}/work; \ + else \ + ${ECHO_MSG} "===> ${CURDIR} not writable, skipping"; \ + fi; \ + fi +.endif .endif .if !target(clean) --------------44CEE1A18DF2B26B959D66B1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message