From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-print/libgnomecups/Manifest | 14 + net-print/libgnomecups/files/enablenet.patch | 11 + .../files/libgnomecups-0.2.3-cups-1.6.patch | 285 +++++++++++++++++++++ .../files/libgnomecups-0.2.3-cups-config.patch | 34 +++ .../files/libgnomecups-0.2.3-format-string.patch | 34 +++ .../libgnomecups-0.2.3-g_list_find_custom.patch | 94 +++++++ .../files/libgnomecups-0.2.3-glib.h.patch | 38 +++ .../files/libgnomecups-0.2.3-lpoptions.patch | 13 + .../files/libgnomecups-0.2.3-pkgconfig.patch | 10 + .../libgnomecups/libgnomecups-0.2.3-r3.ebuild | 49 ++++ .../libgnomecups/libgnomecups-0.2.3-r5.ebuild | 64 +++++ net-print/libgnomecups/metadata.xml | 12 + 12 files changed, 658 insertions(+) create mode 100644 net-print/libgnomecups/Manifest create mode 100644 net-print/libgnomecups/files/enablenet.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch create mode 100644 net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch create mode 100644 net-print/libgnomecups/libgnomecups-0.2.3-r3.ebuild create mode 100644 net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild create mode 100644 net-print/libgnomecups/metadata.xml (limited to 'net-print/libgnomecups') diff --git a/net-print/libgnomecups/Manifest b/net-print/libgnomecups/Manifest new file mode 100644 index 000000000000..8f2d785c0f4a --- /dev/null +++ b/net-print/libgnomecups/Manifest @@ -0,0 +1,14 @@ +AUX enablenet.patch 550 SHA256 14885c66f2367d6a9e21a2e542b844b5be4e52a8a7d0c400c4cc477cadcea3b1 SHA512 97558a34d8ad0d67e8521e35a6cdde5967ec08718c1a71f8c141f7caa535ca6b9def6a6804a50779cb3f1a4fb00d3e7abdc2bb24ebeb3636cce359247cdfc503 WHIRLPOOL 0309d537826948e088195209565a010a238179a1a30cb1b704b70f14a0e70eead62ef01207fa99e2788af3a7ebb58717f16983c7a72bb68ed94f1eb0a3723801 +AUX libgnomecups-0.2.3-cups-1.6.patch 10048 SHA256 edda0fcf15ac772a5553367221d2761d6867f7292bc6c6ad03c9772f56dede1e SHA512 23de02427a751df314384d7a8f8c56fb2e780ba897359e4deaa8dce0e1a7f4844613e40432f00aa066e501bf8154c61da8f8dcbe532a5b0216ec4e00d333a373 WHIRLPOOL 506b0ca4ba13845bc54d1e095bf8aaf1e899faeca300a1a45c70f8e09490a6c393ab873b9cb132193ca319217da4a65b83437a9bf7a8d46eca7da53cb9470517 +AUX libgnomecups-0.2.3-cups-config.patch 1087 SHA256 54269ade07136fdc24b92fd4e20073fffe5b9e2235bd8c53ba21f9b5494c6538 SHA512 5f20fd5618b503f79e8324c60e5bae543ddb736d0007bbf7e454e128efb61c420997523d14fe3585f696b4300318ebd4e5abf67a048a2d01e9a2f2fc72e2d05c WHIRLPOOL 3769be99f3252ac2105ad8a81db6bfc128b3f51a5b78092be0c954bc2ed51e07b4f2d3df4e6bb28eb085f7ad09b126d9ad5886cb2691e300316cdca2b26a17a8 +AUX libgnomecups-0.2.3-format-string.patch 1328 SHA256 2ff90eefe428569a4890c1557cf590f9e7653861f88a8c954e24d3b5c899f38d SHA512 08f826060d7c2ea224c3628a560d46972c3ece3303518ec92159133ddf4aee0a836e6db5fb5b326406b7110cbc10273e3fe4d620dd9eb587193cfaae190276d1 WHIRLPOOL 5e780d59e2a4e55718e7a98c83a3dcb3da5e706635f062530175633d0ddf4a689b5f397a06a5af30b5e03e13db07d5e5d1ca29dd02805bcfc7bd467b9f736d31 +AUX libgnomecups-0.2.3-g_list_find_custom.patch 3300 SHA256 8242cca424d91560dbc78e85501632a8649a4fa53f137853599f67f35b07f40f SHA512 6aab047fd99e528e2d326fa4dfafcb26e29a57c7a6ea9b4b01979fbc8b025952728b93e3671798159dced1ebe62b7adb0a82b8143432cdc23cb887190ff0db6c WHIRLPOOL 25f783a8169504a5c850f20461a9dc834a95737d2ff8b3527b7ccfce5a25fcf5ba8099f0490120c5f8d92c2ea970ef99b8ca2bc6aadaf2ea1b504df11e8b2f1e +AUX libgnomecups-0.2.3-glib.h.patch 1017 SHA256 647f51deae54fbca376ad9febdb9047d4bc4f1f80be76abc671297e76176c3f5 SHA512 111082722396a40b7a249d088cf60bdd7c21a62aa89df6b84d0ae6d38e0175e7a5a07f701660964c1fac0b413f68398e023bf02eacc7b0b1e963f805390c579e WHIRLPOOL a7453c9187fdfc93ca8b1bef8d65fe0bd93903830c73bfeb59c108b7140ad58edea8087bd4d6cebfc6cc5fb5a89c3b847ca8889711ab548d63bcaa736772490c +AUX libgnomecups-0.2.3-lpoptions.patch 408 SHA256 e14ba092fb426f4b64bb0b26d7f36562c8177d2eb824a7d30ce46ef0d156ead9 SHA512 6d64b0b14dcce03a36a1c0b257e19c37e93778552f306ee312b019690fc35b64b0f1f5c1dc54c72ee85dad755b1facb607d5ef7914c6af01c4bcb86ad4628c85 WHIRLPOOL 7e350551c71ea9347650f75eae87bdeda9a6fdef76c8b9c706ca9071ff368f6eb76fba97e61124905e4125e892fe0c50a559c3d13a37f7dda6feed04c6d339ca +AUX libgnomecups-0.2.3-pkgconfig.patch 404 SHA256 ac43b6c676659605911437a30c31bd30af869798dddae8f22ac6e485344cdff3 SHA512 2a3ea4921c01c01a55266deaf36d9ff2b0511592be1e58add93af398b9d0d92b21d8c3fe62446b09a939b46569997381a8e56435797625758a22b7d52914c3f8 WHIRLPOOL 862adfead1ad09e2f6e30f7bb8500fdf5fc4c9871cdd56665e44b1984951c3e9950d813526fc8dbbd06699706e23ba3917ca9b459cc8c8c77e01d66e10595019 +DIST libgnomecups-0.2.3.tar.bz2 357129 SHA256 e130e80942b386de19a288a4c194ff3dbe9140315b31e982058c8bffbb6a1d29 SHA512 7276dfc92209c8503d8a59ceb192273e41bc13cc5f3515dcc00444deca4b9de6a29d0ec4c89811398e03971fa3f5ccbb85ca477da6c5f2bc26f2fb70dccb6a75 WHIRLPOOL 1bc4693d039d1e51853af74e6928f363ed0d9b29cf9260de162054d0ad84de645ff34d452b8865440d3a3eaf91ae0c3952363c4f4f405f1a023fe227bccd8f78 +EBUILD libgnomecups-0.2.3-r3.ebuild 1124 SHA256 bf13ef5d492439994e8efe1eafe678875f42e879ac739417216b225da099f06b SHA512 312242157d210f826f7aa5959e5f1eaea7838f554c999cc20bc78be55a44103b88c575713d00b138b9080ec1cee9c0f23cbb2c5e7ebd407b75a70c4fe5679e32 WHIRLPOOL 22c0642eb0ec740c924612656e10e3306094052f33c75d9e9b0a8f2eb62d66e210367e4a9c74d16570b97c1714cf2510bf13491c40f7ad0dd515f9c193c5c420 +EBUILD libgnomecups-0.2.3-r5.ebuild 1669 SHA256 190c0e429766436f3f998e7259ca3a3230b9757884599b6501f51bd49988cb57 SHA512 43c3ac9eba4b83fed2208349c865c37a1ddd8f620d1d38b70ceffc61d6466c559907dcfe575369f46e1d96153cc4de7f01e73870b64dc24eb4dd4897411ebacc WHIRLPOOL 35e71ad07fed4b66ae157fec1f3cca3ec211b0fac0bc682d986ce75819f03c16d3934cea7bc46fda429852593a3a7bda9717243e2396443054db8e6d8ff17e4c +MISC ChangeLog 3077 SHA256 c04b10ec4d2444ffdd98f276dac3d9b4dd306f7125b4c1dea3daa08dde51e47a SHA512 8c2ec6e863f626a0c5e74a554d25b983024636b69c10645cd23124c7a980a845fbbac849f68f55344466483ef11d3d7e6b115037b5c916e0f91280da2a508022 WHIRLPOOL 1dc6b7d79d6cae017b68b27f113819adfb33910a4a9a9dba010bfc796332d39e9f7848a12eb3f085ec0d9d0bc553f071fde8e7f450883912dafe6058d95872e2 +MISC ChangeLog-2015 13931 SHA256 6c9a34ca338bcc300896fa589cb5388955aa772e2ee433d8d748cbc0d612a13e SHA512 f7243bd0243d1d7496086d8a90749bf882aa801cc6700a994a2df8532043eb187ebe68b6d76c041cbf43e1bc8b0ca8eb40aa07619ebb1806139626ba8baf192a WHIRLPOOL 0ff25e9f4eda31345a7b227397184157ea2c62a9c709c0612e3ebbd4a2202f4b88978765be434ccf355733b9c19d9f842f583ef8f8ab09444814794278ffdf7d +MISC metadata.xml 365 SHA256 333811bdc412873d5121d06a23fa4717e4396f0e644675f613206fccd8d5eea8 SHA512 6696e110749820558c770f257f4f74d8d4a6fb617e9f74b7170e12a6c353a03a4fbfbc1c39f2247657f515079d541752da8f6f993d37464523ae5364f0e7c6e9 WHIRLPOOL 768b6ee23f48f7358a004c278279414950b10f2b0760c59ea9ec145a784cfcadc520f5fcbe4f57c45dc1a1e182f6fddd18637c32c3f2fccfb54eb631b4cda3c9 diff --git a/net-print/libgnomecups/files/enablenet.patch b/net-print/libgnomecups/files/enablenet.patch new file mode 100644 index 000000000000..f2e113d1440f --- /dev/null +++ b/net-print/libgnomecups/files/enablenet.patch @@ -0,0 +1,11 @@ +--- libgnomecups/gnome-cups-printer.c.orig 2005-08-04 18:21:32.221038336 +0000 ++++ libgnomecups/gnome-cups-printer.c 2005-08-04 18:22:00.369759080 +0000 +@@ -282,7 +282,7 @@ + * that will produce an infinite loop when presented with an invalid + * hostname. This will also produce a hang if the remote printer is + * unavailable and we do a syncronous lookup. */ +-static gboolean go_directly_to_printer_when_possible = FALSE; ++static gboolean go_directly_to_printer_when_possible = TRUE; + + static void + update_attributes (GnomeCupsPrinter *printer) diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch new file mode 100644 index 000000000000..68f379c25109 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch @@ -0,0 +1,285 @@ +From ae783efde4fa69578651994505462f02b8639220 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Tue, 7 Aug 2012 06:53:09 -0400 +Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions + +CUPS 1.6 makes various structures private and introduces these ippGet +and ippSet functions for all of the fields in these structures. +http://www.cups.org/str.php?L3928 + +We define our own accessors when building against CUPS < 1.6. + +Based on work by Jiri Popelka at +https://bugzilla.gnome.org/show_bug.cgi?id=679759 +--- + libgnomecups/gnome-cups-printer.c | 48 +++++++++++++++++++++++++++++------- + libgnomecups/gnome-cups-queue.c | 43 +++++++++++++++++++++++++++------ + libgnomecups/gnome-cups-request.c | 44 ++++++++++++++++++++++++++++----- + 3 files changed, 110 insertions(+), 25 deletions(-) + +diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c +index c924af0..f5e1ef7 100644 +--- a/libgnomecups/gnome-cups-printer.c ++++ b/libgnomecups/gnome-cups-printer.c +@@ -37,6 +37,34 @@ + + #define UPDATE_TIMEOUT 5000 + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#define ippGetCount(attr) attr->num_values ++#define ippGetName(attr) attr->name ++#define ippGetInteger(attr, element) attr->values[element].integer ++#define ippGetString(attr, element, language) attr->values[element].string.text ++ ++static ipp_attribute_t * ++ippFirstAttribute(ipp_t *ipp) ++{ ++ if (!ipp) ++ return (NULL); ++ return (ipp->current = ipp->attrs); ++} ++ ++static ipp_attribute_t * ++ippNextAttribute(ipp_t *ipp) ++{ ++ if (!ipp || !ipp->current) ++ return (NULL); ++ return (ipp->current = ipp->current->next); ++} ++#endif ++ ++ + struct _GnomeCupsPPDFile { + char name[1]; + }; +@@ -173,9 +201,9 @@ map_reasons (GnomeCupsPrinter *printer, + printer->details->state_reasons = NULL; + + /* cf. RFC2911 4.4.12 */ +- for (i = 0; i < attr->num_values; i++) { ++ for (i = 0; i < ippGetCount (attr); i++) { + const char *p; +- const char *keyword = attr->values [i].string.text; ++ const char *keyword = ippGetString (attr, i, NULL); + + reason = g_new (GnomeCupsPrinterReason, 1); + +@@ -224,8 +252,8 @@ gnome_cups_printer_get_info (GnomeCupsPrinter *printer) + return printer->details->info; + } + +-#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if ((v) != attr->values[0].integer) { changed = TRUE; } (v) = attr->values[0].integer; }} +-#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if (!v || strcmp (v, attr->values[0].string.text)) { g_free (v); changed = TRUE; (v) = g_strdup (attr->values[0].string.text); }}} ++#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if ((v) != ippGetInteger (attr, 0)) { changed = TRUE; } (v) = ippGetInteger (attr, 0); }} ++#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if (!v || strcmp (v, ippGetString (attr, 0, NULL))) { g_free (v); changed = TRUE; (v) = g_strdup (ippGetString (attr, 0, NULL)); }}} + + static void + attributes_update_cb (guint id, +@@ -243,14 +271,14 @@ attributes_update_cb (guint id, + changed = FALSE; + + if (!error && response) { +- for (attr = response->attrs; attr != NULL; attr = attr->next) { +- if (!attr->name) { ++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { ++ if (!ippGetName (attr)) { + continue; + } +- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !strcmp (attr->name, "attributes-charset")) { ++ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !strcmp (ippGetName (attr), "attributes-charset")) { + continue; + } +- if (!g_ascii_strcasecmp (attr->name, "printer-state-reasons")) { ++ if (!g_ascii_strcasecmp (ippGetName (attr), "printer-state-reasons")) { + map_reasons (printer, attr); + } + MAP_INT (printer->details->state, "printer-state"); +@@ -570,7 +598,7 @@ get_default (void) + + attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME); + if (attr) { +- name = g_strdup (attr->values[0].string.text); ++ name = g_strdup (ippGetString (attr, 0, NULL)); + } else { + name = NULL; + } +@@ -698,7 +726,7 @@ get_printer_names (void) + attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME); + while (attr) { + ret = g_list_prepend (ret, +- g_strdup (attr->values[0].string.text)); ++ g_strdup (ippGetString (attr, 0, NULL))); + + attr = ippFindNextAttribute (response, + "printer-name", +diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c +index 9f98ed9..298db42 100644 +--- a/libgnomecups/gnome-cups-queue.c ++++ b/libgnomecups/gnome-cups-queue.c +@@ -15,6 +15,33 @@ + + #define UPDATE_TIMEOUT 3000 + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#define ippGetName(attr) attr->name ++#define ippGetInteger(attr, element) attr->values[element].integer ++#define ippGetString(attr, element, language) attr->values[element].string.text ++ ++static ipp_attribute_t * ++ippFirstAttribute(ipp_t *ipp) ++{ ++ if (!ipp) ++ return (NULL); ++ return (ipp->current = ipp->attrs); ++} ++ ++static ipp_attribute_t * ++ippNextAttribute(ipp_t *ipp) ++{ ++ if (!ipp || !ipp->current) ++ return (NULL); ++ return (ipp->current = ipp->current->next); ++} ++#endif ++ ++ + struct _GnomeCupsQueueDetails { + char *queue_name; + GList *jobs; +@@ -199,8 +226,8 @@ finish_job (GnomeCupsJob *job) + job->size = job->size * 1024; + } + +-#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (attr->values[0].string.text);}} +-#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { (dest) = attr->values[0].integer; } } ++#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (ippGetString (attr, 0, NULL));}} ++#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { (dest) = ippGetInteger (attr, 0); } } + + static void + get_jobs_cb (guint id, +@@ -231,8 +258,8 @@ get_jobs_cb (guint id, + + if (response) { + job = g_new0 (GnomeCupsJob, 1); +- for (attr = response->attrs; attr != NULL; attr = attr->next) { +- if (attr->name == NULL) { ++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { ++ if (ippGetName (attr) == NULL) { + if (job->name) { + finish_job (job); + jobs = g_list_prepend (jobs, job); +@@ -244,7 +271,7 @@ get_jobs_cb (guint id, + continue; + } + +- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) { ++ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) { + continue; + + } +@@ -355,8 +382,8 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue, + + if (response) { + job = g_new0 (GnomeCupsJob, 1); +- for (attr = response->attrs; attr != NULL; attr = attr->next) { +- if (attr->name == NULL) { ++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { ++ if (ippGetName (attr) == NULL) { + if (job->name) { + finish_job (job); + } else { +@@ -366,7 +393,7 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue, + break; + } + +- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) { ++ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) { + continue; + } + +diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c +index c94f623..13f0948 100644 +--- a/libgnomecups/gnome-cups-request.c ++++ b/libgnomecups/gnome-cups-request.c +@@ -19,6 +19,36 @@ + #define STOP_UNUSED_THREADS_TIMEOUT 60 + #define CLOSE_UNUSED_CONNECTIONS_TIMEOUT 30 + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#define ippGetCount(attr) attr->num_values ++#define ippGetValueTag(attr) attr->value_tag ++#define ippGetName(attr) attr->name ++#define ippGetBoolean(attr, element) attr->values[element].boolean ++#define ippGetInteger(attr, element) attr->values[element].integer ++#define ippGetString(attr, element, language) attr->values[element].string.text ++ ++static ipp_attribute_t * ++ippFirstAttribute(ipp_t *ipp) ++{ ++ if (!ipp) ++ return (NULL); ++ return (ipp->current = ipp->attrs); ++} ++ ++static ipp_attribute_t * ++ippNextAttribute(ipp_t *ipp) ++{ ++ if (!ipp || !ipp->current) ++ return (NULL); ++ return (ipp->current = ipp->current->next); ++} ++#endif ++ ++ + typedef struct + { + GMutex *mutex; +@@ -276,14 +306,14 @@ dump_request (ipp_t const *req) + unsigned i; + ipp_attribute_t *attr; + +- for (attr = req->attrs; attr != NULL; attr = attr->next) { +- g_print ("%s", attr->name); +- for (i = 0 ; i < attr->num_values ; i++) { ++ for (attr = ippFirstAttribute (req); attr != NULL; attr = ippNextAttribute (req)) { ++ g_print ("%s", ippGetName (attr)); ++ for (i = 0 ; i < ippGetCount (attr) ; i++) { + g_print ("\t[%d] = ", i); +- switch (attr->value_tag & ~IPP_TAG_COPY) { ++ switch (ippGetValueTag (attr) & ~IPP_TAG_COPY) { + case IPP_TAG_INTEGER: + case IPP_TAG_ENUM: +- g_print ("%d\n", attr->values[i].integer); ++ g_print ("%d\n", ippGetInteger (attr, i)); + break; + + case IPP_TAG_STRING: +@@ -294,11 +324,11 @@ dump_request (ipp_t const *req) + case IPP_TAG_CHARSET: + case IPP_TAG_LANGUAGE: + case IPP_TAG_MIMETYPE: +- g_print ("'%s'\n", attr->values[i].string.text); ++ g_print ("'%s'\n", ippGetString (attr, i, NULL)); + break; + + case IPP_TAG_BOOLEAN: +- g_print ("%s\n", (int)attr->values[i].boolean ? "true" : "false"); ++ g_print ("%s\n", (int)ippGetBoolean (attr, i) ? "true" : "false"); + break; + + default: +-- +1.7.8.6 + diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch new file mode 100644 index 000000000000..10eb75d1bc46 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch @@ -0,0 +1,34 @@ +From 8f5e326dd89d98b2d34cf6f97583be4eb819b02b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 29 Jun 2014 10:36:14 +0200 +Subject: [PATCH] Use AC_PATH_TOOL to find cups-config. And actually use the + result. + +--- + configure.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.in b/configure.in +index 3f0ccc5..0bd367e 100644 +--- a/configure.in ++++ b/configure.in +@@ -22,13 +22,13 @@ AC_SUBST(GLIB_REQUIRED) + + PKG_CHECK_MODULES(LIBGNOMECUPS, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED) + +-AC_PATH_PROG(CUPS_CONFIG, cups-config, no) ++AC_PATH_TOOL(CUPS_CONFIG, cups-config, no) + if test "$CUPS_CONFIG" = "no"; then + AC_MSG_ERROR([Please install cups development packages]) + fi + +-CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` +-CUPS_LIBS=`cups-config --libs` ++CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` ++CUPS_LIBS=`$CUPS_CONFIG --libs` + + AC_SUBST(CUPS_CFLAGS) + AC_SUBST(CUPS_LIBS) +-- +2.0.0 + diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch new file mode 100644 index 000000000000..797231416b64 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch @@ -0,0 +1,34 @@ +From afe4d5299e6f48ace0fbedbfba8159812afcdd1c Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 14 Jan 2014 15:23:59 +0100 +Subject: [PATCH] Fix build with -Werror=format-security + +--- + libgnomecups/gnome-cups-request.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c +index c94f623..fa1bd97 100644 +--- a/libgnomecups/gnome-cups-request.c ++++ b/libgnomecups/gnome-cups-request.c +@@ -353,7 +353,7 @@ request_thread_main (GnomeCupsRequest *request, + g_warning ("IPP request failed with status %d", status); + if (request->error != NULL) + *(request->error) = g_error_new (GNOME_CUPS_ERROR, +- status, ippErrorString (status)); ++ status, "%s", ippErrorString (status)); + } else if (request->response && _gnome_cups_debug) { + g_print ("response = \n"); + dump_request (request->response); +@@ -364,7 +364,7 @@ request_thread_main (GnomeCupsRequest *request, + request->response = NULL; + if (HTTP_OK != status && request->error != NULL) + *(request->error) = g_error_new (GNOME_CUPS_ERROR, +- status, httpStatus (status)); ++ status, "%s", httpStatus (status)); + } else { + g_warning ("Neither request nor output_fd set"); + if (request->error != NULL) +-- +1.8.3.1 + diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch new file mode 100644 index 000000000000..3383cde16786 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch @@ -0,0 +1,94 @@ +From 14979a2356fd751d82d037db65ce92072097bbf3 Mon Sep 17 00:00:00 2001 +From: Kjartan Maraas +Date: Wed, 30 Jan 2008 17:30:43 +0000 +Subject: [PATCH] Fix some warnings. Fix wrong order of arguments to + g_list_find_custom. + +2008-01-30 Kjartan Maraas + + * libgnomecups/gnome-cups-printer.c: (set_timeout), + (gnome_cups_printer_get_state_name), + (_gnome_cups_printer_get_host): Fix some warnings. + * libgnomecups/gnome-cups-queue.c: (gnome_cups_queue_get_job): + Fix wrong order of arguments to g_list_find_custom. + +svn path=/trunk/; revision=237 +--- + ChangeLog | 8 ++++++++ + libgnomecups/gnome-cups-printer.c | 7 +++---- + libgnomecups/gnome-cups-queue.c | 4 ++-- + 3 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b41ac9e..166c87a 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++2008-01-30 Kjartan Maraas ++ ++ * libgnomecups/gnome-cups-printer.c: (set_timeout), ++ (gnome_cups_printer_get_state_name), ++ (_gnome_cups_printer_get_host): Fix some warnings. ++ * libgnomecups/gnome-cups-queue.c: (gnome_cups_queue_get_job): ++ Fix wrong order of arguments to g_list_find_custom. ++ + 2008-01-18 Gil Forcada + + * configure.in: Added mk, tr and zh_HK to ALL_LINGUAS. +diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c +index 9c5c7d3..704f205 100644 +--- a/libgnomecups/gnome-cups-printer.c ++++ b/libgnomecups/gnome-cups-printer.c +@@ -791,7 +791,7 @@ set_timeout (void) + + if (should_timeout && !update_timeout_id) { + update_timeout_id = g_timeout_add (UPDATE_TIMEOUT, +- update_printers_timeout, ++ (GSourceFunc)update_printers_timeout, + NULL); + } else if (!should_timeout && update_timeout_id) { + g_source_remove (update_timeout_id); +@@ -1069,7 +1069,6 @@ gnome_cups_printer_get_state (GnomeCupsPrinter *printer) + const char * + gnome_cups_printer_get_state_name (GnomeCupsPrinter *printer) + { +- const char *state_str; + ipp_pstate_t state; + + g_return_val_if_fail (GNOME_CUPS_IS_PRINTER (printer), NULL); +@@ -1079,7 +1078,7 @@ gnome_cups_printer_get_state_name (GnomeCupsPrinter *printer) + + state = printer->details->state; + +- return state_str = _(printer_state_strings[state - IPP_PRINTER_IDLE]); ++ return _(printer_state_strings[state - IPP_PRINTER_IDLE]); + } + + const char * +@@ -2001,7 +2000,7 @@ _gnome_cups_printer_get_host (GnomeCupsPrinter *printer) + { + gchar *host = NULL; + +-#warning this is broken for smb://user:pass@host/printer urls ++ /* warning this is broken for smb://user:pass@host/printer urls */ + if (go_directly_to_printer_when_possible && + printer->details->printer_uri) { + gchar *x, *y; +diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c +index d9b9a92..9f98ed9 100644 +--- a/libgnomecups/gnome-cups-queue.c ++++ b/libgnomecups/gnome-cups-queue.c +@@ -413,8 +413,8 @@ gnome_cups_queue_get_job (GnomeCupsQueue *queue, + { + if (cache_ok) { + GList *link = g_list_find_custom (queue->details->jobs, +- (GCompareFunc) find_job_by_id, +- GINT_TO_POINTER (job_id)); ++ GINT_TO_POINTER (job_id), ++ (GCompareFunc) find_job_by_id); + if (link) + return gnome_cups_job_dup (link->data); + } +-- +1.7.8.4 + diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch new file mode 100644 index 000000000000..3f73af861c04 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch @@ -0,0 +1,38 @@ +From d84eee9450b3b6f6155074915efc61bedcc8d446 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Sun, 27 Nov 2011 21:36:41 +0100 +Subject: [PATCH] Fix: Only glib.h can be included + +--- + libgnomecups/gnome-cups-i18n.c | 2 +- + libgnomecups/gnome-cups-init.h | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/libgnomecups/gnome-cups-i18n.c b/libgnomecups/gnome-cups-i18n.c +index 8987c5c..127756d 100644 +--- a/libgnomecups/gnome-cups-i18n.c ++++ b/libgnomecups/gnome-cups-i18n.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include "gnome-cups-i18n.h" + + #ifdef ENABLE_NLS +diff --git a/libgnomecups/gnome-cups-init.h b/libgnomecups/gnome-cups-init.h +index 22b682a..c4600fc 100644 +--- a/libgnomecups/gnome-cups-init.h ++++ b/libgnomecups/gnome-cups-init.h +@@ -1,8 +1,7 @@ + #ifndef GNOME_CUPS_INIT + #define GNOME_CUPS_INIT + +-#include +-#include ++#include + + G_BEGIN_DECLS + +-- +1.7.7 + diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch new file mode 100644 index 000000000000..b682e450746a --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch @@ -0,0 +1,13 @@ +--- libgnomecups-0.2.2.orig/libgnomecups/gnome-cups-printer.c ++++ libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c +@@ -510,6 +510,10 @@ + 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/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch new file mode 100644 index 000000000000..8fe6502a6f38 --- /dev/null +++ b/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch @@ -0,0 +1,10 @@ +--- libgnomecups-1.0.pc.in~ 2007-01-02 01:18:51.000000000 +0100 ++++ libgnomecups-1.0.pc.in 2011-05-08 13:21:35.000000000 +0200 +@@ -7,5 +7,6 @@ + Description: GNOME CUPS Library + Version: @VERSION@ + Requires: glib-2.0 gobject-2.0 +-Libs: -L${libdir} -lgnomecups-1.0 @CUPS_LIBS@ ++Libs: -L${libdir} -lgnomecups-1.0 ++Libs.private: -L${libdir} -lgnomecups-1.0 @CUPS_LIBS@ + Cflags: -I${includedir} @CUPS_CFLAGS@ diff --git a/net-print/libgnomecups/libgnomecups-0.2.3-r3.ebuild b/net-print/libgnomecups/libgnomecups-0.2.3-r3.ebuild new file mode 100644 index 000000000000..dcd57e766a8f --- /dev/null +++ b/net-print/libgnomecups/libgnomecups-0.2.3-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +GCONF_DEBUG="yes" +GNOME_TARBALL_SUFFIX="bz2" + +inherit autotools eutils gnome2 + +DESCRIPTION="GNOME cups library" +HOMEPAGE="https://www.gnome.org/" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND=" + >=dev-libs/glib-2:2 + >=net-print/cups-1.3.8 +" +DEPEND="${RDEPEND} + >=dev-util/intltool-0.28 + gnome-base/gnome-common + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/enablenet.patch + + # Fix .pc file per bug #235013 + epatch "${FILESDIR}"/${P}-pkgconfig.patch + + # Upstream fix for g_list_find_custom() argument order + epatch "${FILESDIR}/${P}-g_list_find_custom.patch" + + # >=glib-2.31 compat, bug #400789, https://bugzilla.gnome.org/show_bug.cgi?id=664930 + epatch "${FILESDIR}/${P}-glib.h.patch" + + # cups-1.6 compat, bug #428812 + epatch "${FILESDIR}/${P}-cups-1.6.patch" + + eautoreconf # To fix intltool files making LINGUAS to be honored + gnome2_src_prepare +} + +src_configure() { + gnome2_src_configure --disable-static +} diff --git a/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild b/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild new file mode 100644 index 000000000000..8e2ff2f77e14 --- /dev/null +++ b/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +GCONF_DEBUG="yes" +GNOME_TARBALL_SUFFIX="bz2" + +inherit autotools eutils gnome2 multilib-minimal + +DESCRIPTION="GNOME cups library" +HOMEPAGE="https://www.gnome.org/" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND=" + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + >=dev-util/intltool-0.28 + gnome-base/gnome-common + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +src_prepare() { + epatch "${FILESDIR}"/enablenet.patch + + # Fix .pc file per bug #235013 + epatch "${FILESDIR}"/${P}-pkgconfig.patch + + # Upstream fix for g_list_find_custom() argument order + epatch "${FILESDIR}/${P}-g_list_find_custom.patch" + + # >=glib-2.31 compat, bug #400789, https://bugzilla.gnome.org/show_bug.cgi?id=664930 + epatch "${FILESDIR}/${P}-glib.h.patch" + + # cups-1.6 compat, bug #428812 + epatch "${FILESDIR}/${P}-cups-1.6.patch" + + # so it looks for cups-config... how about using $CUPS_CONFIG then? + # and also use AC_PATH_TOOL to respect $CHOST + epatch "${FILESDIR}/${P}-cups-config.patch" + + # Fix building with -Werror=format-security, bug #517612 + epatch "${FILESDIR}/${P}-format-string.patch" + + # Look for lpoptions in the right spot, upstream bug #520449 + epatch "${FILESDIR}/${P}-lpoptions.patch" + + eautoreconf # To fix intltool files making LINGUAS to be honored + gnome2_src_prepare +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + gnome2_src_configure --disable-static +} + +multilib_src_install() { + gnome2_src_install +} diff --git a/net-print/libgnomecups/metadata.xml b/net-print/libgnomecups/metadata.xml new file mode 100644 index 000000000000..0d5df29788c2 --- /dev/null +++ b/net-print/libgnomecups/metadata.xml @@ -0,0 +1,12 @@ + + + + + gnome@gentoo.org + Gentoo GNOME Desktop + + + printing@gentoo.org + Gentoo Printing Project + + -- cgit v1.2.3