From owner-freebsd-ports@FreeBSD.ORG Mon Dec 4 20:17:09 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8378616A4B3 for ; Mon, 4 Dec 2006 20:17:09 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id C406A43CBC for ; Mon, 4 Dec 2006 20:16:14 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin05-en2 [10.13.10.150]) by smtpout.mac.com (Xserve/8.12.11/smtpout16/MantshX 4.0) with ESMTP id kB4KGkH4026610; Mon, 4 Dec 2006 12:16:47 -0800 (PST) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin05/MantshX 4.0) with ESMTP id kB4KGhLa026734; Mon, 4 Dec 2006 12:16:44 -0800 (PST) In-Reply-To: <45747E97.6040505@locolomo.org> References: <45747E97.6040505@locolomo.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <71302299-2AA0-4D1E-8D6A-EBE7DE81C98F@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Mon, 4 Dec 2006 12:16:42 -0800 To: Erik Norgaard X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: ports@freebsd.org Subject: Re: Newbie creating a port: tracing dependencies X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2006 20:17:09 -0000 On Dec 4, 2006, at 12:01 PM, Erik Norgaard wrote: > So I was wondering, how do I figure out direct dependencies? And > how do I figure out whether these should be LIB_DEPENDS, > BUILD_DEPENDS or RUN_DEPENDS or some other? The fine documentation in the Porters Handbook discusses this: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ makefile-depend.html > Is there a trick to trace the dependencies, and figure out which > port provides that dependency? - except for building on a clean > machine and install stuff until things work? You can use pkg_which to tell you which port a given file in part of; so, for example, if your port creates an executable called "foo", run "ldd foo" and see which libraries it links against; the ones in /usr/ local/lib almost certainly should be listed as LIB_DEPENDS, for example. However, there is no real substitute for paying attention to the documentation of the project and/or the GNU autoconfig (ie ./ configure file) or similar mechanism used to test for and link against optional dependencies. -- -Chuck