From owner-freebsd-ports@FreeBSD.ORG Sun Feb 17 22:14:49 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8257E4AD for ; Sun, 17 Feb 2013 22:14:49 +0000 (UTC) (envelope-from bthcom@higonnet.net) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [IPv6:2a01:e0c:1:1599::11]) by mx1.freebsd.org (Postfix) with ESMTP id 0F08DABF for ; Sun, 17 Feb 2013 22:14:47 +0000 (UTC) Received: from freebsd.higonnet.net (unknown [82.238.41.134]) by smtp2-g21.free.fr (Postfix) with ESMTP id F39164B0076 for ; Sun, 17 Feb 2013 23:14:42 +0100 (CET) Received: from [192.168.3.57] (unknown [192.168.3.57]) by freebsd.higonnet.net (Postfix) with ESMTP id 1EED628424 for ; Sun, 17 Feb 2013 23:15:58 +0100 (CET) Message-ID: <51215656.1050800@higonnet.net> Date: Sun, 17 Feb 2013 23:14:46 +0100 From: Bernard Higonnet User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: FreeBSD Mailing List Subject: Re: Is there an easy way to find out which port loads which library? References: <51210EAD.3010009@higonnet.net> <20130217172125.GA63086@spectrum.skysmurf.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 22:14:49 -0000 On 17-Feb-13 22:56, Chris Rees wrote: > > On 17 Feb 2013 17:31, "A.J. 'Fonz' van Werven" > wrote: > > > > Bernard Higonnet wrote: > > > > > Is there a simple, direct, complete, and unequivocal way to find out > > > which port(s) install which libraries? > > > > Something like this perhaps? > > # grep libfoobar.so /usr/ports/*/*/pkg-plist > > Most shells won't allow an argument list that long. > > % find /usr/ports -depth 3 -name pkg-plist -exec grep libfoobar.so \{} \; > > has been shown to be faster than hacking around arg list limits with > echo | xargs. > > Unfortunately neither method works with automatically generated plists.... I did in fact bump into too lengthy an argument list. An alternative to your suggestion which worked for me was a for/do loop in bash. Thanks to both Bernard Higonnet