Date: Thu, 13 Jun 2013 06:43:08 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r320737 - head/Mk Message-ID: <201306130643.r5D6h8wP033990@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Thu Jun 13 06:43:08 2013 New Revision: 320737 URL: http://svnweb.freebsd.org/changeset/ports/320737 Log: 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 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Thu Jun 13 06:36:05 2013 (r320736) +++ head/Mk/bsd.port.mk Thu Jun 13 06:43:08 2013 (r320737) @@ -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="" ; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306130643.r5D6h8wP033990>