Ports and their dependencies (run deps and also versioning questions)

Joshua Root jmr at macports.org
Mon Jun 9 10:02:55 PDT 2008


Tabitha McNerney wrote:
> 
> On 6/6/08, *Ryan Schmidt* <ryandesign at macports.org 
> <mailto:ryandesign at macports.org>> wrote:
> 
> 
>     On Jun 6, 2008, at 06:06, Joshua Root wrote:
> 
>         Tabitha McNerney wrote:
> 
>             But, then my script ran into this specific problem:
> 
>             $ port info --depends_lib speex @1.0.5
> 
>             -->
> 
>             depends_lib: lib:libogg:libogg
> 
> 
> Ryan, Josh, et al:
> 
> This may sound like a dumb question, but what would be a suggested way 
> to discover if Apple / Mac OS X is provided the same or similar library 
> for a non-port library dependency of type lib: (e.g. depends_lib: 
> lib:libogg)? In the case of a bin: type I can easily do something like:
> 
> $ which perl
> 
> Easy as pie. Is there a command similar to "which" that can be passed 
> the name of a library from a MacPorts file such as "libogg" written 
> above? A program such as libtool? Which would come back with info 
> definitively yes or no about the library name collision? I suppose I 
> could also dig for it in /usr/lib but it would be nice to have something 
> like "which" for libraries as part of my MacPorts quality control script.

`locate ${libname}.dylib` would work I guess, though you'd probably want 
to filter the output to contain only the paths where MacPorts will 
search. Usually that list is as follows:

/Library/Frameworks /Network/Library/Frameworks 
/System/Library/Frameworks /lib /usr/lib /usr/X11R6/lib /usr/X11/lib 
${prefix}/lib

However, this can be modified by the DYLD_FRAMEWORK_PATH, 
DYLD_FALLBACK_FRAMEWORK_PATH, DYLD_LIBRARY_PATH, and 
DYLD_FALLBACK_LIBRARY_PATH environment variables.

- Josh


More information about the macports-users mailing list