automatic version update by autodist [release 3.24.4-1mamba;Tue Nov 19 2024]

This commit is contained in:
Automatic Build System 2024-11-20 08:39:40 +01:00
parent 4b17805b00
commit 1427e42c71
7 changed files with 138 additions and 434 deletions

View File

@ -1,11 +0,0 @@
diff -up hplip-3.11.5/prnt/hpps/hppsfilter.c.cups15 hplip-3.11.5/prnt/hpps/hppsfilter.c
--- hplip-3.11.5/prnt/hpps/hppsfilter.c.cups15 2011-06-10 11:44:25.933781345 +0100
+++ hplip-3.11.5/prnt/hpps/hppsfilter.c 2011-06-10 11:46:24.474510996 +0100
@@ -38,6 +38,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -1,392 +0,0 @@
diff -up hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors hplip-3.12.6/prnt/cupsext/cupsext.c
--- hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors 2012-06-18 12:41:19.000000000 +0200
+++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-07-19 17:11:47.606524137 +0200
@@ -87,6 +87,46 @@ typedef int Py_ssize_t;
#define PY_SSIZE_T_MIN INT_MIN
#endif
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetCount(attr) attr->num_values
+#define ippGetGroupTag(attr) attr->group_tag
+#define ippGetValueTag(attr) attr->value_tag
+#define ippGetName(attr) attr->name
+#define ippGetBoolean(attr, element) attr->values[element].boolean
+#define ippGetInteger(attr, element) attr->values[element].integer
+#define ippGetStatusCode(ipp) ipp->request.status.status_code
+#define ippGetString(attr, element, language) attr->values[element].string.text
+
+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
+{
+ if (!ipp)
+ return (NULL);
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+ return (ipp->current = ipp->current->next);
+}
+
+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
+{
+ ipp->request.op.operation_id = op;
+ return (1);
+}
+
+static int ippSetRequestId( ipp_t *ipp, int request_id )
+{
+ ipp->request.any.request_id = request_id;
+ return (1);
+}
+#endif
int g_num_options = 0;
cups_option_t * g_options;
@@ -333,8 +373,8 @@ PyObject * getPrinters( PyObject * self,
request = ippNew();
language = cupsLangDefault();
- request->request.op.operation_id = CUPS_GET_PRINTERS;
- request->request.any.request_id = 1;
+ ippSetOperation( request, CUPS_GET_PRINTERS );
+ ippSetRequestId ( request, 1);
ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding( language ) );
@@ -378,10 +418,10 @@ PyObject * getPrinters( PyObject * self,
ipp_pstate_t state;
int i = 0;
- for ( attr = response->attrs; attr != NULL; attr = attr->next )
+ for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) )
{
- while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER )
- attr = attr->next;
+ while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER )
+ attr = ippNextAttribute( response );
if ( attr == NULL )
break;
@@ -390,41 +430,41 @@ PyObject * getPrinters( PyObject * self,
state = IPP_PRINTER_IDLE;
accepting = 0;
- while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER )
+ while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER )
{
- if ( strcmp( attr->name, "printer-name" ) == 0 &&
- attr->value_tag == IPP_TAG_NAME )
- name = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "device-uri" ) == 0 &&
- attr->value_tag == IPP_TAG_URI )
- device_uri = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 &&
- attr->value_tag == IPP_TAG_URI )
- printer_uri = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "printer-info" ) == 0 &&
- attr->value_tag == IPP_TAG_TEXT )
- info = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "printer-location" ) == 0 &&
- attr->value_tag == IPP_TAG_TEXT )
- location = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 &&
- attr->value_tag == IPP_TAG_TEXT )
- make_model = attr->values[ 0 ].string.text;
-
- else if ( strcmp( attr->name, "printer-state" ) == 0 &&
- attr->value_tag == IPP_TAG_ENUM )
- state = ( ipp_pstate_t ) attr->values[ 0 ].integer;
-
- else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
- attr->value_tag == IPP_TAG_BOOLEAN)
- accepting = attr->values[ 0 ].boolean;
+ if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_NAME )
+ name = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_URI )
+ device_uri = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_URI )
+ printer_uri = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
+ info = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
+ location = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
+ make_model = ippGetString( attr, 0, NULL );
+
+ else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 &&
+ ippGetValueTag( attr ) == IPP_TAG_ENUM )
+ state = ( ipp_pstate_t ) ippGetInteger( attr, 0 );
+
+ else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") &&
+ ippGetValueTag( attr ) == IPP_TAG_BOOLEAN)
+ accepting = ippGetBoolean( attr, 0 );
- attr = attr->next;
+ attr = ippNextAttribute( response );
}
if ( device_uri == NULL )
@@ -522,8 +562,8 @@ PyObject * addPrinter( PyObject * self,
request = ippNew();
language = cupsLangDefault();
- request->request.op.operation_id = CUPS_ADD_PRINTER;
- request->request.any.request_id = 1;
+ ippSetOperation( request, CUPS_ADD_PRINTER );
+ ippSetRequestId ( request, 1 );
ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding( language ) );
@@ -568,7 +608,7 @@ PyObject * addPrinter( PyObject * self,
}
else
{
- status = response->request.status.status_code;
+ status = ippGetStatusCode( response );
//ippDelete( response );
r = 1;
}
@@ -631,8 +671,8 @@ PyObject * delPrinter( PyObject * self,
*/
request = ippNew();
- request->request.op.operation_id = CUPS_DELETE_PRINTER;
- request->request.op.request_id = 1;
+ ippSetOperation( request, CUPS_DELETE_PRINTER );
+ ippSetRequestId ( request, 1 );
language = cupsLangDefault();
@@ -650,7 +690,7 @@ PyObject * delPrinter( PyObject * self,
*/
response = cupsDoRequest( http, request, "/admin/" );
- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
{
r = 1;
}
@@ -721,8 +761,8 @@ PyObject * setDefaultPrinter( PyObject *
request = ippNew();
- request->request.op.operation_id = CUPS_SET_DEFAULT;
- request->request.op.request_id = 1;
+ ippSetOperation( request, CUPS_SET_DEFAULT );
+ ippSetRequestId ( request, 1 );
language = cupsLangDefault();
@@ -743,7 +783,7 @@ PyObject * setDefaultPrinter( PyObject *
response = cupsDoRequest( http, request, "/admin/" );
- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
{
r = 1;
}
@@ -797,8 +837,8 @@ PyObject * controlPrinter( PyObject * se
request = ippNew();
- request->request.op.operation_id = op;
- request->request.op.request_id = 1;
+ ippSetOperation( request, op );
+ ippSetRequestId ( request, 1 );
language = cupsLangDefault();
@@ -822,7 +862,7 @@ PyObject * controlPrinter( PyObject * se
response = cupsDoRequest(http, request, "/admin/");
- if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT))
+ if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT))
{
r = 1;
}
@@ -837,7 +877,7 @@ abort:
if ( response != NULL )
ippDelete( response );
- return Py_BuildValue( "i", r );;
+ return Py_BuildValue( "i", r );
}
@@ -1116,8 +1156,8 @@ PyObject * getPPDList( PyObject * self,
request = ippNew();
- request->request.op.operation_id = CUPS_GET_PPDS;
- request->request.op.request_id = 1;
+ ippSetOperation( request, CUPS_GET_PPDS );
+ ippSetRequestId ( request, 1 );
language = cupsLangDefault();
@@ -1143,43 +1183,43 @@ PyObject * getPPDList( PyObject * self,
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
- for (attr = response->attrs; attr; attr = attr->next)
+ for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response ))
{
PyObject *dict;
char *ppdname = NULL;
- while (attr && attr->group_tag != IPP_TAG_PRINTER)
- attr = attr->next;
+ while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
+ attr = ippNextAttribute( response );
if (!attr)
break;
dict = PyDict_New ();
- for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
+ for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response ))
{
PyObject *val = NULL;
- if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME)
+ if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME)
{
- ppdname = attr->values[0].string.text;
+ ppdname = ippGetString( attr, 0, NULL );
//sprintf( buf, "print '%s'", ppdname);
//PyRun_SimpleString( buf );
}
- else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD)
- //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) ||
- // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) ||
- // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) ||
- // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT))
+ else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD)
+ //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) ||
+ // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
+ // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
+ // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT))
{
- val = PyObj_from_UTF8(attr->values[0].string.text);
+ val = PyObj_from_UTF8(ippGetString( attr, 0, NULL ));
}
if (val)
{
- PyDict_SetItemString (dict, attr->name, val);
+ PyDict_SetItemString (dict, ippGetName( attr ), val);
Py_DECREF (val);
}
}
diff -up hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors hplip-3.12.6/scan/sane/hpaio.c
--- hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors 2012-06-18 12:42:51.000000000 +0200
+++ hplip-3.12.6/scan/sane/hpaio.c 2012-07-19 17:12:34.557848760 +0200
@@ -47,6 +47,43 @@
#define DEBUG_DECLARE_ONLY
#include "sanei_debug.h"
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetGroupTag(attr) attr->group_tag
+#define ippGetValueTag(attr) attr->value_tag
+#define ippGetName(attr) attr->name
+#define ippGetString(attr, element, language) attr->values[element].string.text
+
+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
+{
+ if (!ipp)
+ return (NULL);
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+ return (ipp->current = ipp->current->next);
+}
+
+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
+{
+ ipp->request.op.operation_id = op;
+ return (1);
+}
+
+static int ippSetRequestId( ipp_t *ipp, int request_id )
+{
+ ipp->request.any.request_id = request_id;
+ return (1);
+}
+#endif
+
static SANE_Device **DeviceList = NULL;
static int AddDeviceList(char *uri, char *model, SANE_Device ***pd)
@@ -186,8 +223,8 @@ static int GetCupsPrinters(char ***print
/* Assemble the IPP request */
request = ippNew();
- request->request.op.operation_id = CUPS_GET_PRINTERS;
- request->request.any.request_id = 1;
+ ippSetOperation( request, CUPS_GET_PRINTERS );
+ ippSetRequestId( request, 1 );
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
@@ -197,20 +234,20 @@ static int GetCupsPrinters(char ***print
if ((response = cupsDoRequest(http, request, "/")) == NULL)
goto bugout;
- for (attr = response->attrs; attr != NULL; attr = attr->next)
+ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response ))
{
/* Skip leading attributes until we hit a printer. */
- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
- attr = attr->next;
+ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
+ attr = ippNextAttribute( response );
if (attr == NULL)
break;
- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
+ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER)
{
- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0)
+ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0)
cnt++;
- attr = attr->next;
+ attr = ippNextAttribute( response );
}
if (attr == NULL)

