summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-perl/Net-CUPS
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-perl/Net-CUPS')
-rw-r--r--dev-perl/Net-CUPS/Manifest1
-rw-r--r--dev-perl/Net-CUPS/Net-CUPS-0.610.0-r2.ebuild23
-rw-r--r--dev-perl/Net-CUPS/files/Net-CUPS-0.610.0-cups16.patch165
-rw-r--r--dev-perl/Net-CUPS/metadata.xml12
4 files changed, 201 insertions, 0 deletions
diff --git a/dev-perl/Net-CUPS/Manifest b/dev-perl/Net-CUPS/Manifest
new file mode 100644
index 000000000000..27062dd12676
--- /dev/null
+++ b/dev-perl/Net-CUPS/Manifest
@@ -0,0 +1 @@
+DIST Net-CUPS-0.61.tar.gz 83893 SHA256 fd4a5a86038df9dfe57dcfed78b2d045e4b18d507a6fa5a8f82ecb3a732e0e35 SHA512 6e906dfebd7a5970f393f8187808049004d6b89fc268bb89abb4dca43145ec97ea45dd3faa51a04de2843a2aedc8051bcb88ab688f4a9886acc188166e2c2cf7 WHIRLPOOL df2ac30aa164ab8e6494bcd0cad59143020df8e50d670d9fd6dcfd0ec986c73363788435ae83b6bc7ac67cdf430cd6550a5926038f124e950735caa47adfae53
diff --git a/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r2.ebuild b/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r2.ebuild
new file mode 100644
index 000000000000..4ea35440162e
--- /dev/null
+++ b/dev-perl/Net-CUPS/Net-CUPS-0.610.0-r2.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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/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 );
diff --git a/dev-perl/Net-CUPS/metadata.xml b/dev-perl/Net-CUPS/metadata.xml
new file mode 100644
index 000000000000..b9c823bd8ff0
--- /dev/null
+++ b/dev-perl/Net-CUPS/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <upstream>
+ <remote-id type="cpan">Net-CUPS</remote-id>
+ <remote-id type="cpan-module">Net::CUPS</remote-id>
+ <remote-id type="cpan-module">Net::CUPS::Destination</remote-id>
+ <remote-id type="cpan-module">Net::CUPS::IPP</remote-id>
+ <remote-id type="cpan-module">Net::CUPS::PPD</remote-id>
+ </upstream>
+</pkgmetadata>