Update of /cvsroot/fink/experimental/dmacks/finkinfo/gnome-2.28
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv32016

Modified Files:
        gtk+2.info gtk+2.patch 
Removed Files:
        gtk+2-10.4.info 
Log Message:
import new-cups unstream function to be portable to old-cups platforms


Index: gtk+2.patch
===================================================================
RCS file: /cvsroot/fink/experimental/dmacks/finkinfo/gnome-2.28/gtk+2.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gtk+2.patch 15 Feb 2010 20:33:41 -0000      1.1
+++ gtk+2.patch 17 Feb 2010 15:11:52 -0000      1.2
@@ -341,6 +341,88 @@
  #include <string.h>
  #include <stdlib.h>
  
+diff -Nurd -x'*~' 
gtk+-2.18.7.orig/modules/printbackends/cups/gtkprintbackendcups.c 
gtk+-2.18.7/modules/printbackends/cups/gtkprintbackendcups.c
+--- gtk+-2.18.7.orig/modules/printbackends/cups/gtkprintbackendcups.c  
2010-02-12 19:04:42.000000000 -0500
++++ gtk+-2.18.7/modules/printbackends/cups/gtkprintbackendcups.c       
2010-02-17 03:53:16.000000000 -0500
+@@ -54,6 +54,78 @@
+ 
+ #include "gtkcupsutils.h"
+ 
++/*
++  avoid needing to change function-name in copied code or its use
++  later in this gtk source (and avoid multiply-defined symbol if
++  libcups does have it)
++*/
++#define httpGetHostname my_httpGetHostname
++
++/* ***** begin included source from cups/http-addr.c ***** */
++/* ***** that file is: 
++ *   Copyright 2007-2009 by Apple Inc.
++ *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
++ and is LPGL licensed */
++
++/*
++ * 'httpGetHostname()' - Get the FQDN for the connection or local system.
++ *
++ * When "http" points to a connected socket, return the hostname or
++ * address that was used in the call to httpConnect() or httpConnectEncrypt().
++ * Otherwise, return the FQDN for the local system using both gethostname()
++ * and gethostbyname() to get the local hostname with domain.
++ *
++ * @since CUPS 1.2/Mac OS X 10.5@
++ */
++
++const char *                          /* O - FQDN for connection or system */
++httpGetHostname(http_t *http,         /* I - HTTP connection or NULL */
++                char   *s,            /* I - String buffer for name */
++                int    slen)          /* I - Size of buffer */
++{
++  struct hostent      *host;          /* Host entry to get FQDN */
++
++
++  if (!s || slen <= 1)
++    return (NULL);
++
++  if (http)
++  {
++    if (http->hostname[0] == '/')
++      strlcpy(s, "localhost", slen);
++    else
++      strlcpy(s, http->hostname, slen);
++  }
++  else
++  {
++   /*
++    * Get the hostname...
++    */
++
++    if (gethostname(s, slen) < 0)
++      strlcpy(s, "localhost", slen);
++
++    if (!strchr(s, '.'))
++    {
++     /*
++      * The hostname is not a FQDN, so look it up...
++      */
++
++      if ((host = gethostbyname(s)) != NULL && host->h_name)
++      strlcpy(s, host->h_name, slen);
++    }
++  }
++
++ /*
++  * Return the hostname with as much domain info as we have...
++  */
++
++  return (s);
++}
++
++/* ***** end included source from cups/http-addr.c ***** */
++
++
+ 
+ typedef struct _GtkPrintBackendCupsClass GtkPrintBackendCupsClass;
+ 
 diff -Nurd -x'*~' gtk+-2.18.7.orig/tests/testicontheme.c 
gtk+-2.18.7/tests/testicontheme.c
 --- gtk+-2.18.7.orig/tests/testicontheme.c     2009-06-04 15:18:04.000000000 
-0400
 +++ gtk+-2.18.7/tests/testicontheme.c  2010-02-15 04:48:13.000000000 -0500

--- gtk+2-10.4.info DELETED ---

Index: gtk+2.info
===================================================================
RCS file: /cvsroot/fink/experimental/dmacks/finkinfo/gnome-2.28/gtk+2.info,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gtk+2.info  16 Feb 2010 19:32:54 -0000      1.4
+++ gtk+2.info  17 Feb 2010 15:11:52 -0000      1.5
@@ -1,7 +1,6 @@
 Package: gtk+2
 Version: 2.18.7
-Revision: 102
-Distribution: 10.5, 10.6
+Revision: 103
 Description: The Gimp Toolkit
 License: LGPL
 Maintainer: The Gnome Core Team <fink-gnome-c...@lists.sourceforge.net>
@@ -43,7 +42,7 @@
 Source2: mirror:debian:pool/main/g/gtk+2.0/gtk+2.0_2.18.6-1.diff.gz
 Source2-MD5: e58adbde28e1c2e14f4187edaba3bd2b
 PatchFile: %n.patch
-PatchFile-MD5: 672f3d8276c3fcc5c7f067ac41e3b604
+PatchFile-MD5: 84993d81f99e549d1f2caa380b67b9cb
 PatchScript: <<
 #!/bin/sh -ev
        sed -e 's|@PREFIX@|%p|g' <%{PatchFile} | patch -p1
@@ -326,7 +325,10 @@
        http://bugzilla.gnome.org/show_bug.cgi?id=527253
        http://permalink.gmane.org/gmane.os.apple.fink.general/27311
 
-       CUPS backend requires cups>=1.2, which only comes with OS X >= 10.5,
-       so disable it on 10.4 pkg. See:
+       CUPS backend uses httpGetHostname(), which is only available
+       with cups>=1.2, which only comes with OS X >= 10.5. Copy
+       source for that function from recent cups upstream so we are
+       portable back to 10.4 with older cups. See:
        https://bugzilla.gnome.org/show_bug.cgi?id=610176
+       http://svn.easysw.com/public/cups/trunk/cups/http-addr.c
 <<


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to