summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant>2003-08-22 13:32:40 +0000
committergrant <grant>2003-08-22 13:32:40 +0000
commit56f7d36cab97235fde8ccb0f0ac4899d2ad17c72 (patch)
treee477892e887a7f592687966d09c46844f1ffa72a /mk
parent0deefc16f06a2fcd3e067dcdfa927d33d23bfd66 (diff)
downloadpkgsrc-56f7d36cab97235fde8ccb0f0ac4899d2ad17c72.tar.gz
in check-shlibs, throw away warning from `type ldd' and only attempt
to run ldd if it is executable. fixes bug where binaries just installed would be run (!) and the install process possibly "hang" on Darwin because Darwin has no ldd!
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk28
1 files changed, 15 insertions, 13 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 94baa77f2a8..02a24be040d 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1239 2003/08/16 08:50:17 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1240 2003/08/22 13:32:40 grant Exp $
#
# This file is in the public domain.
#
@@ -2670,20 +2670,22 @@ check-shlibs:
shlibs=""; \
fi; \
if [ X${LDD} = X ]; then \
- ldd=`${TYPE} ldd | ${AWK} '{ print $$NF }'`; \
+ ldd=`${TYPE} ldd 2>/dev/null | ${AWK} '{ print $$NF }'`;\
else \
ldd="${LDD}"; \
fi; \
- for i in $${bins} $${shlibs}; do \
- err=`{ $$ldd $$i 2>&1 || ${TRUE}; } | { ${GREP} "not found" || ${TRUE}; }`; \
- if [ "${PKG_VERBOSE}" != "" ]; then \
- ${ECHO} "$$ldd $$i"; \
- fi; \
- if [ "$$err" != "" ]; then \
- ${ECHO} "$$i: $$err"; \
- error=1; \
- fi; \
- done; \
+ if [ -x "$$ldd" ]; then \
+ for i in $${bins} $${shlibs}; do \
+ err=`{ $$ldd $$i 2>&1 || ${TRUE}; } | { ${GREP} "not found" || ${TRUE}; }`; \
+ if [ "${PKG_VERBOSE}" != "" ]; then \
+ ${ECHO} "$$ldd $$i"; \
+ fi; \
+ if [ "$$err" != "" ]; then \
+ ${ECHO} "$$i: $$err"; \
+ error=1; \
+ fi; \
+ done; \
+ fi; \
if [ "$$error" = 1 ]; then \
${ECHO} "*** The above programs/libs will not find the listed shared libraries"; \
${ECHO} " at runtime. Please fix the package (add -Wl,-R.../lib in the right places)!"; \
@@ -4327,7 +4329,7 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
${ECHO} "PROVIDES=$$i" >> ${BUILD_INFO_FILE}; \
done; \
case "${LDD}" in \
- "") ldd=`${TYPE} ldd | ${AWK} '{ print $$NF }'`;; \
+ "") ldd=`${TYPE} ldd 2>/dev/null | ${AWK} '{ print $$NF }'`;; \
*) ldd="${LDD}"; \
esac; \
if ${TEST} "$$bins" != "" -o "$$libs" != ""; then \