-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Conversation
This does make me wonder if we're going to have to start making the X11 libraries "proper" dependencies now. |
@MikeMcQuaid Apple's X11 is nothing but an outdated snapshot of XQuartz. I don't see a reason to prefer it. |
Because we've done significantly more testing with Apple's X11 and it's the current default. |
Yes, but we need to take a step back and look at why we are adding support for XQuartz in the first place. Read the discussion in #12552. Mountain Lion won't have an X11.app, you're going to need XQuartz. And we also have people trying to introduce new formulas, such as Gtk+3, that require a reasonably recent version of X11; but we want these formulas to work on 10.6 too. I really don't think adding a formula to build X11 from source is a good idea. Rather, we should rely on XQuartz to provide a recent enough X11 on all versions of OS X we support. |
I'm well aware of that. If Gtk+3 requires a newer version and when it is in Homebrew then we should consider it. To do so now is not a good idea; Mountain Lion has not even been released yet. |
Gtk+3 is not in Homebrew because it requires a recent X11, as explained in #12552. And by the time this pull request goes through, I expect we'll be at least at 10.8.1. |
Let's see.
|
I'm am going to install XQuartz on my home machine and run with this patch. I'm glad Mike presents a dissenting opinion, as it is good to keep us honest, but we're at the point where relying on any system-provided X11-related stuff is becoming a liability, c.f. the Cairo issues for instance. |
How should we indicate that a minimum version of X11 is required?
|
A special symbol dependency as above, though; don't really want to add compile-from-source for this. |
Indeed. Speaking of which, are there any other formulas that have problems with ENV.x11, besides Cairo? I'm wondering if we should separate the two aspects of "I need X11 installed" and "I want the ENV set up". If it's just Cairo, maybe we can find a workaround for that one formula. |
I'm hopeful that if we get this working right, we can get rid of the keg-only cairo altogether, since we will drop 10.5 support shortly after 10.8 is released. Also potentially pixman. |
ENV.x11 should also append the appropriate directories to PKG_CONFIG_PATH. |
@jacknagel good point; when we build pkg-config we hard-code the System X11 folder into the path |
I installed XQuartz and this patch, and I'm rebuilding a bunch of stuff to see what needs adjusting. I'll push formula changes to a branch later. |
We should consider not doing that, and instead be more explicit about what is using X11 libs, using a special dep to adjust PKG_CONFIG_PATH. |
@jacknagel you may want to restart your rebuild with the new commit, so you can test the new pkgconfig setup too. |
Don't worry, did it locally before I started. |
Thanks dudes. If you guys think we should move to XQuartz I'm down with that too. |
Here's a branch with @camillol's patches and some formula tweaks: https://github.com/jacknagel/homebrew/commits/xquartz The second topmost commit contains changes I've made to things that I have built; the topmost commit is things that I anticipate will need to be changed. There are also some X11 paths embedded in patches that will need to be fixed eventually. And a list of things I have compiled against XQuartz: https://gist.github.com/2886033 |
Pushed more things into my branch; looks like we'll have to hang on to the keg-only cairo after all, as some things need cairo-gobject which XQuartz does not have. But we should be able to drop the pixman and fontconfig duplicates. Note that all of this assumes Snow Leopard or newer, I threw Leopard under the bus in my branch. |
Gimp would be a good one to test. Curious why that hasn't been pulled? |
I think it would be helpful to have a wiki for Howto Install XQuartz, even if it only says
because there is no Howto on the net that I could find and no instructions in their wiki. Plus I had problems in the past trying to replace the stock one in |
I noticed in my testing that there are two pkgconfig paths in X. You might want to adjust
The two directories within a distrobution of X do not dupe each other. So I think it's reasonable to add both. Thanks. |
I pulled this request with
I'm not sure what it means. A few other pdfs work without error, but I thought I'd mention it.
|
@2bits the instructions are:
|
Yes, I noticed this too but forgot to mention it. I don't know if anything in the |
@@ -26,25 +26,31 @@ def initialize | |||
|
|||
def add spec | |||
case spec | |||
when :x11 then @external_deps << X11Dependency.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably do this like
when Symbol
case spec
when :x11
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do a case spec
inside a case spec
? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well really it should be factored out into a private method; add
is getting long already.
when Symbol then add_symbol(spec)
...
def add_symbol spec
case spec
when :x11 then ...
when :autotools then ...
when :foo then ...
...
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. The part I most dislike is that there is some duplication of code between the Hash case and the non-Hash case. I've refactored it accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I disliked that part also.
@2bits I tried installing ffmpeg and it worked for me, including libass. ENV.x11 is no longer needed in the latest patch, as long as you have depends_on :x11 instead. |
FYI, I'm keeping a rebased version of this in my tree: https://github.com/jacknagel/homebrew/tree/xquartz In case anyone wants to apply this on top of master without resolving conflicts (or at least fewer conflicts). There are also a couple of additional patches. |
This seems relevant:
I wonder what it installs and where? |
Signed-off-by: Jack Nagel <[email protected]>
- pkg-config no longer defaults to checking /usr/X11/lib/pkgconfig; instead this path is added via ENV.x11 or depends_on :x11. Formulae that expect X11 libs should be explicitly marked as depends_on :x11. - Remove warning about /usr/X11 as a symlink. Signed-off-by: Jack Nagel <[email protected]> Conflicts: Library/Homebrew/cmd/doctor.rb
@MikeMcQuaid reports say it directs you to install XQuartz. |
If it automatically installs like Java does it might be cool to try and trigger that process. |
Good idea! It's probably enough to attempt connecting to the |
Nobody running (or knowing somebody running) ML beta? |
Any progress on this? |
A major change to Homebrew was just pulled a couple of days ago, and it is getting adjusted in #13037. After that has settled, XQuartz is next on the list, and the time-scale for that is probably 2 weeks or less. |
We should probably get this in ASAPish as Mountain Lion is due in July some time. |
Do you consider these commits to be in a state which can be tested? |
Yes but they might need to be rebased for them to apply cleanly. We are waiting for @camillol to do that. |
If @camillol is busy I can do the rebase tomorrow. I agree that we need to get it in soon. |
Yes please. This is a heroic work. And it fits very well to my recent Two questions:
|
Building it from source is a lot of work (there are a ton of individual pieces to it), but a formula that installs the binaries from the dmg (I have no idea if that is possible) would be cool.
It will be utilized if XQuartz is not installed, but the presence of XQuartz will mean "use XQuartz instead", and XQuartz will be recommended from here on out. |
Thanks, sounds good. Pointing to the downloaded seems reasonable for now. Now I understand why @adamv doesn't want me to add missing |
I have a rebased version of this locally; planning to start merging it in the morning. |
@samueljohn Are there any known setups where MacOS.sdk_path is nil? I'm trying to clean up |
If you only have the CLT, |
Thanks. |
Ran into a few issues so I decided to wait a day, I'll try to merge it tomorrow morning though. |
Merged. |
Congrats @camillol! Thanks for making this happen. |
Hey guys, sorry for not following Homebrew development lately, but I've been very busy. Many thanks to @jacknagel for handling the rebase and merge in my stead, and to everyone who supported this work! |
Let's start testing this. I've built wine with it, which is a very large X11 client, and it works fine.
See also the discussion in #12552.