summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2002-03-12 15:40:24 +0000
committeragc <agc@pkgsrc.org>2002-03-12 15:40:24 +0000
commit93aca3b1ec92b241bc89244664256f1f5d3d72d8 (patch)
tree191700049802ac00ae32fd6624549fa42f193392
parent1ad02f09c4d07dbfed962c0363f05a094ca4a8d5 (diff)
downloadpkgsrc-93aca3b1ec92b241bc89244664256f1f5d3d72d8.tar.gz
Fix PR 15755 from Simon Burge (simonb@wasabisystems.com) properly.
When constructing the build version information, avoid problems when there is a filename with an embedded space in the directory. With thanks to Stoned Elipot for the practical help.
-rw-r--r--mk/bsd.pkg.mk22
1 files changed, 9 insertions, 13 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 23fdaf8bfbc..95fa5d3b65f 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.944 2002/03/10 17:15:29 fredb Exp $
+# $NetBSD: bsd.pkg.mk,v 1.945 2002/03/12 15:40:24 agc Exp $
#
# This file is in the public domain.
#
@@ -3669,17 +3669,16 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${BUILD_VERSION_FILE} ${BUILD_INFO_FILE}
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${SIZE_PKG_FILE} ${SIZE_ALL_FILE}
${_PKG_SILENT}${_PKG_DEBUG} \
- if [ -d ${FILESDIR} ]; then \
- files='${FILESDIR}/*'; \
- else \
- files=""; \
- fi; \
- ${GREP} '\$$NetBSD' $$files ${PKGDIR}/* 2> /dev/null | ${SED} -e 's|^${_PKGSRCDIR}/||' > ${BUILD_VERSION_FILE}; \
files=""; \
+ for f in ${FILESDIR}/* ${PKGDIR}/*; do \
+ if [ -f "$$f" ]; then \
+ files="$$files \"$$f\""; \
+ fi; \
+ done; \
if [ -f ${DISTINFO_FILE} ]; then \
for f in `${AWK} 'NF == 4 && $$3 == "=" { gsub("[()]", "", $$2); print $$2 }' < ${DISTINFO_FILE}`; do \
if [ -f ${PATCHDIR}/$$f ]; then \
- files="$$files ${PATCHDIR}/$$f"; \
+ files="$$files \"${PATCHDIR}/$$f\""; \
fi; \
done; \
fi; \
@@ -3688,14 +3687,11 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
case $$f in \
*.orig|*.rej|*~) ;; \
${PATCHDIR}/patch-local-*) \
- files="$$files $$f" ;; \
+ files="$$files \"$$f\"" ;; \
esac; \
done; \
fi; \
- case "$$files" in \
- "") ;; \
- *) ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${_PKGSRCDIR}/||' >> ${BUILD_VERSION_FILE};; \
- esac
+ eval ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${_PKGSRCDIR}/||' > ${BUILD_VERSION_FILE}
. for def in ${BUILD_DEFS}
@${ECHO} ${def}= ${${def}:Q} | ${SED} -e 's|^PATH=[^ ]*|PATH=...|' >> ${BUILD_INFO_FILE}
. endfor