[41394] trunk/dports/gnome/eel

pguyot at kallisys.net pguyot at kallisys.net
Sat Nov 1 11:05:23 PDT 2008


Revision: 41394
          http://trac.macports.org/changeset/41394
Author:   pguyot at kallisys.net
Date:     2008-11-01 11:05:23 -0700 (Sat, 01 Nov 2008)
Log Message:
-----------
New experimental +quartz variant

Modified Paths:
--------------
    trunk/dports/gnome/eel/Portfile

Added Paths:
-----------
    trunk/dports/gnome/eel/files/patch-configure.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-art-gtk-extensions.c.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-background.c.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-gdk-extensions.c.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-gdk-pixbuf-extensions.c.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-gnome-extensions.c.diff
    trunk/dports/gnome/eel/files/patch-eel-eel-gtk-extensions.c.diff

Removed Paths:
-------------
    trunk/dports/gnome/eel/files/patch_eel-Makefile.in
    trunk/dports/gnome/eel/files/patch_eel-glib-extensions.c

Modified: trunk/dports/gnome/eel/Portfile
===================================================================
--- trunk/dports/gnome/eel/Portfile	2008-11-01 18:03:07 UTC (rev 41393)
+++ trunk/dports/gnome/eel/Portfile	2008-11-01 18:05:23 UTC (rev 41394)
@@ -32,9 +32,55 @@
 
 use_bzip2 	yes
 
+patchfiles \
+            patch-eel-eel-art-gtk-extensions.c.diff \
+            patch-eel-eel-gdk-pixbuf-extensions.c.diff \
+            patch-eel-eel-background.c.diff \
+            patch-eel-eel-gdk-extensions.c.diff \
+            patch-eel-eel-gnome-extensions.c.diff \
+            patch-eel-eel-gtk-extensions.c.diff
+
+
 configure.args  --mandir=${prefix}/share/man --enable-static=no
 configure.cppflags-append "-L${prefix}/lib"
 
 livecheck.check regex
 livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/
 livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
+
+if {[variant_isset no_x11]} {
+    default_variants    +quartz
+}
+
+if {![variant_isset quartz]} {
+    default_variants    +x11
+}
+
+pre-fetch {
+    if {![variant_isset quartz] && ![variant_isset x11]} {
+        error "Either +x11 or +quartz is required"
+    }
+}
+
+pre-configure {
+    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
+        set gtk_quartz [exec grep -c GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h]
+        if {[variant_isset quartz] && ${gtk_quartz} == 0} {
+            error "+quartz variant selected, but gtk2+x11 is installed"
+        } elseif {[variant_isset x11] && ${gtk_quartz} == 1} {
+            error "+x11 variant selected, but gtk2+quartz is installed"
+        }
+    } else {
+        error "Cannot find gdkconfig.h"
+    }
+}
+
+variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} {
+    patchfiles-append       patch-configure.diff
+}
+
+variant x11 conflicts quartz description {Enable rendering in X11 (default)} {
+}
+
+variant no_x11 description {Same as +quartz} {
+}

