Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2014 17:18:12 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366904 - head/Mk
Message-ID:  <201409011718.s81HICYY046205@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409011718.s81HICYY046205>