Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

More selective X11 dependencies #13784

Closed
MikeMcQuaid opened this issue Jul 30, 2012 · 28 comments
Closed

More selective X11 dependencies #13784

MikeMcQuaid opened this issue Jul 30, 2012 · 28 comments

Comments

@MikeMcQuaid
Copy link
Member

I think it's a bit nasty to just pushing users to XQuartz. I'd propose that common things like libpng are reintroduced as Homebrew dependencies and things like Qt which contain internal versions just use them instead of pulling in XQuartz.

I already did the latter here and will start working on the prior unless there is huge objections.

@adamv
Copy link
Contributor

adamv commented Jul 30, 2012

Seems reasonable, let's just think this through and get lots of code review before committing anything.

Certainly installing all of XQuartz is heavy just to get libpng.

@adamv
Copy link
Contributor

adamv commented Jul 30, 2012

We can use depends_on :libpng symbol dep to do smart things with user configuration, rather than adding direct deps. on a new libpng brew.

@MikeMcQuaid
Copy link
Member Author

Yep, agreed. If they have XQuartz or another X11 installed, use that instead. I think this would still be useful on non-Mountain Lion too.

@jacknagel
Copy link
Contributor

My main worry is another mess like Cairo where some things are linked against the xquartz version and some against our own version, and things that have transitive dependencies on both.

@jacknagel
Copy link
Contributor

I'm certainly in favor of things using internal versions, though.

@MikeMcQuaid
Copy link
Member Author

Good point on Cairo. In that situation I'd rather do what's best for the latest OSX (even if that means adding an unnecessary dep to lower versions).

@MikeMcQuaid
Copy link
Member Author

You can see the start of my X11 work here: https://github.com/mikemcquaid/homebrew/compare/x11

What else do we want other than freetype, libpng?

@adamv
Copy link
Contributor

adamv commented Jul 30, 2012

fontconfig?

@adamv
Copy link
Contributor

adamv commented Jul 30, 2012

Maybe libpng should always be keg-only, even on Mountain Lion.

@MikeMcQuaid
Copy link
Member Author

I don't think so as Apple ships an intentionally broken version.

@MikeMcQuaid
Copy link
Member Author

I've made this stuff apply on Lion to save users installing X11 and will apply it soonish unless there's any huge objections as there are outstanding issues (#13638) that will be fixed by it.

@MikeMcQuaid
Copy link
Member Author

I've pushed quite a bit more stuff (adding cairo, freetype, libpng, pixman, fontconfig and been testing with cairo, imagemagick and graphviz) so will leave it a few more days.

Am I right in assuming that stuff that depends on cairo usually always needs real X11 too (just for the default mode to compile it in)?

@2bits
Copy link
Contributor

2bits commented Aug 6, 2012

What is the key problem this is trying to solve? Is it the gigabyte of x11 libraries installed when some users may only want a few megs? Is it the 8 minutes it took to install XQuartz? Is it the size of the x11 tarball that's been up since February?

@2bits
Copy link
Contributor

2bits commented Aug 6, 2012

Sorry I think my sugar is low :-) Forget that stuff. Ima grab a beer. There's this Marin Brew Co. Bluberry Ale at my corner store.

@jacknagel
Copy link
Contributor

No, I think it is worth answering those questions. With XQuartz we get everything we need in one shot. Do the benefits of this outweigh the minor inconvenience of installing XQuartz, along with the problems that will surely surface when users end up with things that are transitively dependent on both libs that we provide and that XQuartz provides? The cairo dupe, while necessary, has already caused this type of problem.

I feel like this needs to be addressed somehow before we paint ourselves into a corner.

@jacknagel
Copy link
Contributor

(Note: not trying to be argumentative, I just think these things should be discussed and addressed before making hasty decisions).

@MikeMcQuaid
Copy link
Member Author

I'd like it so the only people who install XQuartz are people who actually want to run X applications on OSX. I created this partly to scratch a personal itch as I don't run X applications on OSX but want to install ImageMagick with PNG support.

I'm happy for us to force the use of XQuartz libs for X11 applications (and Cairo; is there anything that uses that without X11?) if you feel that would avoid bugs (and because I don't use them).

@mxcl
Copy link
Contributor

mxcl commented Aug 6, 2012

I agree.

Probably we can get away with just adding the formula and imaging XQuartz doesn't exist even. It's not a default install and it's in a weird place.

@2bits
Copy link
Contributor

2bits commented Aug 6, 2012

So should we pull the useful libraries out of all sorts of packages as we find them like macports does? Yuk.

@mxcl
Copy link
Contributor

mxcl commented Aug 6, 2012

So should we pull the useful libraries out of all sorts of packages as we find them like macports does? Yuk.

Don't understand.

@MikeMcQuaid
Copy link
Member Author

@2bits We should depend on as little as possible. If we have enough bottles at some point later we should also e.g. try and not depend on Xcode. Installing a piece of software only to be told to install another is a crappy user experience, unexpected on OSX and a bit lazy.

@MikeMcQuaid
Copy link
Member Author

3895b9c and friends were merged. I'll go through and do the boring fixing of anything depending on :x11 later.

@adamv
Copy link
Contributor

adamv commented Aug 29, 2012

So what's our current best practice here? I can fix some of the :x11 deps if I know what to look for.

@MikeMcQuaid
Copy link
Member Author

I've got as far as ffmpeg but feel free to continue. Basically uninstall/move X11/XQuartz (if you can) and brew install, see what fails and add the various X11 dependencies until it works.

@adamv
Copy link
Contributor

adamv commented Aug 29, 2012

Ah, I'm not on Mountain Lion, so presumably I can't do a good test of removing the dep.

@mxcl
Copy link
Contributor

mxcl commented Aug 29, 2012

Superenv will forcibly remove X11 from paths if it is not a dep. Should be proper. If it doesn’t it's a bug in superenv.

@jacknagel
Copy link
Contributor

Presumably this is done or mostly-done.

@MikeMcQuaid
Copy link
Member Author

Yep, pretty much, thanks.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants