gtk: added patch to fix building with cups 1.3

This commit is contained in:
Matt Housh 2007-08-29 09:07:25 -05:00
parent d1f4894563
commit 24c775509e
3 changed files with 41 additions and 2 deletions

View File

@ -1,3 +1,4 @@
4f9fbbc1d43a4e8509ae9abdcd247227 gdk-pixbuf.loaders
018d7dd0fa7de01cfdb77c7c55e7ba26 gtk+-2.10.14.tar.bz2
9cad584301bd5f9f47a2428da7035249 gtk.immodules
eb1659d096092f85f45fc82878673208 http-authstring.patch

View File

@ -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

34
gtk/http-authstring.patch Normal file
View File

@ -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