Date: Sun, 8 Sep 2013 19:28:29 +0000 (UTC) From: Maxim Sobolev <sobomax@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326768 - head/Mk Message-ID: <201309081928.r88JSTC7003755@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sobomax Date: Sun Sep 8 19:28:29 2013 New Revision: 326768 URL: http://svnweb.freebsd.org/changeset/ports/326768 Log: 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) Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Sun Sep 8 18:32:38 2013 (r326767) +++ head/Mk/bsd.port.mk Sun Sep 8 19:28:29 2013 (r326768) @@ -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"; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309081928.r88JSTC7003755>