Added: trunk/dports/gnome/eel/files/patch-configure.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-configure.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,77 @@
+--- configure.orig	2008-11-01 15:42:46.000000000 +0100
++++ configure	2008-11-01 15:43:36.000000000 +0100
+@@ -24419,74 +24419,6 @@
+ # Checks for Xft/XRender
+ #
+ have_render=false
+-RENDER_LIBS=""
+-
+-{ echo "$as_me:$LINENO: checking for XRenderFindFormat in -lXrender" >&5
+-echo $ECHO_N "checking for XRenderFindFormat in -lXrender... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xrender_XRenderFindFormat+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXrender -lXext $EEL_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char XRenderFindFormat ();
+-int
+-main ()
+-{
+-return XRenderFindFormat ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext &&
+-       $as_test_x conftest$ac_exeext; then
+-  ac_cv_lib_Xrender_XRenderFindFormat=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xrender_XRenderFindFormat=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderFindFormat" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderFindFormat" >&6; }
+-if test $ac_cv_lib_Xrender_XRenderFindFormat = yes; then
+-  have_render=true
+-else
+-  :
+-fi
+ 
+ 
+ if $have_render ; then

Added: trunk/dports/gnome/eel/files/patch-eel-eel-art-gtk-extensions.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-art-gtk-extensions.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-art-gtk-extensions.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,13 @@
+--- eel/eel-art-gtk-extensions.c.orig	2008-11-01 15:40:32.000000000 +0100
++++ eel/eel-art-gtk-extensions.c	2008-11-01 15:44:46.000000000 +0100
+@@ -25,7 +25,10 @@
+ #include <config.h>
+ 
+ #include "eel-art-gtk-extensions.h"
++#include <gdk/gdk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
++#endif
+ 
+ /**
+  * eel_gdk_rectangle_to_eel_irect:

Added: trunk/dports/gnome/eel/files/patch-eel-eel-background.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-background.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-background.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,22 @@
+--- eel/eel-background.c.orig	2008-11-01 15:53:59.000000000 +0100
++++ eel/eel-background.c	2008-11-01 15:54:36.000000000 +0100
+@@ -655,7 +655,8 @@
+ 
+ 	background->details->background_changes_with_size =
+ 		gnome_bg_changes_with_size (background->details->bg);
+-	
++
++#ifndef GDK_WINDOWING_QUARTZ	
+ 	if (background->details->is_desktop) {
+ 
+ 		root_pixmap = NULL;
+@@ -670,7 +671,8 @@
+ 		gnome_bg_set_pixmap_as_root (gdk_drawable_get_screen (window), root_pixmap);
+ 		g_object_unref (root_pixmap);
+ 	}
+-	
++#endif
++
+ 	if (pixmap) {
+ 		g_object_unref (pixmap);
+ 	}

Added: trunk/dports/gnome/eel/files/patch-eel-eel-gdk-extensions.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-gdk-extensions.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-gdk-extensions.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,100 @@
+--- eel/eel-gdk-extensions.c.orig	2008-11-01 15:40:46.000000000 +0100
++++ eel/eel-gdk-extensions.c	2008-11-01 15:53:11.000000000 +0100
+@@ -33,7 +33,9 @@
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <gdk/gdkprivate.h>
+ #include <gdk/gdk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
++#endif
+ #include <stdlib.h>
+ #include <pango/pango.h>
+ 
+@@ -581,13 +583,16 @@
+ 	 */
+ 	gdk_window_show (window);
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ 	/* If the window was already showing, it would not have
+ 	 * the focus at this point. Do a little X trickery to
+ 	 * ensure it is focused.
+ 	 */
+ 	eel_gdk_window_focus (window, GDK_CURRENT_TIME);
++#endif
+ }
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ void
+ eel_gdk_window_focus (GdkWindow *window, guint32 timestamp)
+ {
+@@ -599,7 +604,9 @@
+ 	gdk_flush();
+ 	gdk_error_trap_pop ();
+ }
++#endif
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ void
+ eel_gdk_window_set_wm_protocols (GdkWindow *window,
+ 				 GdkAtom *protocols,
+@@ -619,7 +626,9 @@
+ 
+ 	g_free (atoms);
+ }
++#endif
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ /**
+  * eel_gdk_window_set_wm_hints_input:
+  * 
+@@ -648,6 +657,7 @@
+ 	XSetWMHints (dpy, id, wm_hints);
+ 	XFree (wm_hints);
+ }
++#endif
+ 
+ void
+ eel_gdk_window_set_invisible_cursor (GdkWindow *window)
+@@ -676,6 +686,7 @@
+ 	g_object_unref (empty_bitmap);
+ }
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ EelGdkGeometryFlags
+ eel_gdk_parse_geometry (const char *string, int *x_return, int *y_return,
+ 			     guint *width_return, guint *height_return)
+@@ -714,6 +725,7 @@
+ 
+ 	return gdk_flags;
+ }
++#endif
+ 
+ void
+ eel_gdk_draw_layout_with_drop_shadow (GdkDrawable         *drawable,
+@@ -745,8 +757,10 @@
+ eel_gdk_color_parse (const gchar *spec,
+ 		     GdkColor *color)
+ {
++#ifndef GDK_WINDOWING_QUARTZ
+ 	Colormap xcolormap;
+ 	XColor xcolor;
++#endif
+ 
+ 	g_return_val_if_fail (spec != NULL, FALSE);
+ 	g_return_val_if_fail (color != NULL, FALSE);
+@@ -756,6 +770,7 @@
+ 		return TRUE;
+ 	}
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ 	/* If that failed, fallback to the old gdk code. */
+ 	xcolormap = DefaultColormap (GDK_DISPLAY (),
+ 				     gdk_x11_get_default_screen ());
+@@ -766,6 +781,7 @@
+ 		color->blue = xcolor.blue;
+ 		return TRUE;
+ 	}
++#endif
+ 
+ 	return FALSE;
+ }

