diff -Nurd -x'*~' gtk+-2.18.9.orig/Makefile.in gtk+-2.18.9/Makefile.in
--- gtk+-2.18.9.orig/Makefile.in	2010-03-17 09:54:37.000000000 -0400
+++ gtk+-2.18.9/Makefile.in	2010-03-18 21:30:52.000000000 -0400
@@ -469,7 +469,7 @@
 	|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
 	&& DISPLAY=:$$XID && export DISPLAY
 
-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules             perf contrib
 SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
 
 # require automake 1.4
diff -Nurd -x'*~' gtk+-2.18.9.orig/configure gtk+-2.18.9/configure
--- gtk+-2.18.9.orig/configure	2010-03-17 09:54:39.000000000 -0400
+++ gtk+-2.18.9/configure	2010-03-18 21:30:52.000000000 -0400
@@ -23842,6 +23842,7 @@
     # Check for Xinerama extension (Solaris impl or Xfree impl)
     gtk_save_cppflags="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $x_cflags"
+    gtk_save_libs="$LIBS"
 
     # Check for XFree
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xinerama support on XFree86" >&5
@@ -23993,7 +23994,7 @@
 
 
   # Check for the RANDR extension
-  if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
+  if $PKG_CONFIG --exists "xrandr >= 99999_FORCE_NONDETECT" ; then
 
 $as_echo "#define HAVE_RANDR 1" >>confdefs.h
 
@@ -24712,7 +24713,7 @@
     fi
   else
     CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O0-9*//' | sed 's/-m^\t*//g'`
-    CUPS_LIBS=`$CUPS_CONFIG --libs`
+    CUPS_LIBS=`$CUPS_CONFIG --libs | sed 's/-liconv//'`
 
     CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
     CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
diff -Nurd -x'*~' gtk+-2.18.9.orig/docs/reference/gdk-pixbuf/Makefile.in gtk+-2.18.9/docs/reference/gdk-pixbuf/Makefile.in
--- gtk+-2.18.9.orig/docs/reference/gdk-pixbuf/Makefile.in	2010-03-17 09:54:26.000000000 -0400
+++ gtk+-2.18.9/docs/reference/gdk-pixbuf/Makefile.in	2010-03-18 21:30:52.000000000 -0400
@@ -463,8 +463,8 @@
 @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp
 
 ########################################################################
-@ENABLE_MAN_TRUE@man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1 
-@ENABLE_MAN_TRUE@BUILT_EXTRA_DIST = $(man_MANS)
+man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1 
+BUILT_EXTRA_DIST = $(man_MANS)
 all: all-am
 
 .SUFFIXES:
diff -Nurd -x'*~' gtk+-2.18.9.orig/docs/reference/gtk/Makefile.in gtk+-2.18.9/docs/reference/gtk/Makefile.in
--- gtk+-2.18.9.orig/docs/reference/gtk/Makefile.in	2010-03-17 09:54:27.000000000 -0400
+++ gtk+-2.18.9/docs/reference/gtk/Makefile.in	2010-03-18 21:30:52.000000000 -0400
@@ -753,8 +753,8 @@
 @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp
 
 ########################################################################
-@ENABLE_MAN_TRUE@man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
-@ENABLE_MAN_TRUE@BUILT_EXTRA_DIST = $(man_MANS)
+man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
+BUILT_EXTRA_DIST = $(man_MANS)
 all: all-am
 
 .SUFFIXES:
diff -Nurd -x'*~' gtk+-2.18.9.orig/gdk/Makefile.in gtk+-2.18.9/gdk/Makefile.in
--- gtk+-2.18.9.orig/gdk/Makefile.in	2010-03-17 09:54:29.000000000 -0400
+++ gtk+-2.18.9/gdk/Makefile.in	2010-03-18 21:30:52.000000000 -0400
@@ -655,7 +655,7 @@
 libgdk_x11_2_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS) \
   $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
 
-libgdk_x11_2_0_la_LDFLAGS = $(LDADD)
+libgdk_x11_2_0_la_LDFLAGS = $(LDADD) -lXrender
 libgdk_quartz_2_0_la_SOURCES = $(common_sources) gdkkeynames.c
 libgdk_quartz_2_0_la_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS) \
   $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
