pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/cups-base Add patches from debian to support bas...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f798de1b5e04
branches:  trunk
changeset: 310789:f798de1b5e04
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Tue Jul 24 12:19:21 2018 +0000

description:
Add patches from debian to support basic airprint.
Some details about airprint are in https://wiki.debian.org/AirPrint
Proposed on tech-pkg@ on Jul 20
Bump PKGREVISION

diffstat:

 print/cups-base/Makefile                                    |    4 +-
 print/cups-base/distinfo                                    |    6 +-
 print/cups-base/patches/patch-airprint-conf_mime.convs.in   |   37 ++
 print/cups-base/patches/patch-airprint-scheduler_conf.c     |   36 ++
 print/cups-base/patches/patch-airprint-scheduler_dirsvc.c   |   40 +++
 print/cups-base/patches/patch-airprint-scheduler_printers.c |  152 ++++++++++++
 6 files changed, 272 insertions(+), 3 deletions(-)

diffs (truncated from 314 to 300 lines):

diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/Makefile
--- a/print/cups-base/Makefile  Tue Jul 24 12:14:38 2018 +0000
+++ b/print/cups-base/Makefile  Tue Jul 24 12:19:21 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2018/07/04 13:40:33 jperkin Exp $
+# $NetBSD: Makefile,v 1.13 2018/07/24 12:19:21 bouyer Exp $
 
 .include "../../print/cups/Makefile.common"
-PKGREVISION=1
+PKGREVISION=2
 
 DISTNAME=      cups-${CUPS_VERS}-source
 PKGNAME=       cups-base-${CUPS_VERS}
diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/distinfo
--- a/print/cups-base/distinfo  Tue Jul 24 12:14:38 2018 +0000
+++ b/print/cups-base/distinfo  Tue Jul 24 12:19:21 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2018/07/09 13:53:34 youri Exp $
+$NetBSD: distinfo,v 1.9 2018/07/24 12:19:21 bouyer Exp $
 
 SHA1 (cups-2.2.8-source.tar.gz) = f8c572d5b2405091e3be6836523a6abdda645f60
 RMD160 (cups-2.2.8-source.tar.gz) = 79bc052e3f70408a698bfbe2556b53d2f0140b2c
@@ -7,6 +7,10 @@
 SHA1 (patch-ae) = f34ec899f4816bdcf96ff315e001e3ac5a960200
 SHA1 (patch-af) = 6ae6ae6006387db69bf7c15f7c8500708c9e8f56
 SHA1 (patch-ai) = 2c1ca67ea6f6c1dedb4c8ff97736f328a2b9a7c6
+SHA1 (patch-airprint-conf_mime.convs.in) = 413a5ef448ab42858db804cfbfc1b8ff5b6bbf77
+SHA1 (patch-airprint-scheduler_conf.c) = f54ba16cc32dc09cd5bd8e864e1510ed2a84d6ed
+SHA1 (patch-airprint-scheduler_dirsvc.c) = bef4ea8e898dffc67c4866baa701e12570eb6fca
+SHA1 (patch-airprint-scheduler_printers.c) = 7fc0157f990a6e4dfa04c0b2c5684422229af725
 SHA1 (patch-at) = ef6303936daf0826dc4725f5369bfb1add832b1f
 SHA1 (patch-conf-cups-files.conf.in) = 327cc8b62e606389542870aa6619ade10377b044
 SHA1 (patch-conf_Makefile) = bb8313e493c02959edfe1e53f50b9f16ce6f42e0
diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/patches/patch-airprint-conf_mime.convs.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-base/patches/patch-airprint-conf_mime.convs.in Tue Jul 24 12:19:21 2018 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-airprint-conf_mime.convs.in,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/conf/mime.convs.in b/conf/mime.convs.in
+index bffd04f84..33ce812e3 100644
+--- conf/mime.convs.in.orig
++++ conf/mime.convs.in
+@@ -47,6 +47,9 @@ application/postscript               application/vnd.cups-postscript 66      pstops
+ application/vnd.cups-raster   image/pwg-raster                100     rastertopwg
+ application/vnd.cups-raster   image/urf                       100     rastertopwg
+ 
++# Needed for printing from iOS (AirPrint) clients
++image/urf                    application/pdf                  100     -
++
+ ########################################################################
+ #
+ # Raw filter...
diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/patches/patch-airprint-scheduler_conf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-base/patches/patch-airprint-scheduler_conf.c   Tue Jul 24 12:19:21 2018 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-airprint-scheduler_conf.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index 9c1be7089..52f2a6d35 100644
+--- scheduler/conf.c.orig
++++ scheduler/conf.c
+@@ -745,7 +745,7 @@ cupsdReadConfiguration(void)
+   DefaultShared            = CUPS_DEFAULT_DEFAULT_SHARED;
+ 
+ #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
+-  cupsdSetString(&DNSSDSubTypes, "_cups,_print");
++  cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
+ #endif /* HAVE_DNSSD || HAVE_AVAHI */
+ 
+   cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/patches/patch-airprint-scheduler_dirsvc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-base/patches/patch-airprint-scheduler_dirsvc.c Tue Jul 24 12:19:21 2018 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-airprint-scheduler_dirsvc.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
+index 3dab90ca9..f21942af3 100644
+--- scheduler/dirsvc.c.orig
++++ scheduler/dirsvc.c
+@@ -443,6 +443,12 @@ dnssdBuildTxtRecord(
+     keyvalue[count  ][0] = "pdl";
+     keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
+ 
++    /* iOS 6 does not accept this printer as AirPrint printer if there is
++       no URF txt record or "URF=none", "DM3" is the minimum needed found
++       by try and error */
++    keyvalue[count  ][0] = "URF";
++    keyvalue[count++][1] = "DM3";
++
+     if (get_auth_info_required(p, air_str, sizeof(air_str)))
+     {
+       keyvalue[count  ][0] = "air";
diff -r 418be3c64389 -r f798de1b5e04 print/cups-base/patches/patch-airprint-scheduler_printers.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-base/patches/patch-airprint-scheduler_printers.c       Tue Jul 24 12:19:21 2018 +0000
@@ -0,0 +1,152 @@
+$NetBSD: patch-airprint-scheduler_printers.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From debian:
+From 7147c814439aafb26ff0262a7d6b8ef56d20969f Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:04 +0200
+Subject: For PWG Raster, add required IPP attributes
+
+Add required by IPP Everywhere for PWG Raster when PWG Raster as input format
+is supported
+
+Bug-Upstream: https://www.cups.org/str.php?L4428
+Last-Update: 2015-02-10
+Patch-Name: pwg-raster-attributes.patch
+---
+ scheduler/printers.c | 77 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 76 insertions(+), 1 deletion(-)
+
+diff --git a/scheduler/printers.c b/scheduler/printers.c
+index bb99907ad..a0ebcbd3e 100644
+--- scheduler/printers.c.orig
++++ scheduler/printers.c
+@@ -2199,9 +2199,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
+   cupsd_location_t *auth;             /* Pointer to authentication element */
+   const char  *auth_supported;        /* Authentication supported */
+   ipp_t               *oldattrs;              /* Old printer attributes */
+-  ipp_attribute_t *attr;              /* Attribute data */
++  ipp_attribute_t *attr, *attr2;      /* Attribute data */
+   char                *name,                  /* Current user/group name */
+               *filter;                /* Current filter */
++  mime_type_t   *type;
+ 
+ 
+   DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
+@@ -2538,6 +2539,80 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
+   DEBUG_printf(("cupsdSetPrinterAttrs: leaving name = %s, type = %x\n", p->name,
+                 p->type));
+ 
++  /* 
++   * Add "pwg-raster-document-xxx-supported" attributes if PWG Raster input
++   * is supported
++   */
++  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes);
++       type;
++       type = (mime_type_t *)cupsArrayNext(p->filetypes))
++  {
++    if (!_cups_strcasecmp(type->super, "image"))
++    {
++      if (!_cups_strcasecmp(type->type, "pwg-raster"))
++      {
++      if (p->ppd_attrs != NULL &&
++          (attr = ippFindAttribute(p->ppd_attrs,
++                                   "printer-resolution-supported",
++                                   IPP_TAG_ZERO)) != NULL)
++      {
++        attr2 = ippAddResolutions(p->attrs, IPP_TAG_PRINTER,
++                                  "pwg-raster-document-resolution-supported",
++                                  attr->num_values, IPP_RES_PER_INCH,
++                                  NULL, NULL);
++        for (i = 0; i < attr->num_values; i ++)
++        {
++          attr2->values[i].resolution.xres =
++            attr->values[i].resolution.xres;
++          attr2->values[i].resolution.yres =
++            attr->values[i].resolution.yres;
++          attr2->values[i].resolution.units = IPP_RES_PER_INCH;
++        }
++      }
++      else
++      {
++        static const int      pwg_raster_document_resolution_supported[] =
++        {
++          300,
++          600,
++          1200
++        };
++        ippAddResolutions(p->attrs, IPP_TAG_PRINTER,
++                          "pwg-raster-document-resolution-supported",
++                          (int)(sizeof(pwg_raster_document_resolution_supported) /
++                                sizeof(pwg_raster_document_resolution_supported[0])),
++                          IPP_RES_PER_INCH,
++                          pwg_raster_document_resolution_supported,
++                          pwg_raster_document_resolution_supported);
++      }
++      ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
++                   "pwg-raster-document-sheet-back", NULL, "normal");
++      static const char * const pwg_raster_document_type_supported[] =
++      {
++        "adobergb-8",
++        "adobergb-16",
++        "black-1",
++        "black-8",
++        "black-16",
++        "cmyk-8",
++        "cmyk-16",
++        "rgb-8",
++        "rgb-16",
++        "sgray-1",
++        "sgray-8",
++        "sgray-16",
++        "srgb-8",
++        "srgb-16"
++      };
++      ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
++                    "pwg-raster-document-type-supported",
++                    (int)(sizeof(pwg_raster_document_type_supported) /
++                          sizeof(pwg_raster_document_type_supported[0])), NULL,
++                    pwg_raster_document_type_supported);
++      }
++    }
++  }
++
+  /*
+   * Add name-default attributes...
+   */
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/printers.c b/scheduler/printers.c



Home | Main Index | Thread Index | Old Index