1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

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
This commit is contained in:
Antoine Brodin 2014-09-01 17:18:12 +00:00
parent a80c31a5dd
commit aef74890f5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366904

View File

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