View File

@ -1,10 +0,0 @@
--- hplip-3.18.12/base/password.py.orig 2018-12-03 08:07:04.000000000 +0100
+++ hplip-3.18.12/base/password.py 2019-01-28 06:15:36.455652572 +0100
@@ -52,6 +52,7 @@
'centos': 'su',
'igos': 'su',
'linuxmint': 'sudo',
+ 'openmamba': 'sudo',
'linpus': 'sudo',
'gos': 'sudo',
'boss': 'su',

View File

@ -1,11 +0,0 @@
--- hplip-3.22.2/scan/sane/bb_ledm.c 2022-02-23 08:41:05.000000000 +0100
+++ hplip-3.22.2/scan/sane/bb_ledm.c.new 2022-03-12 21:10:05.818054984 +0100
@@ -1015,7 +1015,7 @@
c +=11;
char BinaryURL[30];
i = 0;
- while(*c != '<')
+ while(*c != '<' && i < 29)
{
BinaryURL[i++] = *c ;
c++;

View File

@ -0,0 +1,114 @@
diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
index 57d1dde..3475929 100644
--- a/scan/sane/hpaio.c
+++ b/scan/sane/hpaio.c
@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_
ResetDeviceList(&DeviceList);
DevDiscovery(localOnly);
*deviceList = (const SANE_Device **)DeviceList;
- SANE_Device*** devList;
+ const SANE_Device*** devList;
orblite_get_devices(devList, localOnly);
return SANE_STATUS_GOOD;
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
index 2eb7aba..4eaa468 100644
--- a/scan/sane/orblite.c
+++ b/scan/sane/orblite.c
@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
},
{
SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint
},
{
SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint
},
{
SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
},
// optResolution, // resolution group
@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
},
// optMode, // color/depth group
@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint
},
// optSource,
@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint
},
// optPaperSize,
@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint
},
// optPaperSize,
@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
},
#ifdef NOTDEF
// default template
@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
SANE_Auth_Callback authorize;
const SANE_Device *** device_list;
SANE_Bool local_only;
+ void * temp_handle;
// Allocate handle, set all handle values to zero
@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
if (stat != SANE_STATUS_GOOD)
return stat;
- stat = g_handle->bb_orblite_open(devicename, &g_handle);
+ temp_handle = g_handle;
+ stat = g_handle->bb_orblite_open(devicename, &temp_handle);
+ g_handle = temp_handle;
if (stat == SANE_STATUS_GOOD)
*handle = g_handle;

