-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
librsvg: prepend cairo.pc path to PKG_CONFIG_PATH #14489
Conversation
librsvg depends on gtk, and when pkgconfig checks gtk-2.0.pc it queries cairo.pc. The problem is that cairo.pc is prepended to PKG_CONFIG_PATH on 10.7 because cairo is keg-only. On 10.8 cairo is not keg-only. So there is no prepend, causing compile errors. Add a prepend to PKG_CONFIG_PATH to the keg directory for cairo.pc. Tested on 10.8.1 using XCode-4.4.1, XQuartz-2.7.2, and clang. Fixes Homebrew#14474
But if Cairo is not keg-only on 10.8, then its pkg-config file should be linked into |
Yea, it's the order of the items on the PATH: Before
After cairo's directory is prepended:
That guarantees that when we force gtk to use HB cairo on all OSX systems, we force librsvg to find cairo in the cellar before it finds cairo in |
I'm not even sure I have this right. So I'm glad you're asking btw. |
This is true, but because librsvg depends on XQuartz, the XQuartz pkgconfig directory is placed on PKG_CONFIG_PATH, and thus its libs are picked up before any brewed libs. The goal is to ensure everything from the bottom up is using the same cairo, namely ours. I've sent a message to the pkg-config mailing list asking for a PKG_CONFIG_FALLBACK_PATH, where we could place the X11 path instead and thus ensure that Homebrew's libs are always picked up first, so we'll see how receptive they are to that. |
Admittedly, I haven't installed XQuartz, but doesn't it install to Hell, we could even stick |
We stopped doing this in order to support both Apple's X11 or the upstream XQuartz distro. Since they can be installed after pkg-config is built, we can't guess which one is the right one.
We already do this. |
Well, how about just:
Following the assumption that if a user takes the time to install XQuartz, they prefer it to whatever Apple version may or may not be hanging around. |
I worry that if they are both installed, having both of them on the search path will cause even more problems; we're bound to end up with packages with linkages to both. |
That may be true. But I think that adding code to this and every other formula that uses X11is the wrong way to solve a problem that is not specific to one formula. |
I'm not arguing in favor of that as a long term solution. As I stated earlier I am actively trying to pkg-config's functionality extended to support our circumstances. |
|
We only do that for keg-only deps, because it shouldn't be necessary otherwise. I don't want to add any hacks like that to Homebrew-core. I'm OK with doing it in formulae as a stopgap measure, though, until a clean solution is arrived at. But seriously, a patch to add a PKG_CONFIG_FALLBACK_PATH to pkg-config is like 4 LOC. |
I'm closing this because librsvg works ok now with superenv. |
librsvg depends on gtk, and when pkgconfig checks gtk-2.0.pc it
queries cairo.pc. The problem is that cairo.pc is prepended
to PKG_CONFIG_PATH on 10.7 because cairo is keg-only. On 10.8
cairo is not keg-only. So there is no prepend, causing compile
errors.
Add a prepend to PKG_CONFIG_PATH to the keg directory for cairo.pc.
Tested on 10.8.1 using XCode-4.4.1, XQuartz-2.7.2, and clang.
Fixes #14474