summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2013-09-08 19:28:29 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2013-09-08 19:28:29 +0000
commit355a219c79b1d43a26dc1f3301e1483f200cdc6a (patch)
tree7329673b98c829621fdd6599697a8abbfe94b0da /Mk
parent- Update to 1.2.8 (diff)
Don't rely on `file -L' to follow symlinks and find type of the file
they point to. It only works if symlink points to the file directly and fails if there are more than one level of symlinks. Use realpath(1) to drill out the actual path to the shared lib and feed it to file(1) then. This fixes issue with cerain LIB_DEPENDS, such as databases/db42. Approved by: portmgr (bapt)
Notes
Notes: svn path=/head/; revision=326768
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 89ddefc44634..88b515993409 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -5049,7 +5049,8 @@ lib-depends:
for libdir in $$dirs; do \
test -f $${libdir}/$${lib} || continue; \
if [ -x /usr/bin/file ]; then \
- [ `file -b -L --mime-type $${libdir}/$${lib}` = "application/x-sharedlib" ] || continue ; \
+ _LIB_FILE=`realpath $${libdir}/$${lib}`; \
+ [ `file -b -L --mime-type $${_LIB_FILE}` = "application/x-sharedlib" ] || continue ; \
fi ; \
found=1 ; \
${ECHO_MSG} " - found"; \