diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-08-24 22:21:00 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-08-24 22:21:00 +0000 |
commit | ea5467ef69c4a44cf834cc8c7381405281d2c1a0 (patch) | |
tree | f23f9b4564d4bad033c6ade933057c613a46b307 /dev-perl | |
parent | Restore checkpath for the pidfile, but don't set owner on it (it doesn't need... (diff) | |
download | gentoo-2-ea5467ef69c4a44cf834cc8c7381405281d2c1a0.tar.gz gentoo-2-ea5467ef69c4a44cf834cc8c7381405281d2c1a0.tar.bz2 gentoo-2-ea5467ef69c4a44cf834cc8c7381405281d2c1a0.zip |
Add patch by Jiří Popelka to fix build against cups-1.6, bug 428740
(Portage version: 2.2.0_alpha122/cvs/Linux x86_64)
Diffstat (limited to 'dev-perl')
-rw-r--r-- | dev-perl/Net-CUPS/ChangeLog | 9 | ||||
-rw-r--r-- | dev-perl/Net-CUPS/Net-CUPS-0.610.0-r1.ebuild | 23 | ||||
-rw-r--r-- | dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild | 4 | ||||
-rw-r--r-- | dev-perl/Net-CUPS/files/Net-CUPS-0.610.0-cups16.patch | 165 |
4 files changed, 198 insertions, 3 deletions
diff --git a/dev-perl/Net-CUPS/ChangeLog b/dev-perl/Net-CUPS/ChangeLog index 234f73c15b44..1c3fe0c31a54 100644 --- a/dev-perl/Net-CUPS/ChangeLog +++ b/dev-perl/Net-CUPS/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-perl/Net-CUPS # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/Net-CUPS/ChangeLog,v 1.39 2012/06/24 13:00:18 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Net-CUPS/ChangeLog,v 1.40 2012/08/24 22:21:00 dilfridge Exp $ + +*Net-CUPS-0.610.0-r1 (24 Aug 2012) + + 24 Aug 2012; Andreas K. Huettel <dilfridge@gentoo.org> + Net-CUPS-0.610.0.ebuild, +Net-CUPS-0.610.0-r1.ebuild, + +files/Net-CUPS-0.610.0-cups16.patch: + Add patch by Jiří Popelka to fix build against cups-1.6, bug 428740 24 Jun 2012; Torsten Veller <tove@gentoo.org> metadata.xml: Update CPAN upstream info diff --git a/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r1.ebuild b/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r1.ebuild new file mode 100644 index 000000000000..c60daec3c21d --- /dev/null +++ b/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r1.ebuild,v 1.1 2012/08/24 22:21:00 dilfridge Exp $ + +EAPI=4 + +MODULE_AUTHOR=DHAGEMAN +MODULE_VERSION=0.61 +inherit perl-module + +DESCRIPTION="CUPS C API Interface" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="net-print/cups" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Simple )" + +PATCHES=( "${FILESDIR}/${P}-cups16.patch" ) + +SRC_TEST="do" diff --git a/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild b/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild index 573df1616d02..3811aba890b5 100644 --- a/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild +++ b/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild,v 1.4 2012/05/06 16:44:45 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Net-CUPS/Net-CUPS-0.610.0.ebuild,v 1.5 2012/08/24 22:21:00 dilfridge Exp $ EAPI=4 @@ -14,7 +14,7 @@ SLOT="0" KEYWORDS="amd64 x86" IUSE="test" -RDEPEND=">=net-print/cups-1.1.21" +RDEPEND="<=net-print/cups-1.5.9999" DEPEND="${RDEPEND} test? ( virtual/perl-Test-Simple )" diff --git a/dev-perl/Net-CUPS/files/Net-CUPS-0.610.0-cups16.patch b/dev-perl/Net-CUPS/files/Net-CUPS-0.610.0-cups16.patch new file mode 100644 index 000000000000..4c5bf66ca6d2 --- /dev/null +++ b/dev-perl/Net-CUPS/files/Net-CUPS-0.610.0-cups16.patch @@ -0,0 +1,165 @@ +diff --git a/CUPS.xs b/CUPS.xs +index 2da9558..109f73f 100644 +--- a/CUPS.xs ++++ b/CUPS.xs +@@ -5,9 +5,17 @@ + #include "ppport.h" + + #include <cups/cups.h> ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ + /*#include <cups/backend.h>*/ + #include <cups/http.h> +-#include <cups/image.h> ++#ifdef HAVE_CUPS_1_6 ++ #include <cupsfilters/image.h> ++#else ++ #include <cups/image.h> ++#endif + #include <cups/ipp.h> + #include <cups/ppd.h> + #include <cups/file.h> +@@ -19,6 +27,17 @@ + #include "const-c.inc" + #include "packer.c" + ++#ifndef HAVE_CUPS_1_6 ++#define ippGetGroupTag(attr) attr->group_tag ++#define ippGetName(attr) attr->name ++#define ippGetValueTag(attr) attr->value_tag ++#define ippGetInteger(attr, element) attr->values[element].integer ++#define ippGetString(attr, element, language) attr->values[element].string.text ++#define ippGetStatusCode(ipp) ipp->request.status.status_code ++#define ippFirstAttribute(ipp) ipp->current = ipp->attrs ++#define ippNextAttribute(ipp) ipp->current = ipp->current->next ++#endif ++ + static SV *password_cb = (SV*) NULL; + + const char * +@@ -200,7 +219,7 @@ NETCUPS_getPPDMakes() + if (response != NULL) { + attr = ippFindAttribute(response, "ppd-make", IPP_TAG_TEXT); + rv = sv_newmortal(); +- sv_setpv(rv, attr->values[0].string.text); ++ sv_setpv(rv, ippGetString(attr, 0, NULL)); + XPUSHs(rv); + count++; + +@@ -211,7 +230,7 @@ NETCUPS_getPPDMakes() + } + + rv = sv_newmortal(); +- sv_setpv(rv, attr->values[0].string.text); ++ sv_setpv(rv, ippGetString(attr, 0, NULL)); + XPUSHs(rv); + count++; + } +@@ -252,7 +271,7 @@ NETCUPS_getAllPPDs () + "ppd-make-and-model", + IPP_TAG_TEXT); + rv = sv_newmortal(); +- sv_setpv(rv, attr->values[0].string.text); ++ sv_setpv(rv, ippGetString(attr, 0, NULL)); + XPUSHs(rv); + count++; + while (attr != NULL) { +@@ -263,7 +282,7 @@ NETCUPS_getAllPPDs () + break; + } + rv = sv_newmortal(); +- sv_setpv(rv, attr->values[0].string.text); ++ sv_setpv(rv, ippGetString(attr, 0, NULL)); + XPUSHs(rv); + count++; + } +@@ -356,14 +375,14 @@ NETCUPS_getPPDFileName(ppdfilename); + if (response != NULL) { + attr = ippFindAttribute(response, "ppd-name", IPP_TAG_NAME ); + while ((attr != NULL) && (i < 1)) { +- tmpppd = attr->values[0].string.text; ++ tmpppd = ippGetString(attr, 0, NULL); + attr = ippFindNextAttribute(response, + "ppd-make", + IPP_TAG_TEXT); + attr = ippFindNextAttribute(response, + "ppd-make-and-model", + IPP_TAG_TEXT); +- if (strcmp(attr->values[0].string.text, ppdfilename) == 0 ) { ++ if (strcmp(ippGetString(attr, 0, NULL), ppdfilename) == 0 ) { + /* return tmpppd; */ + strcpy(test, tmpppd); + break; +@@ -410,12 +429,12 @@ NETCUPS_getDeviceAttribute( device, attribute, attribute_type ) + attr = ippFindNextAttribute(response, "printer-name", IPP_TAG_NAME); + + while (attr != NULL) { +- if (strcmp(attr->values[0].string.text, device) == 0) { ++ if (strcmp(ippGetString(attr, 0, NULL), device) == 0) { + attr = ippFindNextAttribute( response, + attribute, + attribute_type); + rv = sv_newmortal(); +- sv_setpv( rv, attr->values[0].string.text); ++ sv_setpv( rv, ippGetString(attr, 0, NULL)); + XPUSHs( rv ); + break; + } +@@ -858,15 +877,15 @@ NETCUPS_getAttributes( ipp ) + SV* rv = NULL; + int count = 0; + ipp_attribute_t* attr = NULL; +- for (attr = ipp->attrs; attr != NULL; attr = attr->next) ++ for (attr = ippFirstAttribute(ipp); attr != NULL; attr = ippNextAttribute(ipp)) + { +- while (attr != NULL && attr->group_tag != IPP_TAG_JOB) +- attr = attr->next; ++ while (attr != NULL && ippGetGroupTag(attr) != IPP_TAG_JOB) ++ attr = ippNextAttribute(ipp); + + if (attr == NULL) + break; + rv = sv_newmortal(); +- sv_setpv( rv, attr->name ); ++ sv_setpv( rv, ippGetName(attr) ); + XPUSHs( rv ); + count++; + } +@@ -880,27 +899,27 @@ NETCUPS_getAttributeValue( ipp, name ) + SV* rv = NULL; + int count = 0; + ipp_attribute_t* attr = NULL; +- for (attr = ipp->attrs; attr != NULL; attr = attr->next) ++ for (attr = ippFirstAttribute(ipp); attr != NULL; attr = ippNextAttribute(ipp)) + { +- while (attr != NULL && attr->group_tag != IPP_TAG_JOB) +- attr = attr->next; ++ while (attr != NULL && ippGetGroupTag(attr) != IPP_TAG_JOB) ++ attr = ippNextAttribute(ipp); + + if (attr == NULL) + break; + +- if( !strcmp( attr->name, name ) ) ++ if( !strcmp( ippGetName(attr), name ) ) + { + rv = sv_newmortal(); +- if( ( attr->value_tag == IPP_TAG_INTEGER ) || +- ( attr->value_tag == IPP_TAG_ENUM ) ) ++ if( ( ippGetValueTag(attr) == IPP_TAG_INTEGER ) || ++ ( ippGetValueTag(attr) == IPP_TAG_ENUM ) ) + { + /* We have a number with any luck ... */ +- sv_setiv( rv, attr->values[0].integer ); ++ sv_setiv( rv, ippGetInteger(attr, 0) ); + } + else + { + /* We have a string ... maybe ... try to set it. */ +- sv_setpv( rv, attr->values[0].string.text ); ++ sv_setpv( rv, ippGetString(attr, 0, NULL) ); + } + + XPUSHs( rv ); |