How to avoid installing unnecessary dependencies using MacPorts?

I tried to get postgresql 8.4 via MacPorts (on Snow Leopard), but it seems that the dependencies are endless - including getting an older version of things that is already available in Snow Leopard, a kitchen sink, and who knows if in the end I end up with windows 7 ...

Is there a way to get only the dependencies that are needed to run files from the command line on a Mac?

I especially try to avoid installing the old version of python, Xorg packages, etc.

Any ideas? So far, it seems better to avoid MacPorts at all.

+6
dependencies macports macos
source share
2 answers

Looking at the file for postgresql84 , the +python option for it means python2.5 . Most of the dependencies that you find annoying are probably due to the dependence of the pton tkinter module on Tk , which by default creates the X11 version for Tk and not the + quartz version. You can change this by specifying this option and reinstalling it. An easy way to consider the options is to add the options that you usually want to use by default in the /opt/local/etc/macports/variants.conf settings.

Unfortunately, at the moment, the tk +quartz build option is broken on Snow Leopard . So, if you do not plan to use tkinter (or IDLE) with MacPorts python2.5, you can forcefully remove the unwanted modules after the fact:

 port installed port -f uninstall tk Xft2 xorg-libX11 ... 

You can do a dry check first by adding the -y option to see exactly what the consequences of uninstall will be.

Note. The python26 port has a convenient option +no_tkinter , which can be useful after upgrading portgresql ports to python2.6.

+8
source share

This is potentially a bit of a rude job (and definitely violates Occam's razor for this particular scenario) ... but if you are sure you know what dependencies you don't need / need, they can always be passed as a hyphen, Labeled arguments after calling the port:

 port install sweetPort -depYouDontWant -depYouDontNeed ... 

I know that some time has passed since the OP, but I hope this helps ... to someone.

+6
source share

All Articles