Revision: 79862 http://trac.macports.org/changeset/79862 Author: jeremyhu@macports.org Date: 2011-06-28 10:10:44 -0700 (Tue, 28 Jun 2011) Log Message: ----------- gtk2: build fix for when glib2 is built with clang When glib2 is built with clang, G_HAVE_GNUC_VISIBILITY gets (correctly) set. gtk2 uses this macro to check for support for the visibility attribute and assumes support for aliasing. Modified Paths: -------------- trunk/dports/gnome/gtk2/Portfile Added Paths: ----------- trunk/dports/gnome/gtk2/files/patch-aliases.diff Modified: trunk/dports/gnome/gtk2/Portfile =================================================================== --- trunk/dports/gnome/gtk2/Portfile 2011-06-28 15:54:31 UTC (rev 79861) +++ trunk/dports/gnome/gtk2/Portfile 2011-06-28 17:10:44 UTC (rev 79862) @@ -34,9 +34,10 @@ checksums sha1 c15a25ba49eb459b2c4cdc46baedf6cecf08cbcf \ rmd160 56a6f731cfdc47686c71f8f6b4253484e08dd230 -patchfiles patch-gtk-builder-convert.diff +patchfiles patch-gtk-builder-convert.diff patch-aliases.diff -depends_build port:pkgconfig +depends_build port:pkgconfig \ + port:perl5 depends_lib port:atk \ path:lib/pkgconfig/pango.pc:pango \ @@ -60,6 +61,15 @@ configure.cppflags-append -DX_LOCALE configure.cflags-append -fstrict-aliasing +post-extract { + # gtk2's Makefiles don't have proper dependencies, + # so we must delete these to get them remade + file delete ${worksrcpath}/gdk/gdkalias.h + file delete ${worksrcpath}/gdk/gdkaliasdef.c + file delete ${worksrcpath}/gtk/gtkalias.h + file delete ${worksrcpath}/gtk/gtkaliasdef.c +} + pre-configure { if {![variant_isset quartz] && ![variant_isset x11]} { error "Either +x11 or +quartz is required" Added: trunk/dports/gnome/gtk2/files/patch-aliases.diff =================================================================== --- trunk/dports/gnome/gtk2/files/patch-aliases.diff (rev 0) +++ trunk/dports/gnome/gtk2/files/patch-aliases.diff 2011-06-28 17:10:44 UTC (rev 79862) @@ -0,0 +1,22 @@ +--- gdk/makegdkalias.pl.orig 2011-06-28 01:13:10.000000000 -0700 ++++ gdk/makegdkalias.pl 2011-06-28 01:13:49.000000000 -0700 +@@ -14,7 +14,7 @@ print <<EOF; + + #include <glib.h> + +-#ifdef G_HAVE_GNUC_VISIBILITY ++#if defined(G_HAVE_GNUC_VISIBILITY) && !defined(__APPLE__) + + EOF + +--- gtk/makegtkalias.pl.orig 2011-06-28 09:18:59.000000000 -0700 ++++ gtk/makegtkalias.pl 2011-06-28 09:19:08.000000000 -0700 +@@ -14,7 +14,7 @@ print <<EOF; + + #include <glib.h> + +-#ifdef G_HAVE_GNUC_VISIBILITY ++#if defined(G_HAVE_GNUC_VISIBILITY) && !defined(__APPLE__) + + EOF +