Re: files for gtk+-2.18.9 to build with cups enabled

Hanspeter Niederstrasser <[email protected]>
Newsgroups gmane.os.apple.fink.beginners
Organization Snaggled Works
Message-ID <[email protected]>
On 2/9/20 9:22 PM, [email protected] wrote:
> Dear Hanspeter Niederstrasser,
> 
> 1) I firstly changed gtk+2-10.15.info <http://2-10.15.info/> with #Distribution: 10.15.
> 
> $ ls
> gtk+2-10.15.info	gtk+2-cups.patch
> $ fink -m rebuild gtk+2
> …...
> Validating package file /opt/sw/fink/dists/local/main/finkinfo/gtk+2-10.15.info...
> Warning: Incorrect filename 'gtk+2-10.15.info'. Should be one of:
> 	gtk+2.info
> 	gtk+2-2.18.9.info
> 	gtk+2-2.18.9-101.info
> Error: can't read PatchFile. (/opt/sw/fink/dists/local/main/finkinfo/gtk+2.patch)
> Failed: unable to read from /opt/sw/fink/dists/local/main/finkinfo/gtk+2.patch: No such file or directory
> 
> Then renamed gtk+2-10.15.info <http://2-10.15.info/> as gtk+2-2.18.9.info <http://2-2.18.9.info/>.
> 
> $ ls
> gtk+2-2.18.9.info <http://2-2.18.9.info/>	gtk+2-cups.patch
> $ fink -m rebuild gtk+2
> …...
> Validating package file /opt/sw/fink/dists/local/main/finkinfo/gtk+2-2.18.9.info...
> Error: can't read PatchFile. (/opt/sw/fink/dists/local/main/finkinfo/gtk+2.patch)
> Error: use of PatchFileN requires declaring a BuildDepends or Depends on:
> 	fink (>= 0.30.0)
> Failed: unable to read from /opt/sw/fink/dists/local/main/finkinfo/gtk+2.patch: No such file or directory
> 
> gtk+2-2.18.9.info <http://2-2.18.9.info/> could be renamed to others listed, but in vain.
> gtk+2-cups.patch could be renamed to gtk+2.patch, which showed the following;
> 
> $ ls
> gtk+2-2.18.9.info	gtk+2.patch
> $ fink -m rebuild gtk+2
> …...
> Validating package file /opt/sw/fink/dists/local/main/finkinfo/gtk+2-2.18.9.info...
> Error: can't read PatchFile2. (/opt/sw/fink/dists/local/main/finkinfo/gtk+2-cups.patch)
> Error: PatchFile-Checksum does not match PatchFile checksum. (gtk+2-2.18.9.info)
> Expected: ff65044275710a14327d9c813ab2fc4e
> Actual: MD5(ec7cfa11d6f59324d8e5eaafcc8bc1e2)
>          SHA1(48d119867d276fb7a56050a0f6ca006eed4b67e9)
>          SHA256(98afb50fb0abb619b0a689b44fe4bf5a0435c0063e26f4f3738a5fc756d50806)
> Error: use of PatchFileN requires declaring a BuildDepends or Depends on:
> 	fink (>= 0.30.0)
> Failed: unable to read from /opt/sw/fink/dists/local/main/finkinfo/gtk+2-cups.patch: No such file or directory
> 
> 2) I may have missed something essential in your previous message, not the file names alone.
> 
> Donalds, T.

Please keep reply on lists so others can benefit.

I messed up the original file set. Use the 3 attached files and save them to
/opt/sw/fink/dists/local/main/finkinfo/

Hanspeter

_______________________________________________
Fink-beginners mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-beginners
gtk+2-cups.patch (text/plain, 13.5 KB)
diff -ruN gtk+-2.18.9-orig/modules/printbackends/cups/gtkcupsutils.c gtk+-2.18.9/modules/printbackends/cups/gtkcupsutils.c
--- gtk+-2.18.9-orig/modules/printbackends/cups/gtkcupsutils.c	2009-12-18 20:54:51.000000000 -0600
+++ gtk+-2.18.9/modules/printbackends/cups/gtkcupsutils.c	2020-02-03 12:26:43.000000000 -0600
@@ -165,8 +165,8 @@
   request->data_io = data_io;
 
   request->ipp_request = ippNew ();
