GNOME Bugzilla – Bug 408518
gtk-osx on Panther
Last modified: 2008-04-02 08:47:06 UTC
Please describe the problem: On my Panther box gtk-osx-build downloads XML::Parser and installs it in /opt/gtk, but later on building of intltool fails because perl doesn't search in /opt/gtk/Library/Perl/ by default. Steps to reproduce: 1. Setup a fresh Panther box with XCode tools, MacPorts and X11 2. prepare and run "gtk-osx-build bootstrap" on that box Actual results: The OSX port of GTK+ build smoothly. Expected results: gtk-osx-build stops when building intltool: checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool Does this happen every time? Yes. Other information:
Ok, fix was easy: Change PERL5LIB in gtk-osx-build from /opt/gtk/lib/perl5/site_perl to /opt/gtk/Library/Perl/5.8.1/. Now let's figure out how to let the script set the variable automatically.
Weird. Maybe we can solve it by adding both those paths (I guess it's a normal colon separated list?)
(In reply to comment #2) > Weird. Maybe we can solve it by adding both those paths (I guess it's a normal > colon separated list?) Yes, that's easy solution. So the line should be: PERL5LIB=`perl -e 'printf "/opt/gtk/lib/perl5/site_perl:/opt/gtk/Library/Perl/v%vd", $^V'` Btw, that problem occurs, because I've tried on building on Panther. Got quite far so far: - had to add "-lobjc" to Libs variable of cairo.pc for getting Pango built - had to change serveral "#include <Quartz/Quartz.h>" to "#include <AppKit/AppKit.h>" in gtk/gdk/quartz - currently have for figure out how to emulate some Core Graphics calls of Tiger with those available on Panther. Just seems to be a matter of getting a proper ColorSpace reference. Hopefully. I am clueless regarding MacOS: Got my first Mac last week.
Thanks! I've committed that fix to the build script. If you attach a patch for changing the includes, I can commit that, sounds good. About adding -lobjc to cairo, I'm not sure that is right? The fix should be to add it to the ldflags of pango itself since it explicitly uses objc.
Created attachment 82787 [details] [review] Incomplete patch Compiling of gtk+ finishes, but at the end there are linking errors: ld: Undefined symbols:_CGImageGetBitmapInfo. Have to resolve this.
Thanks! I've committed the include fixes and the userSpaceScaleFactor change. The GC changes need a bit more work I guess so I left those out.
Created attachment 82794 [details] [review] Patches for Cairo - The change to configure.in is cosmetical - I prefer one single -Wl switch over several -Xlinker switches. - The change to cairo-quartz.pc is kept there, as I didn't find any references to Objective C or Quartz in Pango.
Created attachment 82795 [details] [review] Patches for GTK+ After this changes I can natively run gtk-demo on Panther. It is slow and bevels do not get rendered. GtkButton and GtkTreeView seemingly randomly loose mouse button events. Didn't find a replacement for CGContextClipToMask and CGContextSetAllowsAntialiasing on Panther.
Comment on attachment 82795 [details] [review] Patches for GTK+ Well, and also there is no CGContextSetBlendMode - but this doesn't seem to be that important.
Created attachment 82797 [details] Current state on Panther.
Wow, great! :) Pango uses objc, see pangoatsui-fontmap.c. I will take a look at this asap.
Created attachment 82798 [details] [review] Patches for GTK+ Cool, some of the changes are in the repository already. Updated the gtk patch.
I wonder if -lobjc is needed on panther but tiger adds it automatically for objective C (like C apps automatically link to libc kind of...). If so we should add -lobjc to ldflags in pango and gtk+ at least.
*** Bug 322372 has been marked as a duplicate of this bug. ***
I have decided not to apply this for now. It adds a number of ifdefs while it still doesn't work since some pieces are missing. If someone implements the missing pieces, it would make more sense to apply the patch. Second, panther is starting to get old so it's not my personal highest priority. Leaving this bug open since it does have the patch in case someone wants to pick it up.
I'll go ahead and close this since panther is getting old and cairo requires tiger now.