[crux-commits] ports/opt (2.3): gtk: added patch to fix building with cups 1.3

crux at crux.nu crux at crux.nu
Wed Aug 29 14:07:32 UTC 2007


commit 24c775509ed7ab1f4a5785529bac49d5dd0008a4
Author: Matt Housh <jaeger at crux.nu>
Date:   Wed Aug 29 09:07:25 2007 -0500

    gtk: added patch to fix building with cups 1.3

diff --git a/gtk/.md5sum b/gtk/.md5sum
index 125ae16..bf8b9e6 100644
--- a/gtk/.md5sum
+++ b/gtk/.md5sum
@@ -1,3 +1,4 @@
 4f9fbbc1d43a4e8509ae9abdcd247227  gdk-pixbuf.loaders
 018d7dd0fa7de01cfdb77c7c55e7ba26  gtk+-2.10.14.tar.bz2
 9cad584301bd5f9f47a2428da7035249  gtk.immodules
+eb1659d096092f85f45fc82878673208  http-authstring.patch
diff --git a/gtk/Pkgfile b/gtk/Pkgfile
index 893b50c..a1f9f5a 100644
--- a/gtk/Pkgfile
+++ b/gtk/Pkgfile
@@ -5,12 +5,16 @@
 
 name=gtk
 version=2.10.14
-release=1
+release=2
 source=(ftp://ftp.gtk.org/pub/gtk/v2.10/${name}+-$version.tar.bz2 \
-	gdk-pixbuf.loaders gtk.immodules)
+	gdk-pixbuf.loaders gtk.immodules http-authstring.patch)
 
 build () {
 	cd gtk+-$version
+
+	# fix for building with cups 1.3
+	patch -p1 -i $SRC/http-authstring.patch
+
 	./configure --prefix=/usr \
 		--mandir=/usr/man
 	make
diff --git a/gtk/http-authstring.patch b/gtk/http-authstring.patch
new file mode 100644
index 0000000..0e259b3
--- /dev/null
+++ b/gtk/http-authstring.patch
@@ -0,0 +1,34 @@
+--- gtk+2.0-2.10.13.orig/modules/printbackends/cups/gtkcupsutils.c
++++ gtk+2.0-2.10.13/modules/printbackends/cups/gtkcupsutils.c
+@@ -33,6 +33,9 @@
+ #if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR == 1 && CUPS_VERSION_PATCH >= 20)
+ #define HAVE_HTTP_AUTHSTRING 1
+ #endif
++#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 2)
++#define HAVE_GET_HTTP_AUTHSTRING
++#endif
+ 
+ typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request);
+ 
+@@ -627,7 +630,9 @@
+   httpClearFields(request->http);
+   httpSetField(request->http, HTTP_FIELD_CONTENT_LENGTH, length);
+   httpSetField(request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
+-#ifdef HAVE_HTTP_AUTHSTRING
++#if defined (HAVE_GET_HTTP_AUTHSTRING)
++  httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
++#elif defined (HAVE_HTTP_AUTHSTRING)
+   httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
+ #endif
+ 
+@@ -966,7 +971,9 @@
+     }
+ 
+   httpClearFields(request->http);
+-#ifdef HAVE_HTTP_AUTHSTRING
++#if defined (HAVE_GET_HTTP_AUTHSTRING)
++  httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
++#elif defined (HAVE_HTTP_AUTHSTRING)
+   httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
+ #endif
+ 



More information about the crux-commits mailing list