-  request->ipp_request->request.op.operation_id = operation_id;
-  request->ipp_request->request.op.request_id = 1;
+  ippSetOperation(request->ipp_request, operation_id);
+  ippSetRequestId(request->ipp_request, 1);
 
   language = cupsLangDefault ();
 
@@ -343,8 +343,8 @@
                                   name,
                                   tag);
 
-  if (attribute != NULL && attribute->values != NULL)
-    return attribute->values[0].string.text;
+  if (attribute != NULL && ippGetCount(attribute) != NULL)
+    return ippGetString(attribute, 0, NULL);
   else
     return NULL;
 }
@@ -721,7 +721,7 @@
     request->attempts = 0;
 
     request->state = GTK_CUPS_POST_WRITE_REQUEST;
-    request->ipp_request->state = IPP_IDLE;
+    ippSetState(request->ipp_request, IPP_IDLE);
 }
 
 static void 
@@ -1213,7 +1213,8 @@
   request->state = GTK_CUPS_GET_CHECK;
   request->poll_state = GTK_CUPS_HTTP_READ;
   
-  request->ipp_request->state = IPP_IDLE;
+  ippSetState(request->ipp_request, IPP_IDLE);
+
 }
 
 static void 
diff -ruN 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 08:31:49.000000000 -0500
+++ gtk+-2.18.9/modules/printbackends/cups/gtkprintbackendcups.c	2020-02-03 12:10:54.000000000 -0600
@@ -67,8 +67,8 @@
 /* define this to see warnings about ignored ppd options */
 #undef PRINT_IGNORED_OPTIONS
 
-#define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].integer;}
-#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].string.text;}
+#define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (ippGetName(attr), (a))) v = ippGetInteger(attr, 0);}
+#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (ippGetName(attr), (a))) v = ippGetString(attr, 0, NULL);};
 
 static GType print_backend_cups_type = 0;
 
@@ -457,7 +457,7 @@
       ipp_t *response = gtk_cups_result_get_response (result);
 
       if ((attr = ippFindAttribute (response, "job-id", IPP_TAG_INTEGER)) != NULL)
-	job_id = attr->values[0].integer;
+	job_id = ippGetInteger(attr, 0);
 
       if (!gtk_print_job_get_track_print_status (ps->job) || job_id == 0)
 	gtk_print_job_set_status (ps->job, GTK_PRINT_STATUS_FINISHED);
@@ -808,7 +808,7 @@
 
       dispatch->backend->authentication_lock = TRUE;
 
