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

Tabitha McNerney tabithamc at gmail.com
Fri May 30 10:51:12 PDT 2008


Hello all (again) --

I just answered one of my questions ... example of a port with runtime
dependencies is docbook-xml-4.2

I'd be interested if anyone has any commentary on my other observations.

Thanks

T.M.

On 5/30/08, Tabitha McNerney <tabithamc at gmail.com> wrote:
>
> Hello all --
>
> I'm writing a little Ruby script that parses through my list of installed
> MacPorts. When I find a port that is installed, the script will
> automatically run the port command to get its dependencies as in:
>
> $ port deps Xft2 @2.1.12_0
>> Xft2 has build dependencies on:
>>     pkgconfig
>> Xft2 has library dependencies on:
>>     xorg-xproto
>>     zlib
>>     xrender
>>     freetype
>>     fontconfig
>>     expat
>>
>
>
> The MacPorts documentation says there are three types of dependencies:
> build, library and run. In the example above of Xft2, we see build and
> library dependencies listed out on the command line.  I have yet to run
> across a port that also say it has run dependencies. Are there any example
> of such ports? I just want to make sure that I am parsing the output
> correctly so a test example would be helpful.
>
> Also, on a related note, let's say we run this command, whereby we specify
> the precise version of Xft2 (2.1.12_0):
>
> $ port deps Xft2 @2.1.12_0
>>
>
> (since we might have installed more than one version of the Xft2 port but
> only one of which is the active port). I observe that, even when specifying
> the exact version of a port, its dependencies are still dumped out with
> their general names, rather than both their names and version numbers. Hmmm
> ... so what if we have two Xft2 version on our system, such as: 2.1.12_0
> and 2.2 (I'm making this up for demonstration purposes only) and let's say
> that the active version of Xft2 is 2.1.12_0. Now, what if Xft2 2.1.12_0 has
> a library dependency of zlib 1.2.3_1, but Xft2 2.2 has a library dependency
> of zlib 1.3 (again I'm making this up for demo purposes). Do we have any way
> of finding out? Even the Portfiles themselves don't specify dependency
> versions, for example from the Xft2 port file:
>
> depends_lib \
>>         port:xorg-xproto \
>>         port:zlib \
>>         port:xrender \
>>         port:freetype \
>>         port:fontconfig \
>>         port:expat
>>
>
>
> Is this purely a matter of the active port (Xft2) will only successfully
> install (and capable of being activated) based on whatever versions are of
> its (library, build, run) dependencies at the moment it is installed?
>
> Thank you,
>
> T.M.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080530/b5941f71/attachment.htm 


More information about the macports-users mailing list