gir-repository r168 - in trunk: . gir



Author: tko
Date: Mon Oct 27 11:29:14 2008
New Revision: 168
URL: http://svn.gnome.org/viewvc/gir-repository?rev=168&view=rev

Log:
Build Gtk/Gdk with all GDK targets, not just x11

	* configure.ac:
	* gir/Makefile.am: Build Gtk/Gdk with all GDK targets, not just
	x11. Replace hardcoded x11 target in library and package names
	with a variable checked in configure.
	* gir/Gtk-custom.c:
	* gir/Gtk-custom.h: Include X11 specific customizations only
	when building against X11 target

Modified:
   trunk/configure.ac
   trunk/gir/Gtk-custom.c
   trunk/gir/Gtk-custom.h
   trunk/gir/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Oct 27 11:29:14 2008
@@ -72,9 +72,14 @@
 AM_CONDITIONAL(BUILD_POPPLER, $have_poppler)
 
 dnl gtk+
-PKG_CHECK_MODULES(GTK, gtk+-x11-2.0 >= 1.12.0,
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.12.0,
                   have_gtk=true, have_gtk=false)
 AM_CONDITIONAL(BUILD_GTK, $have_gtk)
+GDK_TARGET=
+if $have_gtk; then
+    GDK_TARGET="$($PKG_CONFIG --variable=target gtk+-2.0)"
+fi
+AC_SUBST(GDK_TARGET)
 
 dnl gconf
 PKG_CHECK_MODULES(GCONF, gconf-2.0,

Modified: trunk/gir/Gtk-custom.c
==============================================================================
--- trunk/gir/Gtk-custom.c	(original)
+++ trunk/gir/Gtk-custom.c	Mon Oct 27 11:29:14 2008
@@ -4,10 +4,11 @@
 #include <config.h>
 
 #include "Gtk-custom.h"
-#include <gdk/gdkx.h>
-
 #include <string.h>
 
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+
 guint32
 gtk_window_get_xid(GtkWindow *window)
 {
@@ -15,6 +16,7 @@
 
     return GDK_WINDOW_XID(GTK_WIDGET(window)->window);
 }
+#endif
 
 GtkWidgetFlags
 gtk_widget_get_flags(GtkWidget *widget)

Modified: trunk/gir/Gtk-custom.h
==============================================================================
--- trunk/gir/Gtk-custom.h	(original)
+++ trunk/gir/Gtk-custom.h	Mon Oct 27 11:29:14 2008
@@ -8,7 +8,9 @@
 
 G_BEGIN_DECLS
 
+#if GDK_WINDOW_X11
 guint32         gtk_window_get_xid                    (GtkWindow            *window);
+#endif
 GtkWidgetFlags  gtk_widget_get_flags                  (GtkWidget            *widget);
 GtkRequisition* gtk_requisition_new                   (void);
 int             gtk_requisition_get_width             (const GtkRequisition *req);

Modified: trunk/gir/Makefile.am
==============================================================================
--- trunk/gir/Makefile.am	(original)
+++ trunk/gir/Makefile.am	Mon Oct 27 11:29:14 2008
@@ -246,8 +246,8 @@
 	Gdk-custom.c \
 	Gdk-custom.h
 
-GDK_INCLUDEDIR=`pkg-config --variable=includedir gdk-x11-2.0`/gtk-2.0
-GDK_LIBDIR=`pkg-config --variable=libdir gdk-x11-2.0`
+GDK_INCLUDEDIR=`pkg-config --variable=includedir gdk-$(GDK_TARGET)-2.0`/gtk-2.0
+GDK_LIBDIR=`pkg-config --variable=libdir gdk-$(GDK_TARGET)-2.0`
 Gdk-2.0.gir: $(srcdir)/cairo-1.0.gir Pango-1.0.gir xlib-2.0.gir GdkPixbuf-2.0.gir $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace Gdk --nsversion=2.0 \
 	    --add-include-path=$(srcdir) --add-include-path=. \
@@ -256,7 +256,7 @@
              --include=Pango-1.0 \
              --include=xlib-2.0 \
              --include=GdkPixbuf-2.0 \
-	     --library=gdk-x11-2.0 \
+	     --library=gdk-$(GDK_TARGET)-2.0 \
 	     $(NOCLOSURE) \
              --output $@ \
              --pkg gobject-2.0 \
@@ -264,7 +264,7 @@
              --pkg cairo \
              --pkg atk \
              --pkg pango \
-             --pkg gdk-x11-2.0 \
+             --pkg gdk-$(GDK_TARGET)-2.0 \
              -I$(GDK_INCLUDEDIR) \
 	     $(srcdir)/Gdk-custom.h \
 	     $(srcdir)/Gdk-custom.c \
@@ -286,8 +286,8 @@
 	Gtk-custom.c \
 	Gtk-custom.h
 
-GTK_INCLUDEDIR=`pkg-config --variable=includedir gtk+-x11-2.0`/gtk-2.0
-GTK_LIBDIR=`pkg-config --variable=libdir gtk+-x11-2.0`
+GTK_INCLUDEDIR=`pkg-config --variable=includedir gtk+-$(GDK_TARGET)-2.0`/gtk-2.0
+GTK_LIBDIR=`pkg-config --variable=libdir gtk+-$(GDK_TARGET)-2.0`
 Gtk-2.0.gir: $(srcdir)/cairo-1.0.gir Pango-1.0.gir Atk-1.0.gir xlib-2.0.gir GdkPixbuf-2.0.gir Gdk-2.0.gir $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace Gtk --nsversion=2.0 \
 	    --add-include-path=$(srcdir) --add-include-path=. \
@@ -297,7 +297,7 @@
              --include=Atk-1.0 \
              --include=GdkPixbuf-2.0 \
              --include=Gdk-2.0 \
-	     --library=gtk-x11-2.0 \
+	     --library=gtk-$(GDK_TARGET)-2.0 \
 	     --library=girepo-Gtk-custom \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -305,8 +305,8 @@
              --pkg cairo \
              --pkg atk \
              --pkg pango \
-             --pkg gdk-x11-2.0 \
-             --pkg gtk+-x11-2.0 \
+             --pkg gdk-$(GDK_TARGET)-2.0 \
+             --pkg gtk+-$(GDK_TARGET)-2.0 \
              --output $@ \
              -D__GTK_FILE_SYSTEM_H__ \
              -D__GTK_TEXT_LAYOUT_H__ \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]