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:
@${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