From owner-svn-ports-all@freebsd.org Thu Sep 8 14:13:00 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02FD3BD0B3F; Thu, 8 Sep 2016 14:13:00 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9790B51; Thu, 8 Sep 2016 14:12:59 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u88ECxET067642; Thu, 8 Sep 2016 14:12:59 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u88ECxNN067641; Thu, 8 Sep 2016 14:12:59 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201609081412.u88ECxNN067641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 8 Sep 2016 14:12:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r421555 - head/Mk/Scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 14:13:00 -0000 Author: mat Date: Thu Sep 8 14:12:58 2016 New Revision: 421555 URL: https://svnweb.freebsd.org/changeset/ports/421555 Log: Provide a standard way to look up for executables and shared libraries. PR: 211146 Submitted by: yuri rawbw com Sponsored by: Absolight Modified: head/Mk/Scripts/qa.sh (contents, props changed) Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Thu Sep 8 14:12:55 2016 (r421554) +++ head/Mk/Scripts/qa.sh Thu Sep 8 14:12:58 2016 (r421555) @@ -20,6 +20,10 @@ err() { echo "Error: $@" >&2 } +list_stagedir_elfs() { + cd ${STAGEDIR} && find -s . -type f \( -perm +111 -o -name '*.so*' \) "$@" +} + shebangonefile() { local f interp rc @@ -115,9 +119,7 @@ baselibs() { ;; esac done <<-EOF - $(find ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin \ - ${STAGEDIR}${PREFIX}/lib ${STAGEDIR}${PREFIX}/libexec \ - -type f -exec readelf -d {} + 2>/dev/null) + $(list_stagedir_elfs -exec readelf -d {} + 2>/dev/null) EOF if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then warn "you need USES=ssl" @@ -660,7 +662,7 @@ proxydeps() { !/^\// && section<=1 && ($3 ~ "^'${PREFIX}'" || $3 ~ "^'${LOCALBASE}'") {print $3}') EOT done <<-EOT - $(cd ${STAGEDIR} && find -s . -type f \( -perm +111 -o -name '*.so*' \) | \ + $(list_stagedir_elfs | \ file -F $'\1' -f - | \ grep -a 'ELF.*FreeBSD.*dynamically linked' | \ cut -f 1 -d $'\1'| \