summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>1999-10-13 01:41:10 +0000
committerhubertf <hubertf@pkgsrc.org>1999-10-13 01:41:10 +0000
commitc91a2b3f27e5db30c9ad170693a12323c865fb38 (patch)
treef332db9ac3b0088d887772fb3dd387e3359099b4 /mk
parent45ef1508d3d4f402cff80f457acae63741d4c8a6 (diff)
downloadpkgsrc-c91a2b3f27e5db30c9ad170693a12323c865fb38.tar.gz
When appending some files to PLIST for shared lib handling, escape any
characters special to REs (e.g. libncurses++.so). Fixes PR 8612 by SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk16
1 files changed, 13 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index c800bb25938..88e2cceee9b 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.353 1999/10/07 16:04:57 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.354 1999/10/13 01:41:10 hubertf Exp $
#
# This file is in the public domain.
#
@@ -1364,14 +1364,24 @@ root-install:
so0=`${ECHO} $$so1 | ${SED} -e 's|\.[0-9]*$$||'`; \
cnt=`${EGREP} -c -x "$$so0" ${PLIST} || ${TRUE}`; \
if [ $$cnt -eq 0 ]; then \
- ${AWK} "{sub(\"^$$so3$$\",\"$$so3\n$$so0\"); print}" ${PLIST} > ${PLIST}.tmp && ${MV} ${PLIST}.tmp ${PLIST}; \
+ ${AWK} "{so3re=\"^$$so3$$\"; \
+ gsub(\"\\+\",\"\\\\+\", so3re); \
+ gsub(\"\\*\",\"\\\\*\", so3re); \
+ sub(so3re,\"$$so3\n$$so0\"); \
+ print}" \
+ <${PLIST} > ${PLIST}.tmp && ${MV} ${PLIST}.tmp ${PLIST}; \
${ECHO_MSG} "${LN} -s $$so2 ${PREFIX}/$$so0"; \
${RM} -f ${PREFIX}/$$so0; \
${LN} -s $$so2 ${PREFIX}/$$so0; \
fi; \
cnt=`${EGREP} -c -x "$$so1" ${PLIST} || ${TRUE}`; \
if [ $$cnt -eq 0 ]; then \
- ${AWK} "{sub(\"^$$so3$$\",\"$$so3\n$$so1\"); print}" ${PLIST} > ${PLIST}.tmp && ${MV} ${PLIST}.tmp ${PLIST}; \
+ ${AWK} "{so3re=\"^$$so3$$\"; \
+ gsub(\"\\+\",\"\\\\+\", so3re); \
+ gsub(\"\\*\",\"\\\\*\", so3re); \
+ sub(so3re,\"$$so3\n$$so1\"); \
+ print}" \
+ <${PLIST} > ${PLIST}.tmp && ${MV} ${PLIST}.tmp ${PLIST}; \
${ECHO_MSG} "${LN} -s $$so2 ${PREFIX}/$$so1"; \
${RM} -f ${PREFIX}/$$so1; \
${LN} -s $$so2 ${PREFIX}/$$so1; \