summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorreed <reed>2005-11-29 22:18:38 +0000
committerreed <reed>2005-11-29 22:18:38 +0000
commit3ad7bc5d4dd0c4afd32f5289587174e447c3703b (patch)
tree3d3cedd72c9e4cf569e6066c995cca89c82786d4 /mk/bsd.pkg.mk
parentf0e943df9114ddd713355c9db6e0ef9aa31bd244 (diff)
downloadpkgsrc-3ad7bc5d4dd0c4afd32f5289587174e447c3703b.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 \