mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 08:52:56 +02:00
hplip: update to 3.22.6.
Remove 1 patch and add 1 build dependency. Add dataCobra as maintainer for the package. Tested on Neverstop Laser MFP 120x and OfficeJet Pro 901x. Scanning (hplip-scan and xsane) tested with both devices. Continue from PR hplip: update to 3.21.12 #35611.
This commit is contained in:
parent
faaa391d06
commit
a93b2ebff6
2 changed files with 2 additions and 102 deletions
|
@ -1,100 +0,0 @@
|
||||||
Based on patch by Zdenek Dohnal obtained from
|
|
||||||
https://bugs.launchpad.net/hplip/+bug/1933973
|
|
||||||
|
|
||||||
diff -pru hplip-3.21.8/io/mudext/hpmudext.c hplip-3.21.8-patched/io/mudext/hpmudext.c
|
|
||||||
--- hplip-3.21.8/io/mudext/hpmudext.c 2021-09-01 16:10:17.000000000 +0100
|
|
||||||
+++ hplip-3.21.8-patched/io/mudext/hpmudext.c 2021-10-22 08:30:38.600922861 +0100
|
|
||||||
@@ -24,6 +24,8 @@ Authors: Don Welch, David Suffield, Naga
|
|
||||||
|
|
||||||
\*****************************************************************************/
|
|
||||||
|
|
||||||
+#define PY_SSIZE_T_CLEAN
|
|
||||||
+
|
|
||||||
#include <Python.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include "hpmud.h"
|
|
||||||
@@ -187,14 +189,22 @@ static PyObject *write_channel(PyObject
|
|
||||||
HPMUD_CHANNEL cd;
|
|
||||||
int timeout = 30;
|
|
||||||
char * buf;
|
|
||||||
- int buf_size = 0;
|
|
||||||
+ Py_ssize_t buf_size = 0;
|
|
||||||
+ int buf_size_asInt = 0;
|
|
||||||
int bytes_written = 0;
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "iis#|i", &dd, &cd, &buf, &buf_size, &timeout))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
+ if (buf_size < INT_MIN)
|
|
||||||
+ buf_size_asInt = INT_MIN;
|
|
||||||
+ else if (buf_size > INT_MAX)
|
|
||||||
+ buf_size_asInt = INT_MAX;
|
|
||||||
+ else
|
|
||||||
+ buf_size_asInt = (int)buf_size;
|
|
||||||
+
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
- result = hpmud_write_channel(dd, cd, buf, buf_size, timeout, &bytes_written);
|
|
||||||
+ result = hpmud_write_channel(dd, cd, buf, buf_size_asInt, timeout, &bytes_written);
|
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
|
|
||||||
return Py_BuildValue("(ii)", result, bytes_written);
|
|
||||||
@@ -231,14 +241,22 @@ static PyObject *set_pml(PyObject *self,
|
|
||||||
char * oid;
|
|
||||||
int type;
|
|
||||||
char * data;
|
|
||||||
- int data_size;
|
|
||||||
+ Py_ssize_t data_size = 0;
|
|
||||||
+ int data_size_asInt = 0;
|
|
||||||
int pml_result;
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "iisis#", &dd, &cd, &oid, &type, &data, &data_size))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
+ if (data_size < INT_MIN)
|
|
||||||
+ data_size_asInt = INT_MIN;
|
|
||||||
+ else if (data_size > INT_MAX)
|
|
||||||
+ data_size_asInt = INT_MAX;
|
|
||||||
+ else
|
|
||||||
+ data_size_asInt = (int)data_size;
|
|
||||||
+
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
- result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size, &pml_result);
|
|
||||||
+ result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size_asInt, &pml_result);
|
|
||||||
Py_END_ALLOW_THREADS
|
|
||||||
|
|
||||||
return Py_BuildValue("(ii)", result, pml_result);
|
|
||||||
diff -pru hplip-3.21.8/pcard/pcardext/pcardext.c hplip-3.21.8-patched/pcard/pcardext/pcardext.c
|
|
||||||
--- hplip-3.21.8/pcard/pcardext/pcardext.c 2021-09-01 16:10:17.000000000 +0100
|
|
||||||
+++ hplip-3.21.8-patched/pcard/pcardext/pcardext.c 2021-10-22 08:24:11.010798381 +0100
|
|
||||||
@@ -24,6 +24,8 @@ Author: Don Welch
|
|
||||||
|
|
||||||
\*****************************************************************************/
|
|
||||||
|
|
||||||
+#define PY_SSIZE_T_CLEAN
|
|
||||||
+
|
|
||||||
#include <Python.h>
|
|
||||||
#include <structmember.h>
|
|
||||||
#include "../fat.h"
|
|
||||||
diff -pru hplip-3.21.8/prnt/cupsext/cupsext.c hplip-3.21.8-patched/prnt/cupsext/cupsext.c
|
|
||||||
--- hplip-3.21.8/prnt/cupsext/cupsext.c 2021-09-01 16:10:17.000000000 +0100
|
|
||||||
+++ hplip-3.21.8-patched/prnt/cupsext/cupsext.c 2021-10-22 08:26:30.975843330 +0100
|
|
||||||
@@ -73,6 +73,7 @@ Yashwant Kumar Sahu
|
|
||||||
Sanjay Kumar
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#define PY_SSIZE_T_CLEAN
|
|
||||||
|
|
||||||
#include <Python.h>
|
|
||||||
#include <structmember.h>
|
|
||||||
diff -pru hplip-3.21.8/scan/scanext/scanext.c hplip-3.21.8-patched/scan/scanext/scanext.c
|
|
||||||
--- hplip-3.21.8/scan/scanext/scanext.c 2021-09-01 16:10:17.000000000 +0100
|
|
||||||
+++ hplip-3.21.8-patched/scan/scanext/scanext.c 2021-10-21 21:31:23.074739743 +0100
|
|
||||||
@@ -45,6 +45,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
+#define PY_SSIZE_T_CLEAN
|
|
||||||
+
|
|
||||||
/* _ScanDevice objects */
|
|
||||||
|
|
||||||
#include "Python.h"
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'hplip'
|
# Template file for 'hplip'
|
||||||
pkgname=hplip
|
pkgname=hplip
|
||||||
version=3.21.10
|
version=3.22.6
|
||||||
revision=1
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
pycompile_dirs="usr/share/hplip"
|
pycompile_dirs="usr/share/hplip"
|
||||||
|
@ -36,7 +36,7 @@ license="GPL-2.0-only, BSD-3-Clause, MIT"
|
||||||
homepage="https://developers.hp.com/hp-linux-imaging-and-printing"
|
homepage="https://developers.hp.com/hp-linux-imaging-and-printing"
|
||||||
changelog="https://developers.hp.com/hp-linux-imaging-and-printing/release_notes"
|
changelog="https://developers.hp.com/hp-linux-imaging-and-printing/release_notes"
|
||||||
distfiles="${SOURCEFORGE_SITE}/hplip/hplip/${version}/hplip-${version}.tar.gz"
|
distfiles="${SOURCEFORGE_SITE}/hplip/hplip/${version}/hplip-${version}.tar.gz"
|
||||||
checksum=de230e1fdd1e718fc718417265612e0c882949e08fe045ee56f9f9882e6b6a60
|
checksum=27ed0d492febb0b47c656234820d3ce573b24ff5b62e3bf4b2c47f82868d6bb4
|
||||||
conflicts="hplip-gui"
|
conflicts="hplip-gui"
|
||||||
|
|
||||||
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libusb-1.0 -I${XBPS_CROSS_BASE}/${py3_inc}"
|
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libusb-1.0 -I${XBPS_CROSS_BASE}/${py3_inc}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue