summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorreed <reed@pkgsrc.org>2005-11-29 22:18:38 +0000
committerreed <reed@pkgsrc.org>2005-11-29 22:18:38 +0000
commit31d6bf1215c7580768669ca0f45a546b0f13bf7c (patch)
tree3d3cedd72c9e4cf569e6066c995cca89c82786d4 /mk/bsd.pkg.mk
parent10aa3770550b1a09bd7499b069511ff2c4af2176 (diff)
downloadpkgsrc-31d6bf1215c7580768669ca0f45a546b0f13bf7c.tar.gz
Fix REQUIRES= when ldd output has wrong number of fields.
(This also fixes problem where on some Linux systems, ldd outputs linux-gate.so.1 entry without corresponding library.) This was noticed on Linux. This was discussed and okayed on the tech-pkg list in February, 2002. I have been using this on NetBSD and Linux since then. (Also just tested on DragonFly.)
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 346e61b761b..19584186e41 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1768 2005/11/23 18:27:13 erh Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1769 2005/11/29 22:18:38 reed Exp $
#
# This file is in the public domain.
#
@@ -4294,7 +4294,7 @@ post-install-fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
ELF) bins=`${SETENV} PREFIX=${PREFIX} ${AWK} '/^(bin|sbin|libexec)\// { print ENVIRON["PREFIX"] "/" $$0 }' ${PLIST} || ${TRUE}`; \
libs=`${SETENV} PREFIX=${PREFIX} ${AWK} '/^lib\/lib.*\.so\.[0-9]+$$/ { print ENVIRON["PREFIX"] "/" $$0 }' ${PLIST} || ${TRUE}`; \
if ${TEST} "$$bins" != "" -o "$$libs" != ""; then \
- requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} 'NF == 3 { print $$3 }' | ${SORT} -u`; \
+ requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '$$2 == "=>" && $$3 ~ "/" { print $$3 }' | ${SORT} -u`; \
fi; \
linklibs=`${SETENV} PREFIX=${PREFIX} ${AWK} '/^[^@].*\.so\.[0-9\.]+$$/ { print ENVIRON["PREFIX"] "/" $$0 }' ${PLIST} || ${TRUE}`; \
for i in $${linklibs}; do \