Patches go into PATCHDIR, not FILESDIR.

Pointy hat to:	Everybody that looked at the code review, me included.
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2014-12-10 15:10:40 +00:00
parent 670d53ad9e
commit 7a6669d8bc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=374466

View file

@ -1149,7 +1149,7 @@ STRIPBIN= ${STRIP_CMD}
.else .else
# Look for files named "*.orig" under ${PATCH_WRKSRC} and (re-)generate # Look for files named "*.orig" under ${PATCH_WRKSRC} and (re-)generate
# ${FILESDIR}/patch-* files from them. By popular demand, we currently # ${PATCHDIR}/patch-* files from them. By popular demand, we currently
# use '_' (underscore) to replace path separators in patch file names. # use '_' (underscore) to replace path separators in patch file names.
# #
# If a file name happens to contain character which is also a separator # If a file name happens to contain character which is also a separator
@ -1162,7 +1162,7 @@ STRIPBIN= ${STRIP_CMD}
.if !target(makepatch) .if !target(makepatch)
PATCH_PATH_SEPARATOR= _ PATCH_PATH_SEPARATOR= _
makepatch: makepatch:
@${MKDIR} ${FILESDIR} @${MKDIR} ${PATCHDIR}
@(cd ${PATCH_WRKSRC}; \ @(cd ${PATCH_WRKSRC}; \
for f in `${FIND} -s . -type f -name '*.orig'`; do \ for f in `${FIND} -s . -type f -name '*.orig'`; do \
ORIG=$${f#./}; \ ORIG=$${f#./}; \
@ -1171,14 +1171,14 @@ makepatch:
! for _lps in `${ECHO} _ - + | ${SED} -e \ ! for _lps in `${ECHO} _ - + | ${SED} -e \
's|${PATCH_PATH_SEPARATOR}|__|'`; do \ 's|${PATCH_PATH_SEPARATOR}|__|'`; do \
PATCH=`${ECHO} $${NEW} | ${SED} -e "s|/|$${_lps}|g"`; \ PATCH=`${ECHO} $${NEW} | ${SED} -e "s|/|$${_lps}|g"`; \
test -f "${FILESDIR}/patch-$${PATCH}" && break; \ test -f "${PATCHDIR}/patch-$${PATCH}" && break; \
done || ${ECHO} $${_SEEN} | ${GREP} -q /$${PATCH} && { \ done || ${ECHO} $${_SEEN} | ${GREP} -q /$${PATCH} && { \
PATCH=`${ECHO} $${NEW} | ${SED} -e \ PATCH=`${ECHO} $${NEW} | ${SED} -e \
's|${PATCH_PATH_SEPARATOR}|&&|g' -e \ 's|${PATCH_PATH_SEPARATOR}|&&|g' -e \
's|/|${PATCH_PATH_SEPARATOR}|g'`; \ 's|/|${PATCH_PATH_SEPARATOR}|g'`; \
_SEEN=$${_SEEN}/$${PATCH}; \ _SEEN=$${_SEEN}/$${PATCH}; \
}; \ }; \
OUT=${FILESDIR}/patch-$${PATCH}; \ OUT=${PATCHDIR}/patch-$${PATCH}; \
${ECHO} ${DIFF} -udp $${ORIG} $${NEW} '>' $${OUT}; \ ${ECHO} ${DIFF} -udp $${ORIG} $${NEW} '>' $${OUT}; \
TZ=UTC ${DIFF} -udp $${ORIG} $${NEW} | ${SED} -e \ TZ=UTC ${DIFF} -udp $${ORIG} $${NEW} | ${SED} -e \
'/^---/s|\.[0-9]* +0000$$| UTC|' -e \ '/^---/s|\.[0-9]* +0000$$| UTC|' -e \