From 355a219c79b1d43a26dc1f3301e1483f200cdc6a Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Sun, 8 Sep 2013 19:28:29 +0000 Subject: 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) --- Mk/bsd.port.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Mk/bsd.port.mk') 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"; \ -- cgit v1.2.3