summaryrefslogtreecommitdiff
path: root/mk/plist/plist.mk
diff options
context:
space:
mode:
authorheinz <heinz>2007-05-28 13:54:25 +0000
committerheinz <heinz>2007-05-28 13:54:25 +0000
commitfb50ba4b572f855c0ac7adda77fa029cdf6db455 (patch)
treebdaf2bf0af2d1208096d3d067995d414f0ca057b /mk/plist/plist.mk
parenta3b8e1c586d81da57369cee0de54fb05b3518ad0 (diff)
downloadpkgsrc-fb50ba4b572f855c0ac7adda77fa029cdf6db455.tar.gz
In order to avoid incorrect information about needed shared libraries in
+BUILD_INFO we must ensure that we only test valid lines from PLIST and not lines like "@unexec /bin/rmdir..." where "/bin/rmdir" is not a part of the resulting package. To achieve this, a stripped version of PLIST, called _PLIST_NOKEYWORDS, is introduced.
Diffstat (limited to 'mk/plist/plist.mk')
-rw-r--r--mk/plist/plist.mk19
1 files changed, 17 insertions, 2 deletions
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index 1448cdb8fbd..f51f73da1ec 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.22 2007/04/19 23:13:42 tnn Exp $
+# $NetBSD: plist.mk,v 1.23 2007/05/28 13:54:25 heinz Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -64,6 +64,7 @@ PLIST_SRC+= ${PKGDIR}/PLIST.common_end
# This is the path to the generated PLIST file.
PLIST= ${WRKDIR}/.PLIST
+_PLIST_NOKEYWORDS=${PLIST}.nokeywords
######################################################################
@@ -229,7 +230,7 @@ _GENERATE_PLIST= ${_SET_OWNER_GROUP}; \
.endif
.PHONY: plist
-plist: ${PLIST}
+plist: ${PLIST} ${_PLIST_NOKEYWORDS}
.if ${PLIST_TYPE} == "static"
${PLIST}: ${PLIST_SRC}
@@ -242,6 +243,20 @@ ${PLIST}:
${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_SHLIB_AWK} \
> ${.TARGET}
+# for list of keywords see pkg_create(1)
+${_PLIST_NOKEYWORDS}: ${PLIST}
+ ${_PKG_SILENT}${_PKG_DEBUG} ${AWK} < ${PLIST} > ${.TARGET} ' \
+ BEGIN { \
+ FILTER="@("; \
+ FILTER=FILTER"cd|cwd|src|exec|unexec|mode|option";\
+ FILTER=FILTER"|owner|group|comment|ignore"; \
+ FILTER=FILTER"|ignore_inst|name|dirrm|mtree"; \
+ FILTER=FILTER"|display|pkgdep|blddep|pkgcfl"; \
+ FILTER=FILTER")[[:space:]]"; \
+ }; \
+ $$0 ~ FILTER { next }; \
+ { print }'
+
.if defined(INFO_FILES)
INFO_FILES_cmd= \
${CAT} ${PLIST} | \