ports/159970: [PATCH] bsd.port.mk Deprecate using PATCHDIR and use FILESDIR instead.

Chris Rees crees at zeus.bayofrum.net
Sun Aug 21 12:40:11 UTC 2011


>Number:         159970
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk Deprecate using PATCHDIR and use FILESDIR instead.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>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:
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list