diff -Nurd -x'*~' gtk+-2.18.9.orig/gdk/x11/gdkdrawable-x11.c gtk+-2.18.9/gdk/x11/gdkdrawable-x11.c
--- gtk+-2.18.9.orig/gdk/x11/gdkdrawable-x11.c	2010-01-07 15:04:55.000000000 -0500
+++ gtk+-2.18.9/gdk/x11/gdkdrawable-x11.c	2010-03-18 21:30:52.000000000 -0400
@@ -1044,11 +1044,19 @@
    * RENDER's preferred order
    */
   pf.direct.alphaMask = 0;
-  /* ARGB */
-  pf.direct.red = 16;
-  pf.direct.green = 8;
-  pf.direct.blue = 0;
-  
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      /* ARGB */
+      pf.direct.red = 16;
+      pf.direct.green = 8;
+      pf.direct.blue = 0;
+    } else {
+      /* BGRA */
+      pf.direct.red = 8;
+      pf.direct.green = 16;
+      pf.direct.blue = 24;
+    }
+
   *format = XRenderFindFormat (xdisplay,
 			       (PictFormatType | PictFormatDepth |
 				PictFormatRedMask | PictFormatRed |
@@ -1059,7 +1067,14 @@
 			       0);
 
   pf.direct.alphaMask = 0xff;
-  pf.direct.alpha = 24;
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      /* ARGB */
+      pf.direct.alpha = 24;
+    } else {
+      /* BGRA */
+      pf.direct.alpha = 0;
+    }
   
   *mask = XRenderFindFormat (xdisplay,
 			     (PictFormatType | PictFormatDepth |
@@ -1076,11 +1091,19 @@
 
   pf.type = PictTypeDirect;
   pf.depth = 32;
-  pf.direct.red = 16;
-  pf.direct.green = 8;
-  pf.direct.blue = 0;
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      pf.direct.red = 16;
+      pf.direct.green = 8;
+      pf.direct.blue = 0;
+      pf.direct.alpha = 24;
+    } else {
+      pf.direct.red = 8;
+      pf.direct.green = 16;
+      pf.direct.blue = 24;
+      pf.direct.alpha = 0;
+    }
   pf.direct.alphaMask = 0xff;
-  pf.direct.alpha = 24;
 
   *format = XRenderFindFormat (xdisplay,
 			       (PictFormatType | PictFormatDepth |
diff -Nurd -x'*~' gtk+-2.18.9.orig/gdk-pixbuf/io-png.c gtk+-2.18.9/gdk-pixbuf/io-png.c
--- gtk+-2.18.9.orig/gdk-pixbuf/io-png.c	2010-03-17 09:31:41.000000000 -0400
+++ gtk+-2.18.9/gdk-pixbuf/io-png.c	2011-07-25 02:27:01.000000000 -0400
@@ -184,7 +184,7 @@
                              error_msg);
         }
 
-        longjmp (png_save_ptr->jmpbuf, 1);
+        longjmp (png_jmpbuf(png_save_ptr), 1);
 }
 
 static void
@@ -282,7 +282,7 @@
 		return NULL;
 	}
 
-	if (setjmp (png_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(png_ptr))) {
 	    	g_free (rows);
 
 		if (pixbuf)
@@ -442,7 +442,7 @@
                 return NULL;
         }
         
-	if (setjmp (lc->png_read_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
 		if (lc->png_info_ptr)
 			png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
                 g_free(lc);
@@ -514,7 +514,7 @@
         lc->error = error;
         
         /* Invokes our callbacks as needed */
-	if (setjmp (lc->png_read_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
                 lc->error = NULL;
 		return FALSE;
 	} else {
@@ -734,7 +734,7 @@
                              error_msg);
         }
 
-        longjmp (png_read_ptr->jmpbuf, 1);
+        longjmp (png_jmpbuf(png_read_ptr), 1);
 }
 
 static void
@@ -924,7 +924,7 @@
 	       success = FALSE;
 	       goto cleanup;
        }
