aboutsummaryrefslogtreecommitdiff
path: root/system/pixma
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2022-03-06 13:05:42 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-07 08:45:19 +0700
commit901c760e5c709cc11e938d45b05028bfe2d65598 (patch)
tree72159616cc1f9e8fd61e837c77b1218a2a725e90 /system/pixma
parenta03c90e62c38d6dc6e6a680150c5e03ce8d73651 (diff)
system/pixma: Patched for SL15.0
Signed-off-by: Christoph Willing <chris.willing@linux.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pixma')
-rw-r--r--system/pixma/05_ipp.diff124
-rw-r--r--system/pixma/pixma.SlackBuild14
2 files changed, 133 insertions, 5 deletions
diff --git a/system/pixma/05_ipp.diff b/system/pixma/05_ipp.diff
new file mode 100644
index 0000000000000..2919a3fa4058b
--- /dev/null
+++ b/system/pixma/05_ipp.diff
@@ -0,0 +1,124 @@
+--- cngpij/cngpij/bjcups.c.orig 2013-07-17 11:33:45.000000000 +1000
++++ cngpij/cngpij/bjcups.c 2022-03-06 11:35:54.874000000 +1000
+@@ -698,8 +698,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
+
+@@ -708,29 +708,29 @@
+ 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) {
+@@ -739,7 +739,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+--- cngpijmnt/src/main.c.orig 2022-03-06 11:44:22.748000000 +1000
++++ cngpijmnt/src/main.c 2022-03-06 12:01:18.331000000 +1000
+@@ -322,8 +322,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
+
+@@ -332,29 +332,29 @@
+ 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) {
+@@ -363,7 +363,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
diff --git a/system/pixma/pixma.SlackBuild b/system/pixma/pixma.SlackBuild
index 2fdeafb657253..5911b782f1afc 100644
--- a/system/pixma/pixma.SlackBuild
+++ b/system/pixma/pixma.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for pixma
-# Copyright 2019 Christoph Willing Brisbane, Australia
+# Copyright 2019-2022 Christoph Willing Brisbane, Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pixma
VERSION=${VERSION:-4.00.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -93,10 +93,14 @@ cd $SRCNAM-$SRCVERSION
patch -p0 < $CWD/00_IPP_PRIVATE_STRUCTURES.diff
patch -p0 < $CWD/04_ppd_h.diff
+# SL15.0
+patch -p0 < $CWD/05_ipp.diff
+sed -i -e "/sys\/sysctl.h/d" cnijnpr/src/cnijnpr.c
+
# Correct cups directory location
-sed -i -e "s/lib\/cups/lib$LIBDIRSUFFIX\/cups/" cnijbe/src/Makefile.am
-sed -i -e "s/lib\/cups/lib$LIBDIRSUFFIX\/cups/" backend/src/Makefile.am
-sed -i -e "s/lib\/cups/lib$LIBDIRSUFFIX\/cups/" backendnet/backend/Makefile.am
+sed -i -e "s:lib/cups:lib$LIBDIRSUFFIX/cups:" cnijbe/src/Makefile.am
+sed -i -e "s:lib/cups:lib$LIBDIRSUFFIX/cups:" backend/src/Makefile.am
+sed -i -e "s:lib/cups:lib$LIBDIRSUFFIX/cups:" backendnet/backend/Makefile.am
chown -R root:root .
find -L . \