From utisoft@hotmail.com  Sun Aug 21 12:33:50 2011
Return-Path: <utisoft@hotmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2428D1065673
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Aug 2011 12:33:50 +0000 (UTC)
	(envelope-from utisoft@hotmail.com)
Received: from blu0-omc1-s9.blu0.hotmail.com (blu0-omc1-s9.blu0.hotmail.com [65.55.116.20])
	by mx1.freebsd.org (Postfix) with ESMTP id CF50E8FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Aug 2011 12:33:49 +0000 (UTC)
Received: from BLU0-SMTP271 ([65.55.116.8]) by blu0-omc1-s9.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
	 Sun, 21 Aug 2011 05:33:49 -0700
Received: from zeus.bayofrum.net ([90.216.242.219]) by BLU0-SMTP271.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675);
	 Sun, 21 Aug 2011 05:33:47 -0700
Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1])
	by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p7LCXVR4011413
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Aug 2011 13:33:31 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p7LCXV0H011412;
	Sun, 21 Aug 2011 13:33:31 +0100 (BST)
	(envelope-from crees)
Message-Id: <BLU0-SMTP271BB2F84D257DD074EE627A92C0@phx.gbl>
Date: Sun, 21 Aug 2011 13:33:31 +0100
From: Chris Rees <crees@zeus.bayofrum.net>
Sender: <utisoft@hotmail.com>
Reply-To: Chris Rees <crees@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] bsd.port.mk Deprecate using PATCHDIR and use FILESDIR instead.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         159970
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk Deprecate using PATCHDIR and use FILESDIR instead.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 21 12:40:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Jul 01 16:54:50 UTC 2012
>Originator:     Chris Rees
>Release:        FreeBSD 8.2-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386


	
>Description:
	PATCHDIR is a throwback to the days when ports had 'patches' directory (quoting danfe [1]).

	This patch should expose any ports that rely on FILESDIR!=PATCHDIR if put through an exp-run even if it's not committed -- that way we can work on fixing those ports with an end result of removing PATCHDIR from the tree.

[1] http://lists.freebsd.org/pipermail/cvs-ports/2011-August/223820.html
>How-To-Repeat:
	
>Fix:

	

--- bsd-port-mk-deprecate-patchdir begins here ---
Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.692
diff -u -r1.692 bsd.port.mk
--- Mk/bsd.port.mk	12 Aug 2011 16:39:23 -0000	1.692
+++ Mk/bsd.port.mk	21 Aug 2011 11:57:58 -0000
@@ -575,12 +575,10 @@
 #				  Default: ${WRKDIR}/${DISTNAME} unless NO_WRKSUBDIR is set,
 #				  in which case simply ${WRKDIR}
 # NO_WRKSUBDIR	- Assume port unpacks directly into ${WRKDIR}.
-# PATCHDIR		- A directory containing any additional patches you made
-#				  to port this software to FreeBSD.
-#				  Default: ${MASTERDIR}/files
 # SCRIPTDIR		- A directory containing any auxiliary scripts
 #				  Default: ${MASTERDIR}/scripts
-# FILESDIR		- A directory containing any miscellaneous additional files.
+# FILESDIR		- A directory containing any miscellaneous additional files
+#				  or patches.
 #				  Default: ${MASTERDIR}/files
 # PKGDIR		- A directory containing any package creation files.
 #				  Default: ${MASTERDIR}
@@ -850,14 +848,14 @@
 # For patch:
 #
 # EXTRA_PATCHES	- Define this variable if you have patches not in
-#				  ${PATCHDIR}.  This usually happens when you need to
+#				  ${FILESDIR}.  This usually happens when you need to
 #				  do some pre-processing before some distribution
 #				  patches can be applied.  In that case, fetch them as
 #				  extra distfiles, put the processed results in
 #				  ${WRKDIR}, then point EXTRA_PATCHES to them.
 #				  The patches specified by this variable will be
 #				  applied after the normal distribution patches but
-#				  before those in ${PATCHDIR}.
+#				  before those in ${FILESDIR}.
 # PATCH_WRKSRC	- Directory to apply patches in.
 #				  Default: ${WRKSRC}
 #
@@ -1393,8 +1391,8 @@
 PACKAGES?=		${PORTSDIR}/packages
 TEMPLATES?=		${PORTSDIR}/Templates
 
-PATCHDIR?=		${MASTERDIR}/files
 FILESDIR?=		${MASTERDIR}/files
+PATCHDIR=		${FILESDIR}
 SCRIPTDIR?=		${MASTERDIR}/scripts
 PKGDIR?=		${MASTERDIR}
 
@@ -2946,7 +2944,7 @@
 
 # Passed to most of script invocations
 SCRIPTS_ENV+=	CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \
-		  WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
+		  WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${FILESDIR} \
 		  SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
 		  PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \
 		  X11BASE=${X11BASE}
@@ -3256,7 +3254,7 @@
 all:
 	@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \
 	  DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \
-	  PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
+	  PATCHDIR=${FILESDIR} SCRIPTDIR=${SCRIPTDIR} \
 	  FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \
 	  BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \
 	  CONFLICTS="${CONFLICTS}" \
@@ -3627,11 +3625,11 @@
 		${PATCH} ${PATCH_ARGS} < $$i; \
 	done
 .endif
-	@if [ -d ${PATCHDIR} ]; then \
-		if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
+	@if [ -d ${FILESDIR} ]; then \
+		if [ "`${ECHO_CMD} ${FILESDIR}/patch-*`" != "${FILESDIR}/patch-*" ]; then \
 			${ECHO_MSG} "===>  Applying ${OPSYS} patches for ${PKGNAME}" ; \
 			PATCHES_APPLIED="" ; \
-			for i in ${PATCHDIR}/patch-*; do \
+			for i in ${FILESDIR}/patch-*; do \
 				case $$i in \
 					*.orig|*.rej|*~|*,v) \
 						${ECHO_MSG} "===>   Ignoring patchfile $$i" ; \
@@ -3643,9 +3641,9 @@
 						if ${PATCH} ${PATCH_ARGS} < $$i ; then \
 							PATCHES_APPLIED="$$PATCHES_APPLIED $$i" ; \
 						else \
-							${ECHO_MSG} `${ECHO_CMD} "=> Patch $$i failed to apply cleanly." | ${SED} "s|${PATCHDIR}/||"` ; \
+							${ECHO_MSG} `${ECHO_CMD} "=> Patch $$i failed to apply cleanly." | ${SED} "s|${FILESDIR}/||"` ; \
 							if [ x"$$PATCHES_APPLIED" != x"" ]; then \
-								${ECHO_MSG} `${ECHO_CMD} "=> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} "s|${PATCHDIR}/||g"` ; \
+								${ECHO_MSG} `${ECHO_CMD} "=> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} "s|${FILESDIR}/||g"` ; \
 							fi; \
 							${FALSE} ; \
 						fi; \
@@ -4728,14 +4726,14 @@
 
 update-patches:
 	@toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \
-		PATCHDIR=${PATCHDIR} \
-		PATCH_LIST=${PATCHDIR}/patch-* \
+		PATCHDIR=${FILESDIR} \
+		PATCH_LIST=${FILESDIR}/patch-* \
 		DIFF_ARGS=${DIFF_ARGS} \
 		DISTORIG=${DISTORIG} \
 		${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \
 	case $$toedit in "");; \
 	*) ${ECHO_CMD} -n 'edit patches: '; read i; \
-	cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac
+	cd ${FILESDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac
 
 # Checksumming utilities
 
--- bsd-port-mk-deprecate-patchdir ends here ---



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 21 12:40:19 UTC 2011 
Responsible-Changed-Why:  
bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 
State-Changed-From-To: open->closed 
State-Changed-By: erwin 
State-Changed-When: Sat May 12 02:10:15 UTC 2012 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 
State-Changed-From-To: closed->feedback 
State-Changed-By: erwin 
State-Changed-When: Sat May 12 02:10:27 UTC 2012 
State-Changed-Why:  
What we really want is for PATCHDIR to go away completely, 
so any use of it needs to be replaced with FILESDIR both 
in the framework and in all ports, and probably ran through 
a few -exps.  Are you interested in reworking it that way? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 

From: Chris Rees <crees@FreeBSD.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/159970: [PATCH] bsd.port.mk Deprecate using PATCHDIR and
 use FILESDIR instead.
Date: Sat, 12 May 2012 07:39:47 +0100

 Sure, I'll have a go.  Shouldn't be too difficult (tm)!
 
 Chris
Responsible-Changed-From-To: portmgr->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Tue May 15 16:39:45 UTC 2012 
Responsible-Changed-Why:  
Requires better patch :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 
Responsible-Changed-From-To: crees->portmgr 
Responsible-Changed-By: crees 
Responsible-Changed-When: Wed May 30 17:15:07 UTC 2012 
Responsible-Changed-Why:  
http://www.bayofrum.net/~crees/patches/patchdir-filesdir.diff 

Should be OK-- PHP appears to be the biggest 'offender', but the 
maintainer doesn't see any problems. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 
State-Changed-From-To: feedback->open 
State-Changed-By: crees 
State-Changed-When: Sun Jul 1 16:54:49 UTC 2012 
State-Changed-Why:  
Oops, shouldn't be feedback! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159970 
>Unformatted:
