summaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-06-13 06:43:08 +0000
committerbapt <bapt@FreeBSD.org>2013-06-13 06:43:08 +0000
commit1cbd808fefe7babe82755627b25aa321fbf01fbb (patch)
tree37d33114e8adedfad21bb0864a363bf1134c4232 /Mk
parentdc9e3d575a410099c0d50e6399ebc33fa35d6094 (diff)
downloadFreeBSD-ports-1cbd808fefe7babe82755627b25aa321fbf01fbb.zip
FreeBSD-ports-1cbd808fefe7babe82755627b25aa321fbf01fbb.tar.gz
Fix make patch not stopping in case a patch does not apply cleanly with bmake.
bmake does not run shell with set -e causing the difference between both fmake and bmake in the area. While here clean up a bit the syntax. Add support for xz'ed patches for EXTRA PATCHES Discussed with: sjg
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk44
1 files changed, 22 insertions, 22 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 9ba69b3..8bff171 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3591,31 +3591,31 @@ patch-dos2unix:
do-patch:
.if defined(PATCHFILES)
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}"
- @(cd ${_DISTDIR}; \
- for i in ${_PATCHFILES}; do \
- if [ ${PATCH_DEBUG_TMP} = yes ]; then \
- ${ECHO_MSG} "===> Applying distribution patch $$i" ; \
- fi; \
- case $$i in \
- *.Z|*.gz) \
- ${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \
- ;; \
- *.bz2) \
- ${BZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \
- ;; \
- *) \
- ${PATCH} ${PATCH_DIST_ARGS} < $$i; \
- ;; \
- esac; \
- done)
+.for i in ${_PATCHFILES}
+. if defined(PATCH_DEBUG_TMP) && ${PATCH_DEBUG_TMP} == yes
+ @${ECHO_MSG} "===> Applying distribution patch $$i"
+. endif
+ @case $i in \
+ *.Z|*.gz) ${GZCAT} $i ;; \
+ *.bz2) ${BZCAT} $i ;; \
+ *.xz) ${XZCAT} $i ;; \
+ *) ${CAT} $i ;; \
+ esac | ${PATCH} ${PATCH_DIST_ARGS}
+. endfor
.endif
.if defined(EXTRA_PATCHES)
- @for i in ${EXTRA_PATCHES}; do \
- ${ECHO_MSG} "===> Applying extra patch $$i"; \
- ${PATCH} ${PATCH_ARGS} < $$i; \
- done
+. for i in ${EXTRA_PATCHES}
+ @${ECHO_MSG} "===> Applying extra patch $i" ; \
+ case $i in \
+ *.Z|*.gz) ${GZCAT} $i ;; \
+ *.bz2) ${BZCAT} $i ;; \
+ *.xz) ${XZCAT} $i ;; \
+ *) ${CAT} $i ;; \
+ esac | ${PATCH} ${PATCH_DIST_ARGS}
+. endfor
.endif
- @if [ -d ${PATCHDIR} ]; then \
+ @set -e ;\
+ if [ -d ${PATCHDIR} ]; then \
if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \
PATCHES_APPLIED="" ; \
OpenPOWER on IntegriCloud