summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Akbar2020-12-09 13:45:20 +0700
committerAli Akbar2020-12-09 13:53:22 +0700
commitc59598bc65fdc3dd14c1e4753dd63094164ff2c5 (patch)
treef9c6c837e388e6cf38e43162eece26e6bcd0003b
parent88bb0cf3c931728388c586b00ac035b247750135 (diff)
downloadaur-cnijfilter-ip2800series.tar.gz
Compatiblity with latest CUPS update
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD5
-rw-r--r--cngpij_bjcups.c.patch43
-rw-r--r--cngpijmnt_main.c.patch45
-rw-r--r--cnijnpr_cnijnpr.c.patch2
5 files changed, 95 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e12b87e58d79..d857af662fc6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = cnijfilter-ip2800series
pkgdesc = Canon IJ Printer Driver for Pixma IP2800 series (with cnijfilter-common)
pkgver = 4.10
- pkgrel = 1
+ pkgrel = 2
url = https://canon-print.com/canon-pixma-ip2800-series-drivers-windows-mac-linux/
arch = x86_64
license = custom
diff --git a/PKGBUILD b/PKGBUILD
index 9411c47e4c08..b2d347fc7f46 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=cnijfilter-ip2800series
pkgver=4.10
-pkgrel=1
+pkgrel=2
pkgdesc="Canon IJ Printer Driver for Pixma IP2800 series (with cnijfilter-common)"
url="https://canon-print.com/canon-pixma-ip2800-series-drivers-windows-mac-linux/"
arch=('x86_64')
@@ -34,6 +34,7 @@ build() {
./autogen.sh
cd ..
cd cnijnpr
+ patch src/cnijnpr.c ../../../cnijnpr_cnijnpr.c.patch
./autogen.sh --prefix=/usr --enable-libpath=/usr/lib/bjlib
cd ..
@@ -42,10 +43,12 @@ build() {
cd ..
cd cngpij
patch configure.in ../../../cngpij_configure.in.patch
+ patch cngpij/bjcups.c ../../../cngpij_bjcups.c.patch
./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
cd ..
cd cngpijmnt
patch configure.in ../../../cngpijmnt_configure.in.patch
+ patch src/main.c ../../../cngpijmnt_main.c.patch
./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
cd ..
cd pstocanonij
diff --git a/cngpij_bjcups.c.patch b/cngpij_bjcups.c.patch
new file mode 100644
index 000000000000..40219f3ebb94
--- /dev/null
+++ b/cngpij_bjcups.c.patch
@@ -0,0 +1,43 @@
+698,701c698
+< pRequest = ippNew();
+<
+< pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+< pRequest->request.op.request_id = 1;
+---
+> pRequest = ippNewRequest(IPP_OP_CUPS_GET_PRINTERS);
+710c707
+< if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
+---
+> if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+715c712
+< pAttribute = pResponse->attrs;
+---
+> pAttribute = ippFirstAttribute(pResponse);
+718,719c715,716
+< while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+< pAttribute = pAttribute->next;
+---
+> while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
+> pAttribute = ippNextAttribute(pResponse);
+725,727c722,724
+< 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);
+729,730c726,727
+< 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);
+732c729
+< pAttribute = pAttribute->next;
+---
+> pAttribute = ippNextAttribute(pResponse);
+741c738
+< pAttribute = pAttribute->next;
+---
+> pAttribute = ippNextAttribute(pResponse);
diff --git a/cngpijmnt_main.c.patch b/cngpijmnt_main.c.patch
new file mode 100644
index 000000000000..683ea6c30d14
--- /dev/null
+++ b/cngpijmnt_main.c.patch
@@ -0,0 +1,45 @@
+321,325c321,322
+< pRequest = ippNew();
+<
+< pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+< pRequest->request.op.request_id = 1;
+<
+---
+> pRequest = ippNewRequest(IPP_OP_CUPS_GET_PRINTERS);
+>
+333c330
+< if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
+---
+> if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+338c335
+< pAttribute = pResponse->attrs;
+---
+> pAttribute = ippFirstAttribute(pResponse);
+341,342c338,339
+< while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+< pAttribute = pAttribute->next;
+---
+> while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
+> pAttribute = ippNextAttribute(pResponse);
+348,350c345,347
+< 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);
+352,353c349,350
+< 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);
+355c352
+< pAttribute = pAttribute->next;
+---
+> pAttribute = ippNextAttribute(pResponse);
+364c361
+< pAttribute = pAttribute->next;
+---
+> pAttribute = ippNextAttribute(pResponse);
diff --git a/cnijnpr_cnijnpr.c.patch b/cnijnpr_cnijnpr.c.patch
new file mode 100644
index 000000000000..e0d15eee5470
--- /dev/null
+++ b/cnijnpr_cnijnpr.c.patch
@@ -0,0 +1,2 @@
+35d34
+< #include <sys/sysctl.h>