summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD15
-rw-r--r--cups.patch278
4 files changed, 287 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5fb571b47af9..548d57c35bf9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon May 9 16:46:19 UTC 2016
+# Sun Jan 26 19:59:30 UTC 2020
pkgbase = cnijfilter-mp550
pkgdesc = Canon IJ Printer Driver (For Multifunction MP550 series)
pkgver = 3.20
- pkgrel = 13
+ pkgrel = 14
url = http://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MP_series/PIXMA_MP550.aspx
install = cnijfilter-mp550.install
arch = i686
@@ -11,17 +11,15 @@ pkgbase = cnijfilter-mp550
license = custom
makedepends = autoconf>=2.13
makedepends = automake>=1.6
- makedepends = tar
- makedepends = make
depends = cnijfilter-common=4.10
- source = http://files.canon-europe.com/files/soft37280/Software/IJ_Linux_Printer_Driver_Source_320.tar
+ source = http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
source = id.patch
source = cups.patch
source = libpng15.patch
source = mychanges.patch
- sha512sums = 28a82d08d3b8a233b89a17e0e029510fc5b3cede97300eb71a9af03c9a15cca4355167d8706e66c34eb47b6c98202a80d73f80626803c9ff6fa41bdd8c87f235
+ sha512sums = 3e6e5f3ed43e4054938387298a6d116828a0928568b3a165622c5a61abe9e39a30bc6d99a336317be228a794f0a2645b8f5453939695879f209b1a061b7d9164
sha512sums = b75cdbdadac5fb396458dc9f14529c5e39a4fa47f97cd6a21a69b0dbac73f1b8dd90780068f6a348fcfb15939d0866dde1a1cf1ff7faaf0c443d2205a242ccd5
- sha512sums = f1f8cc44d7892eb50b44e0fe9d5be877fa5d8f8783aedf494d739eee20c147befac4f4776959f42cdb9cfd9f766522635fc2aae2626fdaf0c4465226a66dcc0e
+ sha512sums = 747b17205a95197e8235959c691ee26b0c375ec8dae516416d16a9805c5b354c7019319d8be10c0c0230cfd8301ec5ddcd292bad245216d0a860cc2e6583c1fa
sha512sums = 0d8310867f45721150a870170172d3a0688bfba0267f627a630c105ff965d31f25dbcc31d3795874325bcb8eaeee395bf32b0648a743ff663dea6f977ab9070e
sha512sums = 807a2f726b5fb0f383118fc6c60449bd37f3a68f788a0ba2e3643f054f592fb886298c397b190280ef565cba2fe57f943abdbf86e8a4890172aaf716984cb70f
depends_i686 = gtk2
diff --git a/.gitignore b/.gitignore
index 3ea616a6d569..19d871de12fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
pkg/
src/
-IJ_Linux_Printer_Driver_Source_320.tar
+cnijfilter-source-3.20-1.tar.gz
*.pkg.tar.xz
*~
diff --git a/PKGBUILD b/PKGBUILD
index f13dd9f2373b..1655dcdb6d59 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
# Maintainer: Behnam Momeni <sbmomeni [at the] gmail [dot] com>
# Contributor: Stefan Hackl <stef.hackl [at the] gmail [dot] com>
-pkgname=('cnijfilter-mp550')
+pkgname=cnijfilter-mp550
_pkgname=cnijfilter
pkgver=3.20
-pkgrel=13
+pkgrel=14
_pkgreview=1
pkgdesc="Canon IJ Printer Driver (For Multifunction MP550 series)"
@@ -20,26 +20,23 @@ depends_x86_64=('lib32-gtk2')
makedepends_i686=('gcc')
depends_i686=('gtk2')
-makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make')
+makedepends=('autoconf>=2.13' 'automake>=1.6')
depends=("${_pkgname}-common=4.10")
install=cnijfilter-mp550.install
-# File size: 6552576 bytes
-source=("http://files.canon-europe.com/files/soft37280/Software/IJ_Linux_Printer_Driver_Source_320.tar"
+source=("http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz"
"id.patch"
"cups.patch"
"libpng15.patch"
"mychanges.patch")
-sha512sums=('28a82d08d3b8a233b89a17e0e029510fc5b3cede97300eb71a9af03c9a15cca4355167d8706e66c34eb47b6c98202a80d73f80626803c9ff6fa41bdd8c87f235'
+sha512sums=('3e6e5f3ed43e4054938387298a6d116828a0928568b3a165622c5a61abe9e39a30bc6d99a336317be228a794f0a2645b8f5453939695879f209b1a061b7d9164'
'b75cdbdadac5fb396458dc9f14529c5e39a4fa47f97cd6a21a69b0dbac73f1b8dd90780068f6a348fcfb15939d0866dde1a1cf1ff7faaf0c443d2205a242ccd5'
- 'f1f8cc44d7892eb50b44e0fe9d5be877fa5d8f8783aedf494d739eee20c147befac4f4776959f42cdb9cfd9f766522635fc2aae2626fdaf0c4465226a66dcc0e'
+ '747b17205a95197e8235959c691ee26b0c375ec8dae516416d16a9805c5b354c7019319d8be10c0c0230cfd8301ec5ddcd292bad245216d0a860cc2e6583c1fa'
'0d8310867f45721150a870170172d3a0688bfba0267f627a630c105ff965d31f25dbcc31d3795874325bcb8eaeee395bf32b0648a743ff663dea6f977ab9070e'
'807a2f726b5fb0f383118fc6c60449bd37f3a68f788a0ba2e3643f054f592fb886298c397b190280ef565cba2fe57f943abdbf86e8a4890172aaf716984cb70f')
prepare() {
- cd ${srcdir}
- tar xzf ${_pkgname}-source-${pkgver}-${_pkgreview}.tar.gz
cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}
patch -p1 -i ${srcdir}/id.patch
diff --git a/cups.patch b/cups.patch
index e47a2003df16..3f9eeb1d918f 100644
--- a/cups.patch
+++ b/cups.patch
@@ -20,9 +20,9 @@ diff -Nur cnijfilter-source-3.20-1.orig/cngpij/cngpij/bjcups.c cnijfilter-source
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/ppd.h>
-diff -Nur cnijfilter-source-3.20-1.orig/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c
---- cnijfilter-source-3.20-1.orig/cngpijmon/src/bjcupsmon_cups.c 2009-04-24 08:12:49.000000000 +0200
-+++ cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c 2012-08-15 15:28:54.618141976 +0200
+diff -aur cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.20-1.new/cngpijmon/src/bjcupsmon_cups.c
+--- cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c 2009-04-24 10:42:49.000000000 +0430
++++ cnijfilter-source-3.20-1.new/cngpijmon/src/bjcupsmon_cups.c 2020-01-26 22:53:06.120417016 +0330
@@ -18,7 +18,9 @@
*/
@@ -33,3 +33,275 @@ diff -Nur cnijfilter-source-3.20-1.orig/cngpijmon/src/bjcupsmon_cups.c cnijfilte
#include <cups/language.h>
#include <sys/types.h>
#include <unistd.h>
+@@ -212,24 +214,17 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
++ pRequest = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+
+- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
+- pRequest->request.op.request_id = 1;
+-
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, pURI);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+ if ((pAttribute = ippFindAttribute(pResponse, "printer-state", IPP_TAG_ENUM)) != NULL) {
+- printerState = (ipp_state_t)pAttribute->values[0].integer;
++ printerState = ippGetInteger(pAttribute, 0);
+ }
+ }
+
+@@ -285,19 +280,12 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
+- pRequest->request.op.request_id = 1;
+-
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
++ pRequest = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printerURI);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+@@ -309,7 +297,7 @@
+ //}
+ pAttribute = ippFindAttribute(pResponse, "printer-state-message", IPP_TAG_TEXT);
+ if (pAttribute != NULL) {
+- strncpy(pStatus, pAttribute->values[0].string.text, bufSize);
++ strncpy(pStatus, ippGetString(pAttribute, 0, NULL), bufSize);
+ }
+ }
+ ippDelete(pResponse);
+@@ -366,21 +354,14 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
++ pRequest = ippNewRequest(IPP_CANCEL_JOB);
+
+- pRequest->request.op.operation_id = IPP_CANCEL_JOB;
+- pRequest->request.op.request_id = 1;
+-
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printerURI);
+ ippAddInteger(pRequest, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", jobID);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/jobs/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ ippDelete(pResponse);
+@@ -434,43 +415,36 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = IPP_GET_JOBS;
+- pRequest->request.op.request_id = 1;
++ pRequest = ippNewRequest(IPP_GET_JOBS);
+
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, pURI);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pAttribute = pResponse->attrs;
++ pAttribute = ippFirstAttribute(pResponse);
+
+ while (pAttribute != NULL) {
+- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_JOB) {
+- pAttribute = pAttribute->next;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_JOB) {
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (pAttribute == NULL) {
+ break;
+ }
+
+- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_JOB) {
+- if (strcmp(pAttribute->name, "job-id") == 0 && pAttribute->value_tag == IPP_TAG_INTEGER) {
+- jobID = pAttribute->values[0].integer;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_JOB) {
++ if (strcmp(ippGetName(pAttribute), "job-id") == 0 && ippGetGroupTag(pAttribute) == IPP_TAG_INTEGER) {
++ jobID = ippGetInteger(pAttribute, 0);
+ }
+- if (strcmp(pAttribute->name, "job-state") == 0 && pAttribute->value_tag == IPP_TAG_ENUM) {
+- jobState = (ipp_jstate_t)pAttribute->values[0].integer;
++ if (strcmp(ippGetName(pAttribute), "job-state") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_ENUM) {
++ jobState = ippGetInteger(pAttribute, 0);
+ }
+- if (strcmp(pAttribute->name, "job-originating-user-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+- pJobUserName = pAttribute->values[0].string.text;
++ if (strcmp(ippGetName(pAttribute), "job-originating-user-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++ pJobUserName = ippGetString(pAttribute, 0, NULL);
+ }
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (jobState == IPP_JOB_PROCESSING) {
+ if (pJobUserName != NULL) {
+@@ -487,7 +461,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -543,40 +517,33 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
++ pRequest = ippNewRequest(CUPS_GET_PRINTERS);
+
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddStrings(pRequest, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(attributes) / sizeof(attributes[0]), NULL, attributes);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pAttribute = pResponse->attrs;
++ pAttribute = ippFirstAttribute(pResponse);
+
+ while (pAttribute != NULL) {
+- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+- pAttribute = pAttribute->next;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute != IPP_TAG_PRINTER)) {
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (pAttribute == NULL) {
+ break;
+ }
+
+- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+- pPrinter = pAttribute->values[0].string.text;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++ pPrinter = ippGetString(pAttribute, 0, NULL);
+ }
+- if (strcmp(pAttribute->name, "printer-uri-supported") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+- pUri = pAttribute->values[0].string.text;
++ if (strcmp(ippGetName(pAttribute), "printer-uri-supported") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++ pUri = ippGetString(pAttribute, 0, NULL);
+ }
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+
+ // Tora 020418: Compare two printer names ignoring the character case.
+@@ -593,7 +560,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -646,40 +613,33 @@
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
+-
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
++ pRequest = ippNewRequest(CUPS_GET_PRINTERS);
++
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ retVal = ID_ERR_CUPS_API_FAILED;
+ }
+ else {
+- pAttribute = pResponse->attrs;
++ pAttribute = ippFirstAttribute(pResponse);
+
+ while (pAttribute != NULL) {
+- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+- pAttribute = pAttribute->next;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (pAttribute == NULL) {
+ break;
+ }
+
+- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+- pPrinter = pAttribute->values[0].string.text;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++ pPrinter = ippGetString(pAttribute, 0, NULL);
+ }
+- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+- pDUri = pAttribute->values[0].string.text;
++ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++ pDUri = ippGetString(pAttribute, 0, NULL);
+ }
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+
+ if (strcasecmp(pDestName, pPrinter) == 0) {
+@@ -688,7 +648,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+