Christian Weisgerber <naddy@openbsd.org>, supplied this patch in support of ports/Tools/scripts/update-patches, a utility I've taken from OpenBSD which helps manage changes to patch files when working with the ports collection. Without this support in bsd.port.mk, the script does not work properly: it will not always guess $WRKSRC correctly, and the generated patches cannot be edited. Fix: +DISTORIG?= .bak.orig PATCH?= /usr/bin/patch PATCH_STRIP?= -p0 PATCH_DIST_STRIP?= -p0 .if defined(PATCH_DEBUG) PATCH_DEBUG_TMP= yes PATCH_ARGS?= -d ${PATCH_WRKSRC} -E ${PATCH_STRIP} -PATCH_DIST_ARGS?= -d ${PATCH_WRKSRC} -E ${PATCH_DIST_STRIP} +PATCH_DIST_ARGS?= -b ${DISTORIG} -d ${PATCH_WRKSRC} -E ${PATCH_DIST_STRIP} .else PATCH_DEBUG_TMP= no PATCH_ARGS?= -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_STRIP} -PATCH_DIST_ARGS?= -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} +PATCH_DIST_ARGS?= -b ${DISTORIG} -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} .endif .if defined(BATCH) PATCH_ARGS+= --batch @@ -2325,6 +2326,16 @@ done) .endif .endif + +# Generates patches. + +update-patches: + @toedit=`WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} PATCH_LIST=${PATCHDIR}/patch-* \ + DIFF_ARGS=${DIFF_ARGS} DISTORIG=${DISTORIG} \ + ${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \ + case $$toedit in "");; \ + *) ${ECHO} -n 'edit patches: '; read i; \ + cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac # Checksumming utilities--WofekgzwGUwXPiA4K7qleCUpS6TnTEv0bZRveIcv49vsHWwd Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" Index: ports/Mk/bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.360 diff -u -r1.360 bsd.port.mk --- ports/Mk/bsd.port.mk 2000/11/16 13:06:25 1.360 +++ ports/Mk/bsd.port.mk 2000/12/28 17:58:49 @@ -955,17 +955,18 @@ TOUCH?= /usr/bin/touch TOUCH_FLAGS?= -f How-To-Repeat: N/A
Responsible Changed From-To: asami->portmgr change of maintainership of bsd.port.mk
Since I submitted this PR, there have been forty-six revisions to bsd.port.mk and four releases of FreeBSD. What, if anything, can I do to speed up the process of getting this committed? -- Trevor Johnson
I have updated the patch to support PATCH_WRKSRC, which was introduced in revision 1.356 of bsd.port.mk. See http://people.freebsd.org/~trevor/ports/update-patches-1.411.diff . -- Trevor Johnson
State Changed From-To: open->analyzed Currently undergoing pre-commit testing
State Changed From-To: analyzed->closed Patch committed, thanks!
> kris 2003/05/05 22:15:19 PDT > > FreeBSD ports repository > > Modified files: > Mk bsd.port.mk > Log: > - Add support for the Tools/scripts/update-patches script [1] [...] > Submitted by: trevor [1], lioux [2], > Sergey Matveychuk <sem@ciam.ru> [3] > PR: 24292 [1], 47146 [3] <URL:http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24292> > > Revision Changes Path > 1.448 +94 -44 ports/Mk/bsd.port.mk > > <URL:http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?&r1=1.447&r2=1.448&f=u> In a follow-up to the PR, I said: Date: Sat, 25 May 2002 11:18:46 -0400 (EDT) I have updated the patch to support PATCH_WRKSRC, which was introduced in revision 1.356 of bsd.port.mk. See http://people.freebsd.org/~trevor/ports/update-patches-1.411.diff . The patch from 2001 was committed instead of the updated patch from 2002. The older one no longer works. The following patch is the difference between what is in bsd.port.mk and what I submitted last year, which also had a whitespace change for readability. Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.449 diff -u -r1.449 bsd.port.mk --- bsd.port.mk 14 May 2003 16:47:31 -0000 1.449 +++ bsd.port.mk 24 May 2003 02:50:13 -0000 @@ -3421,7 +3421,9 @@ # Generates patches. update-patches: - @toedit=`WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} PATCH_LIST=${PATCHDIR}/patch-* \ + @toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \ + PATCHDIR=${PATCHDIR} \ + PATCH_LIST=${PATCHDIR}/patch-* \ DIFF_ARGS=${DIFF_ARGS} DISTORIG=${DISTORIG} \ ${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \ case $$toedit in "");; \ -- Trevor Johnson
Please reopen PR 24292. See my followups of May 25th, 2002 and May 23rd, 2003 for the reason. -- Trevor Johnson