pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/plist In order to avoid incorrect information about...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c2a660d81c2d
branches: trunk
changeset: 529229:c2a660d81c2d
user: heinz <heinz%pkgsrc.org@localhost>
date: Mon May 28 13:54:25 2007 +0000
description:
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:
mk/flavor/pkg/metadata.mk | 10 +++++-----
mk/plist/plist.mk | 19 +++++++++++++++++--
2 files changed, 22 insertions(+), 7 deletions(-)
diffs (83 lines):
diff -r 4e897677060a -r c2a660d81c2d mk/flavor/pkg/metadata.mk
--- a/mk/flavor/pkg/metadata.mk Mon May 28 13:21:26 2007 +0000
+++ b/mk/flavor/pkg/metadata.mk Mon May 28 13:54:25 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.21 2007/05/26 11:58:33 heinz Exp $
+# $NetBSD: metadata.mk,v 1.22 2007/05/28 13:54:25 heinz Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -61,14 +61,14 @@
"") ldd=`${TYPE} ldd 2>/dev/null | ${AWK} '{ print $$NF }'` ;; \
*) ldd=${LDD:Q} ;; \
esac; \
- bins=`${AWK} '/(^|\/)(bin|sbin|libexec)\// { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${PLIST}`; \
+ bins=`${AWK} '/(^|\/)(bin|sbin|libexec)\// { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
case ${OBJECT_FMT:Q}"" in \
ELF) \
- libs=`${AWK} '/(^|\/)lib\/lib.*\.so\.[0-9]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${PLIST}`; \
+ libs=`${AWK} '/(^|\/)lib\/lib.*\.so\.[0-9]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
if ${TEST} -n "$$bins" -o -n "$$libs"; then \
requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '$$2 == "=>" && $$3 ~ "/" { print $$3 }' | ${SORT} -u`; \
fi; \
- linklibs=`${AWK} '/[^@].*\.so\.[0-9\.]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 }' ${PLIST}`; \
+ linklibs=`${AWK} '/.*\.so\.[0-9\.]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}`; \
for i in $$linklibs; do \
if ${TEST} -r $$i -a ! -x $$i -a ! -h $$i; then \
${TEST} ${PKG_DEVELOPER:Uno:Q}"" = "no" || \
@@ -78,7 +78,7 @@
done; \
;; \
Mach-O) \
- libs=`${AWK} '/(^|\/)lib\/lib.*\.dylib/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${PLIST}`; \
+ libs=`${AWK} '/(^|\/)lib\/lib.*\.dylib/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
if ${TEST} "$$bins" != "" -o "$$libs" != ""; then \
requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '/compatibility version/ { print $$1 }' | ${SORT} -u`; \
fi; \
diff -r 4e897677060a -r c2a660d81c2d mk/plist/plist.mk
--- a/mk/plist/plist.mk Mon May 28 13:21:26 2007 +0000
+++ b/mk/plist/plist.mk Mon May 28 13:54:25 2007 +0000
@@ -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 @@
# This is the path to the generated PLIST file.
PLIST= ${WRKDIR}/.PLIST
+_PLIST_NOKEYWORDS=${PLIST}.nokeywords
######################################################################
@@ -229,7 +230,7 @@
.endif
.PHONY: plist
-plist: ${PLIST}
+plist: ${PLIST} ${_PLIST_NOKEYWORDS}
.if ${PLIST_TYPE} == "static"
${PLIST}: ${PLIST_SRC}
@@ -242,6 +243,20 @@
${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} | \
Home |
Main Index |
Thread Index |
Old Index