summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD6
-rw-r--r--cups.patch22
-rw-r--r--mychanges.patch229
4 files changed, 227 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d856efcdd6..a494b548962 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon May 9 16:19:52 UTC 2016
+# Fri Oct 18 18:12:54 UTC 2019
pkgbase = cnijfilter-common
pkgdesc = Canon IJ Printer Driver (Common Package)
pkgver = 4.10
- pkgrel = 1
+ pkgrel = 2
url = http://www.canon-europe.com/support/pixma_software/
install = cnijfilter-common.install
arch = i686
@@ -19,9 +19,9 @@ pkgbase = cnijfilter-common
source = buildfiles.patch
source = mychanges.patch
sha512sums = 58198e92e360c71c95423bfa8278f449eb645245af1b96770323cb6f4b2b7186e5ab326d58377c20627c750d3d8c253addf637f9d18e085b1c89a81d6239ab51
- sha512sums = 141a78c2353b3864b5a468fb6f4cf74fef5bf53ae75ac8932d6d853adc4044254a5371dcba1d05358b6075b6f38783f580ac7137088b91c10b1e412581144843
+ sha512sums = ce3de5764d47809166c86cc52feeae354f459bdc1db757ee62e8c7793b4886f95d9a04caee5adefc73b3ae1752ce370668d23d9530ebf8be2b7b25066e064210
sha512sums = fb73e2e0653f2654a9c5211b5dc3e06ce24cd2f5bf64a27009f5446e69c7f02d78bb201f15da0f68ad01b1cb4e699c808eccb9df690ffea07b6d5a59ab5629f3
- sha512sums = 210902afe06240def9d6e662f5c21a8e99eeac6104798230f196e269e07b20b265bd360a15aed921ab73e7aff91c4a8e3212585091d86e89bac42e4b32ed1afd
+ sha512sums = c23d7e8406a7b43b0680a43cc1467075afc299b85ce5c3f7c0eb8e85f573226ec0dfb1497b70e0b08746cbc639360b746cd5962cfbf3935adb66aedf2a7fbcd2
depends_i686 = libcups
depends_i686 = popt
depends_i686 = libusb
diff --git a/PKGBUILD b/PKGBUILD
index bb42955f8b0..2a11ecb378c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ pkgname=('cnijfilter-common')
_pkgname=cnijfilter
pkgver=4.10
-pkgrel=1
+pkgrel=2
_pkgreview=1
pkgdesc="Canon IJ Printer Driver (Common Package)"
@@ -35,9 +35,9 @@ source=("cnijfilter-source-4.10-1.tar.gz::http://pdisp01.c-wss.com/gdl/WWUFORedi
"buildfiles.patch"
"mychanges.patch")
sha512sums=('58198e92e360c71c95423bfa8278f449eb645245af1b96770323cb6f4b2b7186e5ab326d58377c20627c750d3d8c253addf637f9d18e085b1c89a81d6239ab51'
- '141a78c2353b3864b5a468fb6f4cf74fef5bf53ae75ac8932d6d853adc4044254a5371dcba1d05358b6075b6f38783f580ac7137088b91c10b1e412581144843'
+ 'ce3de5764d47809166c86cc52feeae354f459bdc1db757ee62e8c7793b4886f95d9a04caee5adefc73b3ae1752ce370668d23d9530ebf8be2b7b25066e064210'
'fb73e2e0653f2654a9c5211b5dc3e06ce24cd2f5bf64a27009f5446e69c7f02d78bb201f15da0f68ad01b1cb4e699c808eccb9df690ffea07b6d5a59ab5629f3'
- '210902afe06240def9d6e662f5c21a8e99eeac6104798230f196e269e07b20b265bd360a15aed921ab73e7aff91c4a8e3212585091d86e89bac42e4b32ed1afd')
+ 'c23d7e8406a7b43b0680a43cc1467075afc299b85ce5c3f7c0eb8e85f573226ec0dfb1497b70e0b08746cbc639360b746cd5962cfbf3935adb66aedf2a7fbcd2')
prepare() {
cd "${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}/"
diff --git a/cups.patch b/cups.patch
index 19a44b22924..4cbbdd1f626 100644
--- a/cups.patch
+++ b/cups.patch
@@ -9,25 +9,3 @@ diff -ruN cnijfilter-source-4.10-1.orig/backend/src/cnij_backend_common.c cnijfi
// Header file for CANON
#include "cnij_backend_common.h"
-diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c
---- cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c 2016-05-09 20:25:06.256620531 +0430
-@@ -20,6 +20,7 @@
- #include <config.h>
- #endif // HAVE_CONFIG_H
-
-+#define _IPP_PRIVATE_STRUCTURES 1
- #include <cups/cups.h>
- #include <cups/language.h>
- #include <cups/ppd.h>
-diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c cnijfilter-source-4.10-1/cngpijmnt/src/main.c
---- cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpijmnt/src/main.c 2016-05-09 20:25:06.259953863 +0430
-@@ -20,6 +20,7 @@
- #include <config.h>
- #endif // HAVE_CONFIG_H
-
-+#define _IPP_PRIVATE_STRUCTURES 1
- #include <cups/cups.h>
- #include <cups/language.h>
- #include <cups/ppd.h>
diff --git a/mychanges.patch b/mychanges.patch
index c3d639e0e2e..e49fea1a82f 100644
--- a/mychanges.patch
+++ b/mychanges.patch
@@ -1,6 +1,6 @@
diff -ruN cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c
--- cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c 2019-10-18 19:59:20.867823821 +0330
@@ -252,6 +252,7 @@
// waitpid( g_pid, NULL, 0) ; /* child process wait */
@@ -21,7 +21,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c cnijfilte
fseek(tempfp, read_position, SEEK_SET);
diff -ruN cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c
--- cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c 2019-10-18 19:59:20.867823821 +0330
@@ -337,7 +337,7 @@
bufsize = (src[0] << 8) + src[1];
buf = (char*)&(src[2]);
@@ -33,7 +33,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c cnijfil
keylen = strlen(key);
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c cnijfilter-source-4.10-1/bscc2sts/src/langmon.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/langmon.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/langmon.c 2019-10-18 19:59:20.867823821 +0330
@@ -258,7 +258,7 @@
static int print_normal()
@@ -54,7 +54,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c cnijfilter-source
ptr += w_size;
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c 2019-10-18 19:59:20.867823821 +0330
@@ -244,13 +244,17 @@
ptr = buf;
/* data print(output) loop */
@@ -75,7 +75,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c cnijfilter-sourc
write(log_hand, ptr, w_size);
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c 2019-10-18 19:59:20.867823821 +0330
@@ -516,7 +516,9 @@
int dev_path = PRNT_PATH;
short cnclerr = -1;
@@ -96,9 +96,115 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c cnijfilter-sour
while( cnclerr != CNCL_OK ){
#ifdef DEBUG
fprintf(log_path, "CNCL_CHECK_START2:response @ i : %d\n",i);
+diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c
+--- cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c 2013-12-24 07:39:15.000000000 +0330
++++ cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c 2019-10-18 21:38:49.880605949 +0330
+@@ -660,22 +660,6 @@
+
+
+
+-static cups_lang_t * bjcupsLangDefault( )
+-{
+- cups_lang_t *pLanguage;
+- char *tLang;
+-
+- if( (tLang = getenv("LC_ALL"))==NULL)
+- tLang = getenv("LANG");
+-
+- pLanguage = cupsLangDefault();
+- setlocale(LC_ALL,tLang);
+-
+- return pLanguage;
+-}
+-
+-
+-
+ static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize)
+ {
+ /*** Parameters start ***/
+@@ -683,7 +667,6 @@
+ ipp_t *pRequest, // Pointer to CUPS IPP request.
+ *pResponse; // Pointer to CUPS IPP response.
+ ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
+- cups_lang_t *pLanguage; // Pointer to language.
+ char *pPrinter = NULL; // Pointer to printer name.
+ char *pDUri = NULL; // Pointer to Device uri.
+ short retVal = -1; // Return value.
+@@ -695,41 +678,34 @@
+ goto onErr;
+ }
+ 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) {
+ fputs("ERROR: IPP ERROR\n", stderr);
+ goto onErr;
+ }
+ 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) {
+@@ -738,7 +714,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -748,8 +724,6 @@
+ pDeviceURI = '\0';
+ goto onErr;
+ }
+-
+- cupsLangFree(pLanguage);
+ httpClose(pHTTP);
+ }
+
diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c
--- cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c 2019-10-18 19:59:20.867823821 +0330
@@ -60,59 +60,57 @@
while( (client_fd = accept(server_fd, (struct sockaddr *)&sun, &len)) >= 0 )
@@ -182,7 +288,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c cnijfilter-source
unlink(sname);
diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c
--- cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c 2019-10-18 19:59:20.867823821 +0330
@@ -62,59 +62,57 @@
while( (client_fd = accept(server_fd, (struct sockaddr *)&sun, &len)) >= 0 )
@@ -264,9 +370,114 @@ diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c cnijfilter-source
close(server_fd);
unlink(sname);
+diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c cnijfilter-source-4.10-1/cngpijmnt/src/main.c
+--- cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c 2013-12-24 07:39:15.000000000 +0330
++++ cnijfilter-source-4.10-1/cngpijmnt/src/main.c 2019-10-18 21:38:46.250574242 +0330
+@@ -283,22 +283,6 @@
+
+
+
+-static cups_lang_t * bjcupsLangDefault( )
+-{
+- cups_lang_t *pLanguage;
+- char *tLang;
+-
+- if( (tLang = getenv("LC_ALL"))==NULL)
+- tLang = getenv("LANG");
+-
+- pLanguage = cupsLangDefault();
+- setlocale(LC_ALL,tLang);
+-
+- return pLanguage;
+-}
+-
+-
+-
+ static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize)
+ {
+ /*** Parameters start ***/
+@@ -306,7 +290,6 @@
+ ipp_t *pRequest, // Pointer to CUPS IPP request.
+ *pResponse; // Pointer to CUPS IPP response.
+ ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
+- cups_lang_t *pLanguage; // Pointer to language.
+ char *pPrinter = NULL; // Pointer to printer name.
+ char *pDUri = NULL; // Pointer to Device uri.
+ short retVal = -1; // Return value.
+@@ -318,41 +301,34 @@
+ goto onErr;
+ }
+ 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);
+ 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) {
+ fputs("ERROR: IPP ERROR\n", stderr);
+ goto onErr;
+ }
+ 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) {
+@@ -361,7 +337,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -371,8 +347,6 @@
+ pDeviceURI = '\0';
+ goto onErr;
+ }
+-
+- cupsLangFree(pLanguage);
+ httpClose(pHTTP);
+ }
+
diff -ruN cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c
--- cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c 2019-10-18 19:59:20.867823821 +0330
@@ -35,6 +35,7 @@
#include <sys/sysctl.h>
#include <config.h>
@@ -295,7 +506,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c cnijfilter-source-
char *ivec = NULL;
diff -ruN cnijfilter-source-4.10-1.orig/pstocanonij/filter/pstocanonij.c cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c
--- cnijfilter-source-4.10-1.orig/pstocanonij/filter/pstocanonij.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c 2016-05-09 20:25:06.269953863 +0430
++++ cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c 2019-10-18 19:59:20.867823821 +0330
@@ -387,7 +387,7 @@
{
if( !IS_BLANK(*p_code) )