Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2006 12:16:42 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Erik Norgaard <norgaard@locolomo.org>
Cc:        ports@freebsd.org
Subject:   Re: Newbie creating a port: tracing dependencies
Message-ID:  <71302299-2AA0-4D1E-8D6A-EBE7DE81C98F@mac.com>
In-Reply-To: <45747E97.6040505@locolomo.org>
References:  <45747E97.6040505@locolomo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71302299-2AA0-4D1E-8D6A-EBE7DE81C98F>