Added: trunk/dports/gnome/eel/files/patch-eel-eel-gdk-pixbuf-extensions.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-gdk-pixbuf-extensions.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-gdk-pixbuf-extensions.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,13 @@
+--- eel/eel-gdk-pixbuf-extensions.c.orig	2008-11-01 15:40:56.000000000 +0100
++++ eel/eel-gdk-pixbuf-extensions.c	2008-11-01 15:42:09.000000000 +0100
+@@ -35,7 +35,10 @@
+ #include "eel-string.h"
+ #include <gdk-pixbuf/gdk-pixbuf-loader.h>
+ #include <gdk/gdkprivate.h>
++#include <gdk/gdk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
++#endif
+ #include <gio/gio.h>
+ #include <math.h>
+ #include <stdlib.h>

Added: trunk/dports/gnome/eel/files/patch-eel-eel-gnome-extensions.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-gnome-extensions.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-gnome-extensions.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,13 @@
+--- eel/eel-gnome-extensions.c.orig	2008-11-01 15:41:03.000000000 +0100
++++ eel/eel-gnome-extensions.c	2008-11-01 15:41:58.000000000 +0100
+@@ -36,7 +36,10 @@
+ #include <X11/Xatom.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <gdk/gdk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
++#endif
+ #include <gtk/gtk.h>
+ #include <libgnome/gnome-exec.h>
+ #include <libgnome/gnome-util.h>

Added: trunk/dports/gnome/eel/files/patch-eel-eel-gtk-extensions.c.diff
===================================================================
--- trunk/dports/gnome/eel/files/patch-eel-eel-gtk-extensions.c.diff	                        (rev 0)
+++ trunk/dports/gnome/eel/files/patch-eel-eel-gtk-extensions.c.diff	2008-11-01 18:05:23 UTC (rev 41394)
@@ -0,0 +1,28 @@
+--- eel/eel-gtk-extensions.c.orig	2008-11-01 15:41:09.000000000 +0100
++++ eel/eel-gtk-extensions.c	2008-11-01 15:50:36.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <X11/Xatom.h>
+ #include <gdk/gdk.h>
+ #include <gdk/gdkprivate.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
++#endif
+ #include <gtk/gtk.h>
+ #include <math.h>
+ #include "eel-marshal.h"
+@@ -286,6 +288,7 @@
+ 	}
+ }
+ 
++#ifndef GDK_WINDOWING_QUARTZ
+ /**
+  * eel_gtk_window_set_initial_geometry_from_string:
+  * 
+@@ -342,6 +345,7 @@
+ 
+ 	eel_gtk_window_set_initial_geometry (window, geometry_flags, left, top, width, height);
+ }
++#endif
+ 
+ /**
+  * eel_pop_up_context_menu:

Deleted: trunk/dports/gnome/eel/files/patch_eel-Makefile.in
===================================================================
--- trunk/dports/gnome/eel/files/patch_eel-Makefile.in	2008-11-01 18:03:07 UTC (rev 41393)
+++ trunk/dports/gnome/eel/files/patch_eel-Makefile.in	2008-11-01 18:05:23 UTC (rev 41394)
@@ -1,10 +0,0 @@
---- eel/Makefile.in.org	2005-03-15 15:44:06.000000000 +0100
-+++ eel/Makefile.in	2005-03-15 15:44:29.000000000 +0100
-@@ -213,7 +213,6 @@
- #	-DBONOBO_DISABLE_DEPRECATED
- libeel_2_la_LDFLAGS = \
- 	-version-info @EEL_VERSION_INFO@	\
--	-no-undefined				\
- 	$(EEL_LIBS)				\
- 	$(RENDER_LIBS)				\
- 	$(X_LIBS)				\

Deleted: trunk/dports/gnome/eel/files/patch_eel-glib-extensions.c
===================================================================
--- trunk/dports/gnome/eel/files/patch_eel-glib-extensions.c	2008-11-01 18:03:07 UTC (rev 41393)
+++ trunk/dports/gnome/eel/files/patch_eel-glib-extensions.c	2008-11-01 18:05:23 UTC (rev 41394)
@@ -1,16 +0,0 @@
---- eel/eel-glib-extensions.c.org	Wed Apr  7 12:30:35 2004
-+++ eel/eel-glib-extensions.c	Wed Apr  7 12:31:06 2004
-@@ -54,8 +54,11 @@
- static GList *hash_tables_to_free_at_exit;
- 
- /* We will need this for eel_unsetenv if there is no unsetenv. */
--#if !defined (HAVE_UNSETENV)
--extern char **environ;
-+#ifdef __APPLE__
-+# include <crt_externs.h>
-+# define environ (*_NSGetEnviron())
-+#elif
-+ extern char **environ;
- #endif
- 
- /**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081101/416c1818/attachment-0001.html>


More information about the macports-changes mailing list