aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2013-09-09 03:28:29 +0800
committersobomax <sobomax@FreeBSD.org>2013-09-09 03:28:29 +0800
commit858ed1abc1a2e04c7fd1747e2151e8fa63e2a6ec (patch)
tree7329673b98c829621fdd6599697a8abbfe94b0da
parentb4d60f5eb4c0b4686e7de63fb184928cec46a396 (diff)
downloadfreebsd-ports-gnome-858ed1abc1a2e04c7fd1747e2151e8fa63e2a6ec.tar.gz
freebsd-ports-gnome-858ed1abc1a2e04c7fd1747e2151e8fa63e2a6ec.tar.zst
freebsd-ports-gnome-858ed1abc1a2e04c7fd1747e2151e8fa63e2a6ec.zip
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)
-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"; \