View File

@ -0,0 +1,12 @@
diff -Nru hplip-3.23.12.orig/prnt/hpps/pserror.c hplip-3.23.12/prnt/hpps/pserror.c
--- hplip-3.23.12.orig/prnt/hpps/pserror.c 2023-11-27 15:06:40.000000000 +0000
+++ hplip-3.23.12/prnt/hpps/pserror.c 2024-06-06 07:28:05.765351553 +0000
@@ -24,7 +24,7 @@
void message(int flags, char *format, ...)
{
va_list args ;
- static column = 0 ; /* current screen column for message wrap */
+ static int column = 0 ; /* current screen column for message wrap */
char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */
char *bufptr = msgbuf ; /* message buffer pointer */

View File

@ -3,7 +3,7 @@
%define cups_ver %(cups-config --api-version)
%define plugin_version 3.23.8
Name: hplip
Version: 3.23.12
Version: 3.24.4
Release: 1mamba
Summary: A printer driver for HP inkjet devices
Group: System/Spooling
@ -13,15 +13,13 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://developers.hp.com/hp-linux-imaging-and-printing
Source: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz
Source1: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-%{plugin_version}-plugin.run
Patch0: %{name}-3.11.7-cups-1.5.patch
Patch1: %{name}-3.12.9-cups-1.6.patch
Patch2: hplip-3.18.12-openmamba-AUTH_TYPES-warning.patch
Patch6: hplip-3.22.4-ui5-systray-hide-when-inactive.patch
Patch7: hplip-3.22.4-python3.patch
Patch8: hplip-3.22.4-configure-python.patch
Patch9: hplip-3.22.4-disable_upgrade.patch
Patch10: hplip-3.22.4-fix-possible-stack-buffer.overflows.patch
Patch11: hplip-3.22.4-Remove-all-ImageProcessor-functionality.patch
Patch12: hplip-3.24.4-pserror-gcc14.patch
Patch13: hplip-3.24.4-hpaio-gcc14.patch
License: BSD, LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -29,17 +27,16 @@ BuildRequires: libavahi-devel
BuildRequires: libcups-devel
BuildRequires: libdbus-devel
BuildRequires: libgcc
BuildRequires: libjpeg-devel
BuildRequires: libjpeg-turbo
BuildRequires: libnetsnmp-devel
BuildRequires: libnsl-devel
BuildRequires: libopenssl-devel
BuildRequires: libpython311-devel
BuildRequires: libstdc++6-devel
BuildRequires: libudev-devel
BuildRequires: libusb-compat-devel
BuildRequires: libusb-devel
BuildRequires: libz-devel
BuildRequires: sane-backends-devel
BuildRequires: setup
## AUTOBUILDREQ-END
BuildRequires: python3-devel >= 3.11.5-3mamba
BuildRequires: gcc-fortran >= 4.0.1
@ -79,13 +76,14 @@ This package contains the proprietary plugins needed by some printers.
%prep
%setup -q
#%patch 2 -p1
%patch 6 -p1 -b .ui5-systray-hide-when-inactive
%patch 7 -p1 -b .python3
%patch 8 -p1 -b .configure-python
%patch 9 -p0 -b .disable_upgrade
#%patch10 -p1 -b .fix-possible-stack-buffer.overflows
%patch 11 -p1 -b .Remove-all-ImageProcessor-functionality
%patch 12 -p1 -b .pserror-gcc14
%patch 13 -p1 -b .hpaio-gcc14
#sed -i "s|SYSFS{|ATTRS{|g" data/rules/55-hpmud.rules data/rules/56-hpmud_support.rules
#sed -i "s|sysfs{|ATTR{|g" data/rules/55-hpmud.rules data/rules/56-hpmud_support.rules
@ -112,6 +110,7 @@ export AUTOMAKE='automake --foreign'
autoreconf -f -i
%build
export CFLAGS="%{optflags} -Wno-deprecated-declarations -Wno-implicit-function-declaration -Wno-return-mismatch"
%configure \
--enable-qt5 \
--disable-qt4 \
@ -278,6 +277,9 @@ fi
%{_localstatedir}/lib/hp/hplip.state
%changelog
* Tue Nov 19 2024 Automatic Build System <autodist@openmamba.org> 3.24.4-1mamba
- automatic version update by autodist
* Tue Dec 26 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 3.23.12-1mamba
- update to 3.23.12