From owner-svn-ports-head@FreeBSD.ORG Sun Sep 8 19:28:30 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 107AB2D7; Sun, 8 Sep 2013 19:28:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F13E92CE0; Sun, 8 Sep 2013 19:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r88JST2v003756; Sun, 8 Sep 2013 19:28:29 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r88JSTC7003755; Sun, 8 Sep 2013 19:28:29 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201309081928.r88JSTC7003755@svn.freebsd.org> From: Maxim Sobolev Date: Sun, 8 Sep 2013 19:28:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326768 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2013 19:28:30 -0000 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"; \