diff options
author | Jeremy Messenger <mezz@FreeBSD.org> | 2007-01-04 22:49:03 +0000 |
---|---|---|
committer | Jeremy Messenger <mezz@FreeBSD.org> | 2007-01-04 22:49:03 +0000 |
commit | 2a905a8e37003759b8acc4fa8f63072e8ee3bb2f (patch) | |
tree | df236da6dd493c7c9f7ab951a96b5d464886979b /print/libgnomecups | |
parent | 8ab4750b2109ac9832e2c317bb6417ca0a46ba59 (diff) | |
download | ports-2a905a8e37003759b8acc4fa8f63072e8ee3bb2f.tar.gz ports-2a905a8e37003759b8acc4fa8f63072e8ee3bb2f.zip |
Notes
Diffstat (limited to 'print/libgnomecups')
-rw-r--r-- | print/libgnomecups/Makefile | 2 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-20_parse-dot-cups-lpoptions | 14 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-21_fix-islocal | 17 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-22_ignore-ipp-not-found | 12 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-23_replace-set-printer-attrs | 36 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-24_mem-leak | 23 | ||||
-rw-r--r-- | print/libgnomecups/files/patch-25_browsed_ppds | 50 | ||||
-rw-r--r-- | print/libgnomecups/pkg-plist | 30 |
8 files changed, 181 insertions, 3 deletions
diff --git a/print/libgnomecups/Makefile b/print/libgnomecups/Makefile index 335fefc6fa46..7861e2abee05 100644 --- a/print/libgnomecups/Makefile +++ b/print/libgnomecups/Makefile @@ -7,7 +7,7 @@ PORTNAME= libgnomecups PORTVERSION= 0.2.2 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= print gnome MASTER_SITES= ${MASTER_SITE_GNOME} diff --git a/print/libgnomecups/files/patch-20_parse-dot-cups-lpoptions b/print/libgnomecups/files/patch-20_parse-dot-cups-lpoptions new file mode 100644 index 000000000000..ff62dc25443e --- /dev/null +++ b/print/libgnomecups/files/patch-20_parse-dot-cups-lpoptions @@ -0,0 +1,14 @@ +diff -pruN 0.2.2-1/libgnomecups/gnome-cups-printer.c 0.2.2-1ubuntu5/libgnomecups/gnome-cups-printer.c +--- 0.2.2-1/libgnomecups/gnome-cups-printer.c 2005-09-23 21:52:49.000000000 +0100 ++++ libgnomecups/gnome-cups-printer.c 2006-06-27 16:21:38.000000000 +0100 +@@ -510,6 +510,10 @@ parse_lpoptions (cups_dest_t **dests) + num_dests = cups_get_dests (filename, num_dests, dests); + g_free (filename); + ++ filename = g_build_filename (g_get_home_dir (), ".cups", "lpoptions", NULL); ++ num_dests = cups_get_dests (filename, num_dests, dests); ++ g_free (filename); ++ + return num_dests; + } + diff --git a/print/libgnomecups/files/patch-21_fix-islocal b/print/libgnomecups/files/patch-21_fix-islocal new file mode 100644 index 000000000000..af6fa5351165 --- /dev/null +++ b/print/libgnomecups/files/patch-21_fix-islocal @@ -0,0 +1,17 @@ +diff -pruN 0.2.2-1/libgnomecups/gnome-cups-printer.c 0.2.2-1ubuntu5/libgnomecups/gnome-cups-printer.c +--- 0.2.2-1/libgnomecups/gnome-cups-printer.c 2005-09-23 21:52:49.000000000 +0100 ++++ libgnomecups/gnome-cups-printer.c 2006-06-27 16:21:38.000000000 +0100 +@@ -976,8 +980,11 @@ gnome_cups_printer_get_is_local (GnomeCu + { + g_return_val_if_fail (GNOME_CUPS_IS_PRINTER (printer), FALSE); + +- return (printer->details->device_uri != NULL) && +- (strcmp (printer->details->device_uri, "") != 0); ++ return printer->details->device_uri != NULL && ++ strncmp(printer->details->device_uri, "smb:", 4) != 0 && ++ strncmp(printer->details->device_uri, "http:", 5) != 0 && ++ strncmp(printer->details->device_uri, "https:", 5) != 0 && ++ strncmp(printer->details->device_uri, "ipp:", 4) != 0; + } + + void diff --git a/print/libgnomecups/files/patch-22_ignore-ipp-not-found b/print/libgnomecups/files/patch-22_ignore-ipp-not-found new file mode 100644 index 000000000000..8bd4424b3f4f --- /dev/null +++ b/print/libgnomecups/files/patch-22_ignore-ipp-not-found @@ -0,0 +1,12 @@ +diff -pruN 0.2.2-1/libgnomecups/gnome-cups-request.c 0.2.2-1ubuntu5/libgnomecups/gnome-cups-request.c +--- 0.2.2-1/libgnomecups/gnome-cups-request.c 2005-03-28 16:43:06.000000000 +0100 ++++ libgnomecups/gnome-cups-request.c 2006-06-27 16:21:38.000000000 +0100 +@@ -349,7 +349,7 @@ request_thread_main (GnomeCupsRequest *r + if (request->response == NULL) + status = IPP_INTERNAL_ERROR; + +- if (status > IPP_OK_CONFLICT) { ++ if (status > IPP_OK_CONFLICT && status != IPP_NOT_FOUND) { + g_warning ("IPP request failed with status %d", status); + if (request->error != NULL) + *(request->error) = g_error_new (GNOME_CUPS_ERROR, diff --git a/print/libgnomecups/files/patch-23_replace-set-printer-attrs b/print/libgnomecups/files/patch-23_replace-set-printer-attrs new file mode 100644 index 000000000000..ded608b1178e --- /dev/null +++ b/print/libgnomecups/files/patch-23_replace-set-printer-attrs @@ -0,0 +1,36 @@ +diff -pruN 0.2.2-1/libgnomecups/gnome-cups-printer.c 0.2.2-1ubuntu5/libgnomecups/gnome-cups-printer.c +--- 0.2.2-1/libgnomecups/gnome-cups-printer.c 2005-09-23 21:52:49.000000000 +0100 ++++ libgnomecups/gnome-cups-printer.c 2006-06-27 16:21:38.000000000 +0100 +@@ -1237,6 +1244,9 @@ gnome_cups_printer_get_description (Gnom + + } + ++/* Define the CUPS-Add-Modify-Printer, see http://www.cups.org/documentation.php/spec-ipp.html#CUPS_ADD_MODIFY_PRINTER */ ++#define CUPS_ADD_MODIFY_PRINTER 0x4003 ++ + void + gnome_cups_printer_set_description (GnomeCupsPrinter *printer, + const char *description, +@@ -1252,7 +1262,9 @@ gnome_cups_printer_set_description (Gnom + return; + } + +- request = gnome_cups_request_new_for_printer (IPP_SET_PRINTER_ATTRIBUTES, ++ /* As read in http://lists.samba.org/archive/samba-technical/2003-February/027044.html ++ CUPS does not currently support IPP_SET_PRINTER_ATTRIBUTES, so a is used */ ++ request = gnome_cups_request_new_for_printer (CUPS_ADD_MODIFY_PRINTER, + printer); + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_TEXT, + "printer-info", NULL, description); +@@ -1283,9 +1295,9 @@ gnome_cups_printer_set_location (GnomeCu + if (!strcmp (location, printer->details->location)) { + return; + } +- ++ /* Same as above (IPP_SET_PRINTER_ATTRIBUTES replaced by CUPS-Add-Modify-Printer ) */ + request = gnome_cups_request_new_for_printer ( +- IPP_SET_PRINTER_ATTRIBUTES, printer); ++ CUPS_ADD_MODIFY_PRINTER, printer); + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_TEXT, + "printer-location", NULL, location); + response = gnome_cups_request_execute (request, NULL, "/admin/", error); diff --git a/print/libgnomecups/files/patch-24_mem-leak b/print/libgnomecups/files/patch-24_mem-leak new file mode 100644 index 000000000000..868380bb7166 --- /dev/null +++ b/print/libgnomecups/files/patch-24_mem-leak @@ -0,0 +1,23 @@ +diff -urN libgnomecups-0.2.2.orig/libgnomecups/gnome-cups-request.c libgnomecups-0.2.2/libgnomecups/gnome-cups-request.c +--- libgnomecups-0.2.2.orig/libgnomecups/gnome-cups-request.c 2006-07-03 21:55:57.000000000 +0200 ++++ libgnomecups/gnome-cups-request.c 2006-07-03 21:57:00.000000000 +0200 +@@ -470,17 +470,12 @@ + char **attributes) + { + ipp_attribute_t *attr; +- int i; + + attr = ippAddStrings (request, + group, +- IPP_TAG_KEYWORD, ++ IPP_TAG_KEYWORD | IPP_TAG_COPY, + "requested-attributes", +- n_attributes, NULL, NULL); +- +- for (i = 0; i < n_attributes; i++) { +- attr->values[i].string.text = gnome_cups_strdup (attributes[i]); +- } ++ n_attributes, NULL, attributes); + } + + typedef struct diff --git a/print/libgnomecups/files/patch-25_browsed_ppds b/print/libgnomecups/files/patch-25_browsed_ppds new file mode 100644 index 000000000000..902eb029d01f --- /dev/null +++ b/print/libgnomecups/files/patch-25_browsed_ppds @@ -0,0 +1,50 @@ +diff -Nur libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c libgnomecups-0.2.2.new/libgnomecups/gnome-cups-printer.c +--- libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c 2006-09-18 10:23:13.000000000 +0200 ++++ libgnomecups/gnome-cups-printer.c 2006-09-18 10:23:18.000000000 +0200 +@@ -1105,7 +1105,7 @@ + return NULL; + } + +- host = _gnome_cups_printer_get_host (printer); ++ host = _gnome_cups_printer_get_ppd_host (printer); + ppdpath = get_ppd_uri_path (printer); + + gnome_cups_request_file (host, ppdpath, fd, &error); +@@ -1976,3 +1976,26 @@ + + return host; + } ++ ++gchar * ++_gnome_cups_printer_get_ppd_host (GnomeCupsPrinter *printer) ++{ ++ gchar *host = NULL; ++ ++ if (printer->details->printer_uri) { ++ gchar *x, *y; ++ ++ x = strstr (printer->details->printer_uri, "://"); ++ ++ if (x) { ++ x += 3; ++ y = strpbrk (x, ":/"); ++ if (y) ++ host = g_strndup (x, y - x); ++ else ++ host = g_strdup (x); ++ } ++ } ++ ++ return host; ++} +diff -Nur libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.h libgnomecups-0.2.2.new/libgnomecups/gnome-cups-printer.h +--- libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.h 2005-03-04 14:43:33.000000000 +0100 ++++ libgnomecups/gnome-cups-printer.h 2006-09-18 10:23:18.000000000 +0200 +@@ -184,6 +184,7 @@ + /* Private */ + void _gnome_cups_printer_init (void); + gchar *_gnome_cups_printer_get_host (GnomeCupsPrinter *printer); ++gchar *_gnome_cups_printer_get_ppd_host (GnomeCupsPrinter *printer); + + G_END_DECLS + diff --git a/print/libgnomecups/pkg-plist b/print/libgnomecups/pkg-plist index 279efbd47027..707caa19865c 100644 --- a/print/libgnomecups/pkg-plist +++ b/print/libgnomecups/pkg-plist @@ -45,5 +45,31 @@ share/locale/uk/LC_MESSAGES/libgnomecups.mo share/locale/wa/LC_MESSAGES/libgnomecups.mo share/locale/zh_CN/LC_MESSAGES/libgnomecups.mo share/locale/zh_TW/LC_MESSAGES/libgnomecups.mo -@dirrm include/libgnomecups-1/libgnomecups -@dirrm include/libgnomecups-1 +@dirrmtry include/libgnomecups-1/libgnomecups +@dirrmtry include/libgnomecups-1 +@dirrmtry share/locale/zh_TW/LC_MESSAGES +@dirrmtry share/locale/zh_TW +@dirrmtry share/locale/zh_CN/LC_MESSAGES +@dirrmtry share/locale/zh_CN +@dirrmtry share/locale/uk/LC_MESSAGES +@dirrmtry share/locale/uk +@dirrmtry share/locale/sr/LC_MESSAGES +@dirrmtry share/locale/sr +@dirrmtry share/locale/sk/LC_MESSAGES +@dirrmtry share/locale/sk +@dirrmtry share/locale/rw/LC_MESSAGES +@dirrmtry share/locale/rw +@dirrmtry share/locale/pt/LC_MESSAGES +@dirrmtry share/locale/pt +@dirrmtry share/locale/no/LC_MESSAGES +@dirrmtry share/locale/no +@dirrmtry share/locale/ne/LC_MESSAGES +@dirrmtry share/locale/ne +@dirrmtry share/locale/gl/LC_MESSAGES +@dirrmtry share/locale/gl +@dirrmtry share/locale/fi/LC_MESSAGES +@dirrmtry share/locale/fi +@dirrmtry share/locale/cs/LC_MESSAGES +@dirrmtry share/locale/cs +@dirrmtry share/locale/ca/LC_MESSAGES +@dirrmtry share/locale/ca |