Date: Wed, 6 Mar 1996 21:13:28 +0000 (GMT) From: Adam David <adam@veda.is> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: ports@freebsd.org Subject: Re: PATCH_PRFX in bsd.port.mk Message-ID: <199603062113.VAA01980@veda.is> In-Reply-To: <199603061007.CAA16930@silvia.HIP.Berkeley.EDU> from Satoshi Asami at "Mar 6, 96 02:07:57 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> I was looking into bsd.port.mk with the intention of adding > subdirectory support to /usr/ports/distfiles and ran into your commit > (revision 1.155) that introduces a new variable PATCH_PRFX. > > As far as I can tell, I couldn't really understand what this commit, > which was done without consulting anyone (again, as far as I could > tell), and I still can't understand it today. At the time there was less strict control over the contents of bsd.port.mk, but I do remember bringing up for discussion the subject of renaming patchfiles (optionally in a subdirectory). > And according to the new and trusty xargs and grep, only net/dgd uses > this variable, which further intrigues the wondering mind why it had > to be done in the main .mk file. Yes, dgd is currently the only port to use this mechanism. However, it is only the rather unclear documentation that has been a hinderance to other ports making effective use of it. I believe this functionality to be of sufficiently general use to be present in bsd.port.mk. > Can you please explain me what it intends to do? By setting PATCH_PRFX to a suitable value, all files in ${PATCHFILES} are renamed during fetch into /usr/ports/distfiles, and are accessed from the new locations there. This is useful when one port has many patchfiles (in which case it makes sense to group them in a subdirectory), or when a few patchfiles have unclear names (in which case it makes sense to prefix a port-specific name component). If ${PATCH_PRFX} ends in '/' the subdirectory path is automatically created during fetch and the patchfiles are moved into this directory, otherwise the files are renamed by adding the prefix. It is the responsibility of individual port Makefiles to set PATCH_PRFX uniquely (when it is used), so that it does not conflict with other residents of /usr/ports/distfiles. ${PATCH_PRFX} is matched against '/$' (bug: this should have been '^[^/].*/$'). Hovever, I see now that matching against '^[^/].*/.*' would make better sense and is more generic, therefore an improvement. -- Adam David <adam@veda.is>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603062113.VAA01980>