How does dependency checking work?

markd at macports.org markd at macports.org
Wed May 16 20:40:45 PDT 2007


mark abney <maabney2 at yahoo.com> on Wednesday, May 16, 2007 at 6:13 PM
-0800 wrote:
>Thanks. I understand and agree with the policy of keeping as much
>within Macports as possible. My immediate undertaking was trying to
>modify the gnuplot portfile so that it does not require installing
>teTeX. From my still limited understanding, if a user already has tex
>installed then it shouldn't install tetex if the dependency in the
>portfile is of the form bin:tex:teTeX. Apparently this does not seem to
>be the case, and I don't really understand why. (I have Tex Live 2007
>installed and tex is definitely in my path). I think a reasonable case
>can be made for this form of dependency on teTeX, but, in any case, it
>doesn't work.

Also, you might consider that a variant can be used such that the default
behavios in to install MacPorts TeTex, but the variant looks for one in
bin:.  I can't say why bin:tex:teTex isn't working.  Could it be a case
sensitivity issue?  What if you specify it in lower case?  As a test, you
could also use path: like it is done in the apt Portfile:

path:${prefix}/bin/dpkg:dpkg
>
>On a related note, is there an explanation somewhere of how to make
>changes to portfiles and then install with those modifications? If I do
>"port edit someport", I get to edit the portfile, but somehow when I
>then try to install, it seems the old portfile is still being used. I'm
>sure I must be missing some step. My objective is to make some updates
>to some ports, and if all goes well suggest those changes be
>implemented in Macports. (For instace plotutils uses the 2.4.1 version
>from 2000 rather than the 2.5 version from 2006, although from the web
>page you would never know there actually existed a 2.5 version). Note
>that this is not actually the problem I was having with gnuplot as the
>portfile already has the depency in the form I mention above.

port ed someport works fine, I use it all the time.  But the Portindex
isn't updated so if you 'port search' the old version, variants, etc will
appear, but when running the install the new changes will indeed be in
effect.  Also, you may create a local portfile repository for more
extrensive changes and/or ones that will survive a 'port selfupdate'. 
Just edit the /opt/local/etc/ports/sources.conf and insert the path to a
local repo and make sure the entry precedes the rsync entry.

file:///Users/joebob/dports

Then run 'portindex' from the ./dports directory.  Note that if you have a
portfile for someport in the local repo that also exists in the tree, a
port search will turn up two copies, but if the file:/// entry is first
that is the one that will be installed.

Mark




More information about the macports-users mailing list