-       if (setjmp (png_ptr->jmpbuf)) {
+       if (setjmp (png_jmpbuf(png_ptr))) {
 	       success = FALSE;
 	       goto cleanup;
        }
diff -Nurd -x'*~' gtk+-2.18.9.orig/gtk/gtk-builder-convert gtk+-2.18.9/gtk/gtk-builder-convert
--- gtk+-2.18.9.orig/gtk/gtk-builder-convert	2009-10-09 00:11:26.000000000 -0400
+++ gtk+-2.18.9/gtk/gtk-builder-convert	2010-03-18 21:30:52.000000000 -0400
@@ -527,12 +527,12 @@
         if prop.childNodes:
             data = prop.childNodes[0].data
             value, lower, upper, step, page, page_size = data.split(' ')
-            properties.update(value=value,
-                              lower=lower,
-                              upper=upper,
-                              step_increment=step,
-                              page_increment=page,
-                              page_size=page_size)
+            properties.update({"value":value,
+                               "lower":lower,
+                               "upper":upper,
+                               "step_increment":step,
+                               "page_increment":page,
+                               "page_size":page_size})
         else:
             prop.appendChild(self._dom.createTextNode(""))
 
diff -Nurd -x'*~' gtk+-2.18.9.orig/modules/printbackends/cups/gtkprintbackendcups.c gtk+-2.18.9/modules/printbackends/cups/gtkprintbackendcups.c
--- gtk+-2.18.9.orig/modules/printbackends/cups/gtkprintbackendcups.c	2010-03-17 09:31:49.000000000 -0400
+++ gtk+-2.18.9/modules/printbackends/cups/gtkprintbackendcups.c	2010-03-18 21:31:04.000000000 -0400
@@ -663,6 +663,40 @@
     return FALSE;
 }
 
+#ifndef HAVE_CUPS_API_1_2
+
+const char *
+httpGetHostname(http_t *http,
+                char   *s,
+                int    slen)
+{
+  struct hostent *host;
+
+  if (!s || slen <= 1)
+    return (NULL);
+
+  if (http)
+    {
+      if (http->hostname[0] == '/')
+        g_strlcpy (s, "localhost", slen);
+      else
+        g_strlcpy (s, http->hostname, slen);
+    }
+  else
+    {
+      if (gethostname (s, slen) < 0)
+        g_strlcpy (s, "localhost", slen);
+
+      if (!strchr (s, '.'))
+        {
+          if ((host = gethostbyname (s)) != NULL && host->h_name)
+            g_strlcpy (s, host->h_name, slen);
+        }
+    }
+  return (s);
+}
+#endif
+
 static void
 gtk_print_backend_cups_set_password (GtkPrintBackend  *backend,
                                      gchar           **auth_info_required,
diff -Nurd -x'*~' gtk+-2.18.9.orig/update-gdk-pixbuf-loaders gtk+-2.18.9/update-gdk-pixbuf-loaders
--- gtk+-2.18.9.orig/update-gdk-pixbuf-loaders	1969-12-31 19:00:00.000000000 -0500
+++ gtk+-2.18.9/update-gdk-pixbuf-loaders	2010-03-18 21:30:52.000000000 -0400
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+#
+# update-gdk-pixbuf-loaders
+#
+#   Packages which install gdk-pixbuf loader(s) should call update-gdk-
+#   pixbuf-loaders in their PostInstScript and PostRmScript to update the
+#   gdk-pixbuf.loaders file.
+#
+
+CONFDIR=@PREFIX@/etc/gtk-2.0
+CONFFILE=$CONFDIR/gdk-pixbuf.loaders
+
+mkdir -p $CONFDIR
+
+TMPFILE=`tempfile`
+gdk-pixbuf-query-loaders >$TMPFILE
+
+mv -f $TMPFILE $CONFFILE
+chmod 0644 $CONFFILE
+
+exit 0
diff -Nurd -x'*~' gtk+-2.18.9.orig/update-gtk-immodules gtk+-2.18.9/update-gtk-immodules
--- gtk+-2.18.9.orig/update-gtk-immodules	1969-12-31 19:00:00.000000000 -0500
+++ gtk+-2.18.9/update-gtk-immodules	2010-03-18 21:30:52.000000000 -0400
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+#
+# update-gtk-immodules
+#
+#   Packages which install gtk immodule(s) should call update-gtk-immodules
+#   in their PostInstScript and PostRmScript to update the gtk.immodules file.
+#
+
+CONFDIR=@PREFIX@/etc/gtk-2.0
+CONFFILE=$CONFDIR/gtk.immodules
+
+mkdir -p $CONFDIR
+
+TMPFILE=`tempfile`
+gtk-query-immodules-2.0 >$TMPFILE
+
+mv -f $TMPFILE $CONFFILE
+chmod 0644 $CONFFILE
+
+exit 0
