A Plea to Reduce Dependences (e.g., for swig)

Joshua Root jmr at macports.org
Tue Aug 16 15:44:39 PDT 2011


On 2011-8-17 08:08 , M.E. O'Neill wrote:
> Daniel J. Luke wrote:
>>> see https://trac.macports.org/wiki/FAQ#ownlibs
> 
> ... and Dan Ports replied:
>> FWIW, I find that FAQ answer really unsatisfying. I agree that there are good reasons why MacPorts uses its own libraries, but the claim that "the drawbacks of this policy are minimal" just seems wrong. There are certainly cases where installing some port pulls in many more dependencies than you'd expect, and this has been a frequent complaint.
>>
>> It may well be true that we are, on the whole, better off for building these dependencies, but we shouldn't dismiss the cost of doing so.

I agree the FAQ entry could do with a rewrite to use less dismissive
language. Patches welcome. ;-)

> I'm not necessarily saying that it's bad to link to MacPorts-specific libraries, but it strikes me as highly questionable that someone wanting to use swig to make interfaces for Java programs needs to install an X server and a full install of python and perl and a variety of other software that is has no connection whatsoever to this task.  

If any particular port is declaring dependencies it genuinely doesn't
need, file a ticket. Likewise, some deps are optional and can be moved
to a variant if most users won't need the features they enable, so feel
free to file an enhancement ticket to do that.

> Similarly, some ports pull in things that really really make no sense.  At all.  My favorite is GHC, which includes a dependency on perl5.8. Yes, 5.8. Why?  Because GHC uses perl in its build system.  The system perl works fine, but hey, MacPorts will install an ancient perl just 'cos.

Per the Portfile:

# Yes, it some situations (-fvia-C) we really need perl
# to _run_ ghc, since the mangler (an assembly to assembly transformation)
# is a perl script. That's why it called the "Evil Mangler".
#
# Not only that, but since correctly handling whitespace is critical,
# only perl 5.8 is known to work reliably.

Again, maybe this only applied to an older version of ghc. If that's the
case, file a ticket.

- Josh


More information about the macports-dev mailing list