summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD84
-rw-r--r--cnijfilter-ip100.install11
-rw-r--r--cups.patch394
-rw-r--r--id.po.patch14
-rw-r--r--png.patch12
6 files changed, 545 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a9eb8c5fba91
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = cnijfilter-ip100
+ pkgdesc = Canon IJ Printer Driver for Pixma ip100 (MG2140, MG2150, etc) multifunction
+ pkgver = 3.70
+ pkgrel = 1
+ url = https://www.canon-europe.com/support/consumer_products/products/printers/inkjet/pixma_ip_series/ip100.html?type=drivers&language=en&os=linux
+ install = cnijfilter-ip100.install
+ arch = x86_64
+ license = GPL2
+ license = LGPL2
+ license = custom
+ makedepends = autoconf>=2.13
+ makedepends = automake>=1.6
+ makedepends = tar
+ makedepends = make
+ makedepends = gcc
+ depends = libglade
+ depends = cups
+ depends = ghostscript
+ conflicts = cnijfilter-common
+ source = https://gdlp01.c-wss.com/gds/8/0100004118/01/cnijfilter-source-3.70-1.tar.gz
+ source = cups.patch
+ source = png.patch
+ source = id.po.patch
+ md5sums = 0f23002a95c4dc9e8b85fe612d0cff0b
+ md5sums = db2fb9cd651e459f9219b5fc556c3d0e
+ md5sums = 872716942e916acabf43913f9b7bdcd9
+ md5sums = f1defa34fa288a9848db849144244d55
+
+pkgname = cnijfilter-ip100
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fa2b706d557f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# Maintainer: Nicholas Wang <me@nicho1as.wang>
+# PKGBUILD adapted from cnijfilter-mg2100
+# Patch adapted from cnijfilter-mg2100 and cnijfilter-ip7200
+
+printername="ip100"
+printercode=303 #Codename for driver
+pkgname=cnijfilter-${printername}
+pkgver=3.70
+pkgrel=1
+pkgdesc="Canon IJ Printer Driver for Pixma ${printername} (MG2140, MG2150, etc) multifunction"
+arch=('x86_64')
+url="https://www.canon-europe.com/support/consumer_products/products/printers/inkjet/pixma_ip_series/ip100.html?type=drivers&language=en&os=linux"
+license=('GPL2' 'LGPL2' 'custom')
+depends=('libglade' 'cups' 'ghostscript')
+makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
+conflicts=('cnijfilter-common')
+install=cnijfilter-${printername}.install
+source=("https://gdlp01.c-wss.com/gds/8/0100004118/01/cnijfilter-source-${pkgver}-${pkgrel}.tar.gz" "cups.patch" "png.patch" "id.po.patch" )
+md5sums=('0f23002a95c4dc9e8b85fe612d0cff0b'
+ 'db2fb9cd651e459f9219b5fc556c3d0e'
+ '872716942e916acabf43913f9b7bdcd9'
+ 'f1defa34fa288a9848db849144244d55')
+
+package() {
+ cd ${srcdir}
+ tar xzf cnijfilter-source-${pkgver}-${pkgrel}.tar.gz
+
+ patch -Np0 -i $srcdir/cups.patch || return 1
+ patch -Np0 -i $srcdir/id.po.patch || return 1
+ patch -Np0 -i $srcdir/png.patch || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/backend
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-progpath=/usr/bin || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/libs
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/pstocanonij
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-binpath=/usr/bin --enable-progpath=/usr/bin || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/cngpij
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-binpath=/usr/bin --enable-progpath=/usr/bin || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/ppd
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/cnijfilter
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin --enable-progpath=/usr/bin || return 1
+ make clean
+ make || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/printui
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --datadir=/usr/share --enable-progpath=/usr/bin || return 1
+ make clean
+ make || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/lgmon
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-binpath=/usr/bin --enable-progpath=/usr/bin || return 1
+ make clean
+ make || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}/cngpijmon
+ ./autogen.sh --prefix=/usr --program-suffix=${printername} --enable-progpath=/usr/bin || return 1
+ make clean
+ make || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgrel}
+ install -d ${pkgdir}/usr/lib/bjlib
+ install -m 755 ${printercode}/database/* ${pkgdir}/usr/lib/bjlib
+ install -s -m 755 ${printercode}/libs_bin64/*.so.* ${pkgdir}/usr/lib
+ install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
+ ln -s /usr/lib/cups/filter/pstocanonij${printername} ${pkgdir}/usr/lib/cups/filter/pstocanonij
+ chown -R root:root ${pkgdir}/usr/
+
+}
diff --git a/cnijfilter-ip100.install b/cnijfilter-ip100.install
new file mode 100644
index 000000000000..5f10cfd33409
--- /dev/null
+++ b/cnijfilter-ip100.install
@@ -0,0 +1,11 @@
+post_install() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig
+ fi
+}
+post_upgrade() {
+ post_install
+}
+post_remove() {
+ post_install
+}
diff --git a/cups.patch b/cups.patch
new file mode 100644
index 000000000000..14c93c1740c5
--- /dev/null
+++ b/cups.patch
@@ -0,0 +1,394 @@
+diff -ur cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c cnijfilter-source-3.70-1_patched/backend/src/cnij_backend_common.c
+--- cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c 2011-02-14 09:27:08.000000000 +0200
++++ cnijfilter-source-3.70-1_patched/backend/src/cnij_backend_common.c 2012-10-28 16:12:56.205438499 +0200
+@@ -38,6 +38,7 @@
+ // CUPS Header
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
++#include <cups/ppd.h>
+
+ // Header file for CANON
+ #include "cnij_backend_common.h"
+
+diff -ur cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.70-1_patched/cngpijmon/src/bjcupsmon_cups.c
+--- cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c 2011-03-01 07:52:18.000000000 +0200
++++ cnijfilter-source-3.70-1_patched/cngpijmon/src/bjcupsmon_cups.c 2012-10-28 16:12:09.072093398 +0200
+@@ -18,8 +18,10 @@
+ */
+
+ /*** Includes ***/
++#define _IPP_PRIVATE_STRUCTURES 1
+ #include <cups/cups.h>
+ #include <cups/language.h>
++#include <cups/ppd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <pwd.h>
+
+
+--- cnijfilter-source-3.70-1/cngpij/cngpij/bjcups.c 2013-12-24 07:39:15.000000000 +0330
++++ cnijfilter-source-3.70-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 -ura cnijfilter-source-3.70-1/cngpijmnt/src/main.c cnijfilter-source-3.80-1_patched/cngpijmnt/src/main.c
+--- cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c 2012-05-22 04:49:27.000000000 -0500
++++ cnijfilter-source-3.70-1_patched/cngpijmon/src/bjcupsmon_cups.c 2020-02-27 19:13:14.074174222 -0600
+@@ -215,8 +215,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, IPP_GET_PRINTER_ATTRIBUTES);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -225,12 +225,12 @@
+ 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 = (ipp_state_t)ippGetInteger(pAttribute, 0);
+ }
+ }
+
+@@ -288,8 +288,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, IPP_GET_PRINTER_ATTRIBUTES);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -298,7 +298,7 @@
+ 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 {
+@@ -310,7 +310,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);
+@@ -369,8 +369,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = IPP_CANCEL_JOB;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, IPP_CANCEL_JOB);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -381,7 +381,7 @@
+ 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);
+@@ -444,8 +444,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = IPP_GET_JOBS;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, IPP_GET_JOBS);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -456,31 +456,31 @@
+ ippAddStrings(pRequest, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes",(int)(sizeof(jobattrs) / sizeof(jobattrs[0])), NULL, jobattrs);
+
+ 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 && ippGetValueTag(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 = (ipp_jstate_t)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) {
+@@ -497,7 +497,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -555,8 +555,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -565,28 +565,28 @@
+ 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.
+@@ -603,7 +603,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -658,8 +658,8 @@
+ else {
+ pRequest = ippNew();
+
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
++ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
++ ippSetRequestId(pRequest, 1);
+
+ pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+
+@@ -668,28 +668,28 @@
+ 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) {
+@@ -698,7 +698,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
diff --git a/id.po.patch b/id.po.patch
new file mode 100644
index 000000000000..1ceb1691cefe
--- /dev/null
+++ b/id.po.patch
@@ -0,0 +1,14 @@
+diff -ur cnijfilter-source-3.70-1/printui/po/id.po cnijfilter-source-3.70-1_patched/printui/po/id.po
+--- cnijfilter-source-3.70-1/printui/po/id.po 2011-05-31 03:57:34.000000000 +0300
++++ cnijfilter-source-3.70-1_patched/printui/po/id.po 2012-10-28 16:15:41.302148419 +0200
+@@ -1447,8 +1447,8 @@
+ "Paper Source: %s is not available for the selected Media Type.\n"
+ "Paper Source setting has been changed to %s."
+ msgstr ""
+-"Setelan Sumber Kertas saat ini tidak tersedia untuk Tipe Media yang dipilih.\n"
+-"Setelan Sumber Kertas telah diubah."
++"Setelan Sumber %s Kertas saat ini tidak tersedia untuk Tipe Media yang dipilih.\n"
++"Setelan Sumber Kertas telah diubah %s."
+
+ #. bkenh_enh
+ #: po/keystr.h:342
diff --git a/png.patch b/png.patch
new file mode 100644
index 000000000000..db632a7595a4
--- /dev/null
+++ b/png.patch
@@ -0,0 +1,12 @@
+diff -ur cnijfilter-source-3.70-1/cnijfilter/src/bjfimage.c cnijfilter-source-3.70-1_patched/cnijfilter/src/bjfimage.c
+--- cnijfilter-source-3.70-1/cnijfilter/src/bjfimage.c 2011-02-17 03:45:45.000000000 +0200
++++ cnijfilter-source-3.70-1_patched/cnijfilter/src/bjfimage.c 2012-10-28 16:14:05.272123231 +0200
+@@ -1574,7 +1574,7 @@
+ goto onErr;
+ }
+
+- if (setjmp (png_p->jmpbuf))
++ if (setjmp (png_jmpbuf(png_p)))
+ {
+ png_destroy_read_struct(&png_p, &info_p, (png_infopp)NULL);
+ goto onErr;