Breaking long dependency chains
Ryan Schmidt
ryandesign at macports.org
Sun Mar 18 18:54:07 PDT 2012
On Mar 18, 2012, at 13:17, Kevin Walzer wrote:
> Yet right now port is installing glib, and was installing Perl before I killed the process. Where do these come in? Why do I need glib, or Perl for that matter, to install the native Aqua/quartz variant of Tk?
Let's take a look.
tk requires pkgconfig in order to find the fontconfig dependency it wants to use.
pkgconfig requires glib2. This is unfortunate because pkgconfig is ubiquitous and glib2 is large, but it's unavoidable. pkgconfig used to include its own stripped-down version of glib1, but in the most recent version of pkgconfig the developers decided to stop doing that and require a separately installed glib2. Everybody complained about this at the time but the developers of pkgconfig don't appear to be changing their minds on this.
glib2 requires perl5; see #17530. This is because one of the scripts glib2 installs (glib-mkenums) is a perl script, and if MacPorts perl was already installed at the time glib2 was installed, it ended up using MacPorts perl, which would cause a problem for users of this script if they later uninstalled MacPorts perl. So in order to ensure a consistent experience we had the choice of either forcing the script to always use the system perl, or to always use MacPorts perl, and because MacPorts policy has generally been to use other MacPorts ports for dependencies (see the FAQ), we chose the latter. I don't feel strongly about this one way or the other in this particular case (that's why I did not react when this ticket was filed and someone else addressed it).
We could possibly make changes to tk to tell it explicitly where fontconfig lives, so that the pkgconfig dependency would not be needed. However, pkgconfig is so ubiquitous that users are extremely likely to end up needing it before too long, if they install more ports. So I don't know that it's worth the effort.
More information about the macports-dev
mailing list