Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.98k stars 11.35k forks source link

New Formula: gtk+ #775

Closed kdulzo closed 14 years ago

kdulzo commented 14 years ago

kdulzo/homebrew@dbcd5f6dbfd3e94c41b4314d9d6f25fe6ba3db77

To1ne commented 14 years ago

Is this meant to be a pull request?

I've encountered a problem, the download link to atk is incorrect: ftp://ftp.gnome.org/pub/gnome/atk/1.28/atk-1.28.0.tar.bz2 should change to ftp://ftp.gnome.org/pub/gnome/sources/atk/1.28/atk-1.28.0.tar.bz2

kdulzo commented 14 years ago

Corrected formulas:

atk - kdulzo/homebrew@c588ee9410fd04ab8f0de40b244d185b7d198240 gtk+ - kdulzo/homebrew@4b154815060de6bc643f99f9156377a8ad9cf428

As far as a pull request, maybe I was confused in reading the guidelines but I got the sense that single commit cherry-picks were the way to go for Formula.

adamv commented 14 years ago

Atk added in d5119b75eca50c0250b14b87571f85d41639ad65.

adamv commented 14 years ago

GTK+ configure fails on me due to missing Cairo. Should Cairo be added as an explicit dependency of GTK+, or is it implicitly used by some other dep?

kdulzo commented 14 years ago

Pango depends on cairo as well, but it should be installed by with Apple's X11 package.

adamv commented 14 years ago

Pango installed fine (on 10.5), GTK+ bombs: checking for BASE_DEPENDENCIES... configure: error: Package requirements (glib-2.0 >= 2.21.3 atk >= 1.13.0 pango >= 1.20 cairo >= 1.6) were not met:

No package 'cairo' found

Looks like an explicit configure may be needed for Leopard.

adamv commented 14 years ago

Can't find a way to get this working on Leopard; will verify on Snow Leopard tonight, but we also need a 10.5 solution.

kdulzo commented 14 years ago

I'm running it on Leopard primarily... Are you using the X11 from the Apple DVD or the updated Xquartz package from macforge? Maybe cairo is only in the macforge edition...

Kevins-MacBook:~ kdulzo$ locate cairo /usr/X11/include/cairo /usr/X11/include/cairo/cairo-deprecated.h /usr/X11/include/cairo/cairo-features.h /usr/X11/include/cairo/cairo-ft.h /usr/X11/include/cairo/cairo-pdf.h /usr/X11/include/cairo/cairo-ps.h /usr/X11/include/cairo/cairo-svg.h /usr/X11/include/cairo/cairo-version.h /usr/X11/include/cairo/cairo-xlib-xrender.h /usr/X11/include/cairo/cairo-xlib.h /usr/X11/include/cairo/cairo.h /usr/X11/lib/libcairo.2.dylib /usr/X11/lib/libcairo.dylib /usr/X11/lib/libcairo.la /usr/X11/lib/pkgconfig/cairo-ft.pc /usr/X11/lib/pkgconfig/cairo-pdf.pc /usr/X11/lib/pkgconfig/cairo-png.pc /usr/X11/lib/pkgconfig/cairo-ps.pc /usr/X11/lib/pkgconfig/cairo-svg.pc [...]

adamv commented 14 years ago

10.5 + XCode 3.1.4.

$ locate cairo /usr/X11/include/cairo /usr/X11/include/cairo/cairo-deprecated.h /usr/X11/include/cairo/cairo-features.h /usr/X11/include/cairo/cairo-ft.h /usr/X11/include/cairo/cairo-pdf.h /usr/X11/include/cairo/cairo-ps.h /usr/X11/include/cairo/cairo-svg.h /usr/X11/include/cairo/cairo-xlib-xrender.h /usr/X11/include/cairo/cairo-xlib.h /usr/X11/include/cairo/cairo.h

kdulzo commented 14 years ago

Looks like your install (Apple Leopard original?) doesn't have the pkg-config (cairo.pc) files so perhaps the formula should check for /usr/X11/lib/pkgconfig/cairo-.pc otherwise add the cflags/ldflags manually. I would think this would "just work" since /usr/X11/include should already be added...

I don't know if it makes sense to require users to install http://xquartz.macosforge.org/. Let me dig into this after work and I'll whip up something. I'll have to uninstall the Xquartz update.

To1ne commented 14 years ago

I have cairo in branch working on 10.6 http://github.com/To1ne/homebrew/blob/klavaro/Library/Formula/cairo.rb

I got it from rioderelfte: http://github.com/rioderelfte/homebrew/blob/gtk/Library/Formula/cairo.rb

But I think some configure setting should change.

kdulzo commented 14 years ago

How does that interact with the Pango formula built --with-x? I recall from macports that the quartz/x11 features don't mix well across packages.

10.6 has cairo in Apple's X11, including the .pc files for pkg-config. I just tested on my home machine, the formula and dependencies build without issue on Snow Leopard.

I think the issue is Apple's X11 for Leopard has an older version of cairo compared to both Xquartz-2.4.0 (xquartz.macosforge.com) and Snow Leopard X11.

I have these three ideas:

  1. Make a normal cairo formula (even if its a dup for 10.6 or 10.5 w/ Xquartz updated) and depend on it if MACOS_VERSION < 10.6 and File.exists("/usr/X11/lib/pkgconfig/cairo.pc")
  2. Make a cairo formula in the gtk+ formula for the same circumstance
  3. Push users to install Xquartz from macosforge to get updated server/libraries if MACOS_VERSION < 10.6

Any thoughts?

To1ne commented 14 years ago

Yes, I've noticed the conflicting parameters. I'll look in to it. But why not just use --with-x on all formulas?

kdulzo commented 14 years ago

Rebased gtk+ with fix for Snow Leopard performance (yes, my git fu is weak)

kdulzo/homebrew@df4b59aee0eb54d2dbd37acc1a4754401c440c6e

Any further thoughts on what to do for Leopard and cairo?

adamv commented 14 years ago

Fork went away?

http://github.com/adamv/homebrew/tree/gtk

adamv commented 14 years ago

Added GTK+ in 1e75da9ca89ef34eabcf1d2419c3dd60fb9b77de