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

Tabitha McNerney tabithamc at gmail.com
Mon Jun 9 09:23:37 PDT 2008


On 6/6/08, Ryan Schmidt <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.

Thanks,

T.M.


> Hmmm ... the repeat of the library dependency libogg looks to be incorrect.
>>> Also, the first instance of the libogg dependency is preceded by "lib:"
>>> but
>>> shouldn't that be "port:" instead?
>>>
>>
>> This is not an error, but a different type of dependency. A "port:foo"
>> dependency means "install the port named 'foo'", whereas "lib:foo:bar"
>> means "check if the library 'foo' is present, and if not, install the
>> port named 'bar'". You can also use 'bin' or 'path' instead of 'lib' to
>> make the port installation conditional on the absence of executables and
>> arbitrary files, respectively.
>>
>> This is only mentioned in passing in the guide:
>> <http://guide.macports.org/#reference.dependencies.types>. It's
>> documented a little better in the portfile(7) manual.
>>
>> Most of the time dependencies should be of the port: variety, but
>> sometimes it is better/easier to use software that Apple ships with OS
>> X, a common example being X11. You'll see lib:libX11.6:XFree86 in a lot
>> of portfiles.
>>
>
> In the case of the speex port, the dependency should be changed to
> "port:libogg". This port probably dates from a time before MacPorts had
> "port:"-style dependencies. I changed the dependency for speex in r37416.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080609/f9d9aaa1/attachment.htm 


More information about the macports-users mailing list