pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Simplify by using a for loop instead of "set -- ......
details: https://anonhg.NetBSD.org/pkgsrc/rev/f38fd83334ee
branches: trunk
changeset: 493970:f38fd83334ee
user: jlam <jlam%pkgsrc.org@localhost>
date: Tue May 17 19:08:30 2005 +0000
description:
Simplify by using a for loop instead of "set -- ...; while ... done".
Also, rename "fuzz" to "fuzz_flags" to clarify that it's a set of flags
and should be used unquoted. Output from rilligd :)
diffstat:
mk/bsd.pkg.patch.mk | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 0414e8598561 -r f38fd83334ee mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk Tue May 17 19:06:21 2005 +0000
+++ b/mk/bsd.pkg.patch.mk Tue May 17 19:08:30 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.patch.mk,v 1.7 2005/05/17 06:31:00 jlam Exp $
+# $NetBSD: bsd.pkg.patch.mk,v 1.8 2005/05/17 19:08:30 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the "patch" phase.
@@ -212,10 +212,9 @@
apply-pkgsrc-patches:
@${ECHO_MSG} "${_PKGSRC_IN}> Applying pkgsrc patches for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG} \
- set -- `${ECHO} ${_PKGSRC_PATCHES:Q}`; \
fail=; \
- while ${TEST} $$# -gt 0; do \
- i="$$1"; shift; \
+ patches=${_PKGSRC_PATCHES:Q}; \
+ for i in $$patches; do \
${TEST} -f "$$i" || continue; \
case "$$i" in \
*.orig|*.rej|*~) \
@@ -260,8 +259,10 @@
esac; \
${ECHO_PATCH_MSG} "${_PKGSRC_IN}> Applying pkgsrc patch $$i"; \
fuzz=; \
- ${PATCH} -v >/dev/null 2>&1 && fuzz=${PATCH_FUZZ_FACTOR:Q}; \
- ${PATCH} $$fuzz ${PATCH_ARGS} < $$i || \
+ if ${PATCH} -v >/dev/null 2>&1; then \
+ fuzz_flags=${PATCH_FUZZ_FACTOR:Q}; \
+ fi; \
+ ${PATCH} $$fuzz_flags ${PATCH_ARGS} < $$i || \
${ECHO_MSG} "Patch $$i failed"; \
${ECHO} "$$i" >> ${_PATCH_COOKIE_TMP:Q}; \
done; \
Home |
Main Index |
Thread Index |
Old Index