svn commit: r366904 - head/Mk

Antoine Brodin antoine at FreeBSD.org
Mon Sep 1 17:18:13 UTC 2014


Author: antoine
Date: Mon Sep  1 17:18:12 2014
New Revision: 366904
URL: http://svnweb.freebsd.org/changeset/ports/366904
QAT: https://qat.redports.org/buildarchive/r366904/

Log:
  Commit non bikeshed part of Differential Revision D582
  makepatch target improvement:
  - spurious ./ is removed from file names
  - timestamps are normalized
  
  Submitted by:	danfe
  With hat:	portmgr

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Sep  1 17:12:32 2014	(r366903)
+++ head/Mk/bsd.port.mk	Mon Sep  1 17:18:12 2014	(r366904)
@@ -1193,15 +1193,17 @@ STRIPBIN=	${STRIP_CMD}
 makepatch:
 	@${MKDIR} ${FILESDIR}
 	@(cd ${PATCH_WRKSRC}; \
-		for i in `find . -type f -name '*.orig'`; do \
-			ORG=$$i; \
-			NEW=$${i%.orig}; \
-			cmp -s $${ORG} $${NEW} && continue; \
-			OUT=${FILESDIR}`${ECHO} $${NEW} | \
-				${SED} -e 's|/|__|g' \
-					-e 's|^\.__|/patch-|'`; \
-			${ECHO} ${DIFF} -ud $${ORG} $${NEW} '>' $${OUT}; \
-			${DIFF} -ud $${ORG} $${NEW} > $${OUT} || ${TRUE}; \
+		for f in `${FIND} . -type f -name '*.orig'`; do \
+			ORIG=$${f#./}; \
+			NEW=$${ORIG%.orig}; \
+			cmp -s $${ORIG} $${NEW} && continue; \
+			PATCH=`${ECHO} $${NEW} | ${SED} -e 's|/|__|g'`; \
+			OUT=${FILESDIR}/patch-$${PATCH}; \
+			${ECHO} ${DIFF} -ud $${ORIG} $${NEW} '>' $${OUT}; \
+			TZ=UTC ${DIFF} -ud $${ORIG} $${NEW} | ${SED} -e \
+				'/^---/s|\.[0-9]* +0000$$| UTC|' -e \
+				'/^+++/s|\([[:blank:]][-0-9:.+]*\)*$$||' \
+					> $${OUT} || ${TRUE}; \
 		done \
 	)
 .endif


More information about the svn-ports-head mailing list