-      switch (dispatch->request->ipp_request->request.op.operation_id)
+      switch (ippGetOperation(dispatch->request->ipp_request)) 
         {
           case 0:
             prompt = g_strdup_printf ( _("Authentication is required to get a file from %s"), hostname);
@@ -1295,10 +1295,10 @@
   loc = "";
   desc = "";
   job_count = 0;
-  for (attr = response->attrs; attr != NULL; attr = attr->next) 
+  for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
     {
-      if (!attr->name)
-        continue;
+      if (!ippGetName (attr))
+	continue;
 
       _CUPS_MAP_ATTR_STR (attr, loc, "printer-location");
       _CUPS_MAP_ATTR_STR (attr, desc, "printer-info");
@@ -1413,9 +1413,9 @@
   response = gtk_cups_result_get_response (result);
 
   state = 0;
-  for (attr = response->attrs; attr != NULL; attr = attr->next) 
+  for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
     {
-      if (!attr->name)
+      if (!ippGetName(attr))
         continue;
       
       _CUPS_MAP_ATTR_INT (attr, state, "job-state");
@@ -1448,7 +1448,7 @@
       done = TRUE;
       break;
     }
-
+  ; /* TOTAL KLUDGE FOR DEBUG */
   if (!done && data->job != NULL)
     {
       guint32 timeout;
@@ -1594,7 +1594,7 @@
 								  
   response = gtk_cups_result_get_response (result);
 
-  for (attr = response->attrs; attr != NULL; attr = attr->next)
+  for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
     {
       GtkPrinter *printer;
       const gchar *printer_name = NULL;
@@ -1662,46 +1662,47 @@
       
       /* Skip leading attributes until we hit a printer...
        */
-      while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
-        attr = attr->next;
+      attr = ippFirstAttribute (response);
+      while (attr != NULL && ippGetGroupTag(attr) != IPP_TAG_PRINTER)
+	attr = ippNextAttribute (response);
 
       if (attr == NULL)
         break;
 
-      while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
+      while (attr != NULL && ippGetGroupTag(attr) == IPP_TAG_PRINTER)
       {
-        if (strcmp (attr->name, "printer-name") == 0 &&
-	    attr->value_tag == IPP_TAG_NAME)
-	  printer_name = attr->values[0].string.text;
-	else if (strcmp (attr->name, "printer-uri-supported") == 0 &&
-		 attr->value_tag == IPP_TAG_URI)
-	  printer_uri = attr->values[0].string.text;
-	else if (strcmp (attr->name, "member-uris") == 0 &&
-		 attr->value_tag == IPP_TAG_URI)
-	  member_uris = attr->values[0].string.text;
-        else if (strcmp (attr->name, "printer-location") == 0)
-          location = attr->values[0].string.text;
-        else if (strcmp (attr->name, "printer-info") == 0)
-          description = attr->values[0].string.text;
-        else if (strcmp (attr->name, "printer-state-message") == 0)
-          state_msg = attr->values[0].string.text;
-        else if (strcmp (attr->name, "printer-state-reasons") == 0)
+        if (strcmp (ippGetName(attr), "printer-name") == 0 &&
+	    ippGetValueTag(attr) == IPP_TAG_NAME)
+	  printer_name = ippGetString(attr, 0, NULL);
+	else if (strcmp (ippGetName(attr), "printer-uri-supported") == 0 &&
+		 ippGetValueTag(attr) == IPP_TAG_URI)
+	  printer_uri = ippGetString(attr, 0, NULL);
+	else if (strcmp (ippGetName(attr), "member-uris") == 0 &&
+		 ippGetValueTag(attr) == IPP_TAG_URI)
+	  member_uris = ippGetString(attr, 0, NULL);
+        else if (strcmp (ippGetName(attr), "printer-location") == 0)
+          location = ippGetString(attr, 0, NULL);
+        else if (strcmp (ippGetName(attr), "printer-info") == 0)
+          description = ippGetString(attr, 0, NULL);
+        else if (strcmp (ippGetName(attr), "printer-state-message") == 0)
+          state_msg = ippGetString(attr, 0, NULL);
+        else if (strcmp (ippGetName(attr), "printer-state-reasons") == 0)
           /* Store most important reason to reason_msg and set
              its importance at printer_state_reason_level */
           {
-            for (i = 0; i < attr->num_values; i++)
+	    for (i = 0; i < ippGetCount(attr); i++)
               {
-                if (strcmp (attr->values[i].string.text, "none") != 0)
+		if (strcmp (ippGetString(attr, i, NULL), "none") != 0) 
                   {
                     /* Sets is_paused flag for paused printer. */
-                    if (strcmp (attr->values[i].string.text, "paused") == 0)
+                    if (strcmp (ippGetString(attr, i, NULL), "paused") == 0)
                       {
                         is_paused = TRUE;
                       }
 
                     interested_in = FALSE;
                     for (j = 0; j < G_N_ELEMENTS (reasons); j++)
-                        if (strncmp (attr->values[i].string.text, reasons[j], strlen (reasons[j])) == 0)
+                        if (strncmp (ippGetString(attr, i, NULL), reasons[j], strlen (reasons[j])) == 0)
                           {
                             interested_in = TRUE;
                             break;
@@ -1709,90 +1710,90 @@
 
                     if (interested_in)
                       {
-                        if (g_str_has_suffix (attr->values[i].string.text, "-report"))
+                        if (g_str_has_suffix (ippGetString(attr, i, NULL), "-report"))
                           {
                             if (printer_state_reason_level <= 1)
                               {
-                                reason_msg = attr->values[i].string.text;
+                                reason_msg = ippGetString(attr, i, NULL);
                                 printer_state_reason_level = 1;
                               }
                           }
-                        else if (g_str_has_suffix (attr->values[i].string.text, "-warning"))
+                        else if (g_str_has_suffix (ippGetString(attr, i, NULL), "-warning"))
                           {
                             if (printer_state_reason_level <= 2)
                               {
-                                reason_msg = attr->values[i].string.text;
+                                reason_msg = ippGetString(attr, i, NULL);
                                 printer_state_reason_level = 2;
                               }
                           }
                         else  /* It is error in the case of no suffix. */
                           {
-                            reason_msg = attr->values[i].string.text;
+                            reason_msg = ippGetString(attr, i, NULL);
                             printer_state_reason_level = 3;
                           }
                       }
                   }
               }
           }
-        else if (strcmp (attr->name, "printer-state") == 0)
-          state = attr->values[0].integer;
-        else if (strcmp (attr->name, "queued-job-count") == 0)
-          job_count = attr->values[0].integer;
-        else if (strcmp (attr->name, "printer-is-accepting-jobs") == 0)
+        else if (strcmp (ippGetName(attr), "printer-state") == 0)
+          state = ippGetInteger(attr, 0);
+        else if (strcmp (ippGetName(attr), "queued-job-count") == 0)
+          job_count = ippGetInteger(attr, 0);
+        else if (strcmp (ippGetName(attr), "printer-is-accepting-jobs") == 0)
           {
-            if (attr->values[0].boolean == 1)
+            if (ippGetBoolean(attr, 0) == 1)
               is_accepting_jobs = TRUE;
             else
               is_accepting_jobs = FALSE;
           }
-        else if (strcmp (attr->name, "job-sheets-supported") == 0)
+        else if (strcmp (ippGetName(attr), "job-sheets-supported") == 0)
           {
             if (cups_backend->covers == NULL)
               {
-                cups_backend->number_of_covers = attr->num_values;
+                cups_backend->number_of_covers = ippGetCount(attr);
                 cups_backend->covers = g_new (char *, cups_backend->number_of_covers + 1);
                 for (i = 0; i < cups_backend->number_of_covers; i++)
-                  cups_backend->covers[i] = g_strdup (attr->values[i].string.text);
+                  cups_backend->covers[i] = g_strdup (ippGetString(attr, i, NULL));
                 cups_backend->covers[cups_backend->number_of_covers] = NULL;
               }
           }
-        else if (strcmp (attr->name, "job-sheets-default") == 0)
+        else if (strcmp (ippGetName(attr), "job-sheets-default") == 0)
           {
-            if (attr->num_values == 2)
+            if (ippGetCount(attr) == 2)
               {
-                default_cover_before = attr->values[0].string.text;
-                default_cover_after = attr->values[1].string.text;
+                default_cover_before = ippGetString(attr, 0, NULL);
+                default_cover_after = ippGetString(attr, 1, NULL);
               }
           }
-        else if (strcmp (attr->name, "printer-type") == 0)
+        else if (strcmp (ippGetName(attr), "printer-type") == 0)
           {
             got_printer_type = TRUE;
-            if (attr->values[0].integer & 0x00020000)
+            if (ippGetInteger(attr, 0) & 0x00020000)
               default_printer = TRUE;
             else
               default_printer = FALSE;
 
-            if (attr->values[0].integer & 0x00000002)
+            if (ippGetInteger(attr, 0) & 0x00000002)
               remote_printer = TRUE;
             else
               remote_printer = FALSE;
           }
-        else if (strcmp (attr->name, "auth-info-required") == 0)
+        else if (strcmp (ippGetName(attr), "auth-info-required") == 0)
           {
-            if (strcmp (attr->values[0].string.text, "none") != 0)
+            if (strcmp (ippGetString(attr, 0, NULL), "none") != 0)
               {
-                auth_info_required = g_new0 (gchar *, attr->num_values + 1);
-                for (i = 0; i < attr->num_values; i++)
-                  auth_info_required[i] = g_strdup (attr->values[i].string.text);
+                auth_info_required = g_new0 (gchar *, ippGetCount(attr) + 1);
+                for (i = 0; i < ippGetCount(attr); i++)
+                  auth_info_required[i] = g_strdup (ippGetString(attr, i, NULL));
               }
           }
         else
 	  {
 	    GTK_NOTE (PRINTING,
-                      g_print ("CUPS Backend: Attribute %s ignored", attr->name));
+                      g_print ("CUPS Backend: Attribute %s ignored", ippGetName(attr)));
 	  }
 
-        attr = attr->next;
+        attr = ippNextAttribute (response);
       }
 
       if (printer_name == NULL ||
@@ -2600,7 +2601,7 @@
   response = gtk_cups_result_get_response (result);
   
   if ((attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME)) != NULL)
-    print_backend->default_printer = g_strdup (attr->values[0].string.text);
+    print_backend->default_printer = g_strdup (ippGetString(attr, 0, NULL));
 
   print_backend->got_default_printer = TRUE;
gtk+2.info (text/plain, 10.7 KB)
Package: gtk+2
Version: 2.18.9
Revision: 101
#Distribution: 10.14.5, 10.15
Description: The Gimp Toolkit
License: LGPL
Maintainer: The Gnome Core Team <[email protected]>

Depends: <<
	%N-shlibs (= %v-%r),
	glib2-shlibs (>= 2.22.0-1),
	libgettext8-shlibs,
	x11
<<
BuildDepends: <<
	atk1 (>= 1.32.0-1),
	cairo (>= 1.12.14-1),
	fink (>= 0.30.0),
	fink-package-precedence,
	fontconfig2-dev (>= 2.10.0-1),
	freetype219 (>= 2.6-1),
	gettext-bin,
	gettext-tools,
	glib2-dev (>= 2.22.0-1),
	gtk-doc (>= 1.13-5),
	libgettext8-dev,
	libjasper.1 (>= 1.900.1-4),
	libjpeg9,
	libpng16,
	libtiff5,
	pango1-xft2-ft219-dev (>= 1.24.5-4),
	pkgconfig (>= 0.23),
	x11-dev
<<
Conflicts: %N-common
Replaces: %N-common
Source: mirror:gnome:sources/gtk+/2.18/gtk+-%v.tar.bz2
Source-MD5: f680d38c973635365acababacb1730ec
#Source2: mirror:debian:pool/main/g/gtk+2.0/gtk+2.0_2.18.7-1.diff.gz
Source2: https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/mac/fink/gtk+2.0_2.18.7-1.diff.gz
Source2-MD5: 4a41c6d2b5d29833759610abe1268686
PatchFile: %n.patch
PatchFile-MD5: ff65044275710a14327d9c813ab2fc4e
PatchFile2: %n-cups.patch
PatchFile2-MD5: ec7cfa11d6f59324d8e5eaafcc8bc1e2
PatchScript: <<
#!/bin/sh -ev
	sed -e 's|@PREFIX@|%p|g' <%{PatchFile} | patch -p1
	patch -p1 < %{PatchFile2}
	gzip -dc ../gtk*.diff.gz | patch -p1
	for file in \
		015_default-fallback-icon-theme.patch \
		042_treeview_single-focus.patch \
		060_ignore-random-icons.patch \
	; do
		echo "applying $file"
		patch -p1 < debian/patches/$file
	done
#	perl -pi -e 's,/usr/bin/env python,/usr/bin/python,' gtk/gtk-builder-convert
	perl -pi -e 's,/usr/share/gtk-doc/html,%p/share/gtk-doc/html,g' docs/reference/*/html/*.html
	perl -pi -e 's/\$\(no_undefined\)/-no-undefined/' `find . -name Makefile.in`
	perl -pi -e 's,libpng12,libpng16,' configure
<<

SetCPPFLAGS: -D_IPP_PRIVATE_STRUCTURES=1
SetCFLAGS: -Os
SetCXXFLAGS: -Os
ConfigureParams: <<
	--mandir=%p/share/man \
	--disable-shm \
	--disable-gtk-doc \
	--enable-dependency-tracking \
	--disable-explicit-deps \
	--enable-cups \
	--disable-papi \
	--with-libjasper \
	--disable-visibility \
	PKG_CONFIG_PATH="%p/lib/glib-2.0/pkgconfig-strict:$PKG_CONFIG_PATH"
<<

CompileScript: <<
	./configure %c
	make
	fink-package-precedence --prohibit-bdep %n-dev .
<<
InfoTest: TestScript: make -C tests || exit 2
InstallScript: <<
	make install DESTDIR=%d
	find %i/lib/gtk-2.0 -name \*.la | xargs perl -pi -e "s/^(dependency_libs|inherited_linker_flags)=.*/\1=''/" 

	install -d -m 755 %i/sbin
	install -c -m 755 update-gdk-pixbuf-loaders %i/sbin/
	install -c -m 755 update-gtk-immodules %i/sbin/

	# libversioned actual placed in %N-shlibs because needed
	# during %N-shlibs PostInst; keep unversioned links in %N for
	# legacy compat for others' PostInst
	mv %i/bin/gdk-pixbuf-query-loaders     %i/bin/gdk-pixbuf-query-loaders-2.0
	ln -s     gdk-pixbuf-query-loaders-2.0 %i/bin/gdk-pixbuf-query-loaders
	perl -pi -e 's/(gdk-pixbuf-query-loaders)/\1-2.0/' %i/sbin/update-gdk-pixbuf-loaders
	mv %i/sbin/update-gdk-pixbuf-loaders     %i/sbin/update-gdk-pixbuf-loaders-2.0
	ln -s      update-gdk-pixbuf-loaders-2.0 %i/sbin/update-gdk-pixbuf-loaders
	mv %i/sbin/update-gtk-immodules     %i/sbin/update-gtk-immodules-2.0
	ln -s      update-gtk-immodules-2.0 %i/sbin/update-gtk-immodules

	install -d -m 755 %i/etc/gtk-2.0
	touch %i/etc/gtk-2.0/gtk.immodules
	touch %i/etc/gtk-2.0/gdk-pixbuf.loaders
<<
DocFiles: <<
	AUTHORS COPYING ChangeLog
	gdk-pixbuf/ChangeLog:ChangeLog.gdk-pixbuf
	modules/engines/pixbuf/ChangeLog:ChangeLog.modules.engines.pixbuf
	modules/other/gail/ChangeLog:ChangeLog.modules.other.gail
	NEWS README
<<
SplitOff: <<
	Package: %N-shlibs
	Depends: <<
		atk1-shlibs (>= 1.32.0-1),
		cairo-shlibs (>= 1.12.14-1),
		dpkg-base-files,
		fontconfig2-shlibs (>= 2.10.0-1),
		freetype219-shlibs (>= 2.6-1),
		glib2-shlibs (>= 2.22.0-1),
		libgettext8-shlibs,
		libjasper.1-shlibs (>= 1.900.1-4),
		libjpeg9-shlibs,
		libpng16-shlibs,
		libtiff5-shlibs,
		pango1-xft2-ft219-shlibs (>= 1.24.5-4),
		pango1-xft2-ft219 (>= 1.24.5-4),
		shared-mime-info (>= 0.70-1),
		x11-shlibs
	<<
	Replaces: <<
		%N (<< 2.14.4-1),
		%N-dev (<< 2.18.7-1),
		gtk2-engines (<< 2.6.3-1),
		gail16, gail17, gail18,
		gail18-shlibs
	<<
	Conflicts: jpilot (<< 0.99.9-12), jpilot-ssl, sylpheed-gpgme (<< 2.3.0-2), sylpheed (<< 2.3.0-2), sylpheed-ssl
	DocFiles: <<
		AUTHORS COPYING ChangeLog
		gdk-pixbuf/ChangeLog:ChangeLog.gdk-pixbuf
		modules/engines/pixbuf/ChangeLog:ChangeLog.modules.engines.pixbuf
		modules/other/gail/ChangeLog:ChangeLog.modules.other.gail
		NEWS README
	<<
	RuntimeVars: GDK_USE_XFT: 1
	Files: <<
		bin/gdk-pixbuf-query-loaders-2.0
		bin/gtk-query-immodules-2.0
		etc/gtk-2.0
		lib/libgailutil.18*.dylib
		lib/lib*-2.0.*.dylib
		lib/gtk-2.0/2.10.0/engines
		lib/gtk-2.0/2.10.0/immodules
		lib/gtk-2.0/2.10.0/loaders
		lib/gtk-2.0/2.10.0/printbackends
		lib/gtk-2.0/modules
		sbin/update-gdk-pixbuf-loaders-2.0
		sbin/update-gtk-immodules-2.0
		share/locale
		share/man/man1/gtk-query-immodules-2.0.1
		share/themes
	<<
	Shlibs: <<
		%p/lib/libgailutil.18.dylib           19.0.0 %n (>= 2.14.3-1)
		%p/lib/libgdk-x11-2.0.0.dylib         1801.0.0 %n (>= 2.18.7-1)
		%p/lib/libgdk_pixbuf-2.0.0.dylib      1801.0.0 %n (>= 2.18.7-1)
		%p/lib/libgdk_pixbuf_xlib-2.0.0.dylib 1801.0.0 %n (>= 2.18.7-1)
		%p/lib/libgtk-x11-2.0.0.dylib         1801.0.0 %n (>= 2.18.7-1)
	<<
	PostInstScript: <<
		case "$1" in
			configure)
				update-gdk-pixbuf-loaders-2.0
				update-gtk-immodules-2.0
				;;
		esac
	<<
<<
SplitOff2: <<
	Package: %N-dev
	Depends: <<
		%N (= %v-%r),
		%N-shlibs (= %v-%r),
		glib2-shlibs (>= 2.22.0-1),
		libgettext8-shlibs,
		x11
	<<
	Conflicts: <<
		gtk+ (<< 1.2.10-12),
		gail16-dev, gail17-dev, gail18-dev
	<<
	Replaces: <<
		%N (<< 2.14.5-1),
		%N-shlibs (<< 2.14.3-1),
		gail16, gail17, gail18,
		gail16-dev, gail17-dev, gail18-dev
	<<
	BuildDependsOnly: True
	DocFiles: <<
		AUTHORS COPYING ChangeLog
		gdk-pixbuf/ChangeLog:ChangeLog.gdk-pixbuf
		modules/engines/pixbuf/ChangeLog:ChangeLog.modules.engines.pixbuf
		modules/other/gail/ChangeLog:ChangeLog.modules.other.gail
		NEWS README
	<<
	Files: <<
		bin/gdk-pixbuf-csource
		bin/gtk-builder-convert
		include
		lib
		share/aclocal
		share/gtk-doc
		share/man/man1/gdk-pixbuf-csource.1
		share/man/man1/gtk-builder-convert.1
	<<
<<

Homepage: http://www.gtk.org
DescDetail: <<
The X libraries originally written for the GIMP, which are now used by
several other programs as well.
<<
DescUsage: <<
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.

Packages which install gtk immodule(s) should call update-gtk-immodules
in their PostInstScript and PostRmScript to update the gtk.immodules file.

Reinstall %N-shlibs to regenerate those index files if they get
damaged or lost.

If you get "Operation not supported" errors when trying to open URLs
in gtk-based apps, try installing gvfs.
<<

DescPackaging: <<
Older versions of gtk2-engines had a pixbuf theme, but now gtk+2 has
that itself (and gtk2-engines has dropped or renamed it).

	Move some .la %N-shlibs -> %N.dev as of 2.14.3-1

	Minimize propagation of InheritedBuildDepends

	The stand-alone gail packages are obsolete as of gtk+2 2.14.3-1,
	at which point gtk+2 starting including gail18.

	Move lib/gtk-2.0/modules/*.so %N -> %N-shlibs as of 2.14.3-2
	(dir is as versioned as pkgname is)

	Move etc/gtk-2.0/im-multipress.conf %N -> %N-shlibs as of 2.14.3-2
	gtk-2.0/2.10.0/immodules/im-multipress.so in %N-shlibs
	(dir is as versioned as pkgname is, could change name in
	modules/input/gtkimcontextmultipress.c if need orthogonal
	filename for new  libversion pkgname)

	Move share/themes %N -> %N-shlibs as of 2.14.3-2
	(dir is as versioned as pkgname is, could split off into
	%N-themes if needed to keep across new libversion pkgname)

	Move gdk-pixbuf-csource %N -> %N-dev as of 2.14.5-1
	(developer tool to generate C code)

	Patch gtk-builder-convert to work with any python version.
	See: http://bugzilla.gnome.org/show_bug.cgi?id=559947

	As of 2.14.7-1, %N-shlibs contains a libversioned form of many
	utility programs that generate files needed by %N-shlibs so
	that users don't need to install %N in order for %N-shlibs to
	have the files. All data being handled is already in
	libversioned directories, so still sane for Shlibs Policy.

	As of 2.14.7-1, there are blank files installed in the .deb
	for the live indexes generated by the update-gtk-immodules and
	update-gdk-pixbuf-loaders scripts (run during PostInst).
	Having these files "owned" allows dpkg to remove them
	automatically when the package that can create them is
	removed, rather than needing to play PostRm purge and hope
	that doesn't interfere with a differently-named package that
	may handle these files in the future.

	Regenerating gtk-doc files The Right Way (--enable-gtk-doc) is
	very slow, so just patch the prefix in the bad URLs in the
	existing generated files.

	Fix install of manpages without regenerating them. See:
	http://bugzilla.gnome.org/show_bug.cgi?id=578765

	Tentatively okay to ignore diagnostics about symbolic color
	names in some themes' gtkrc. See:
	http://bugzilla.gnome.org/show_bug.cgi?id=586711

	Clear dep_libs from modules' .la because some inherit
	-framework flag from apple's cups-config.

	Don't lose early LIBS settings during ./configure. See:
	https://bugzilla.gnome.org/show_bug.cgi?id=608558

	Make sure we look for correct libpng (x11 may supply an older
	one that confuses configure test)

	Import modernization of libpng API jmpbuf calls from
	gdk-pixbuf-2.23.5

	"cups-config --libs" sometimes publishes "-liconv", which is
	not part of the public API of cups, so elide it rather than
	pushing a useless dep

	pango runtime (pango1-xft2-ft129-shlibs) often whines about
	missing fonts, which are in pango1-xft2-ft219. That package
	cannot be made a dep of the -shlibs (would be circular). So we
	have it as a dep here, which has the effect of "any package
	using gtk+2 runtime gets pango's fonts at runtime, so pango's
	runtime is happy"
<<
DescPort: <<
	gtk+2-dev conflicts with gtk+ (<< 1.2.11), because it has
	symbolic link which intercepts include files of the package.

	Import some Debian patches (whichever ones look useful)

	Make sure libgdk-x11 links against Xrender even on 10.4. See:
	http://bugzilla.gnome.org/show_bug.cgi?id=555763

	CUPS backend uses httpGetHostname(), which is only available
	with cups>=1.2, which only comes with OS X >= 10.5. Use
	upstream patch to import local copy of that function for
	platforms where system cups is too old.
	https://bugzilla.gnome.org/show_bug.cgi?id=610176

	Hidden-visibility is only partially supported on non-ELF and
	causes problems on 10.7 due to use of weak aliases. Removed in
	future glib upstream, so scrap it here too. See:
	http://permalink.gmane.org/gmane.os.apple.fink.gnome/2592
<<
gtk+2.patch (text/plain, 10.3 KB)
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
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.