diff options
9 files changed, 354 insertions, 76 deletions
diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch b/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch new file mode 100644 index 0000000000..659eca41c9 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0001-common-utils-Include-string.h-for-strcasestr.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 20984c73bea8c3df00f297176edd4f6d47c31b55 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 17:49:20 -0700 | ||
| 4 | Subject: [PATCH 1/4] common/utils: Include string.h for strcasestr | ||
| 5 | |||
| 6 | Also define _GNU_SOURCE for the same | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | common/utils.c | 2 ++ | ||
| 12 | 1 file changed, 2 insertions(+) | ||
| 13 | |||
| 14 | --- a/common/utils.c | ||
| 15 | +++ b/common/utils.c | ||
| 16 | @@ -1,9 +1,11 @@ | ||
| 17 | +#define _GNU_SOURCE | ||
| 18 | #include "utils.h" | ||
| 19 | #include "string.h" | ||
| 20 | #include <dlfcn.h> | ||
| 21 | #include <sys/stat.h> | ||
| 22 | #include <errno.h> | ||
| 23 | #include <stdlib.h> | ||
| 24 | +#include <string.h> /* strcasestr */ | ||
| 25 | |||
| 26 | extern int errno; | ||
| 27 | |||
| 28 | --- a/protocol/hp_ipp.c | ||
| 29 | +++ b/protocol/hp_ipp.c | ||
| 30 | @@ -18,12 +18,13 @@ Boston, MA 02110-1301, USA. | ||
| 31 | |||
| 32 | \******************************************************************************/ | ||
| 33 | |||
| 34 | - | ||
| 35 | +#define _GNU_SOURCE | ||
| 36 | #include <cups/cups.h> | ||
| 37 | #include <cups/language.h> | ||
| 38 | #include <cups/ppd.h> | ||
| 39 | #include <syslog.h> | ||
| 40 | #include <stdarg.h> | ||
| 41 | +#include <string.h> /* strcasecmp */ | ||
| 42 | #include <sys/types.h> | ||
| 43 | #include <pwd.h> | ||
| 44 | #include <sys/stat.h> | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch new file mode 100644 index 0000000000..2cfe1255e9 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 3d53d02af7c45763eb33f7bbe5f9e389fbcb7e21 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 17:55:48 -0700 | ||
| 4 | Subject: [PATCH 2/4] Add ImageProcessor only when DISBALE_IMAGEPROCESSOR_BUILD | ||
| 5 | is not set | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | Makefile.am | 6 +++++- | ||
| 11 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile.am b/Makefile.am | ||
| 14 | index 5f75759..73421b1 100644 | ||
| 15 | --- a/Makefile.am | ||
| 16 | +++ b/Makefile.am | ||
| 17 | @@ -597,7 +597,11 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp | ||
| 18 | prnt/hpcups/ImageProcessor.h | ||
| 19 | |||
| 20 | hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) | ||
| 21 | -hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) | ||
| 22 | +hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) | ||
| 23 | +if !DISBALE_IMAGEPROCESSOR_BUILD | ||
| 24 | +hpcups_LDADD += "-lImageProcessor" | ||
| 25 | +endif #DISABLE_IMAGEPROCESSOR | ||
| 26 | + | ||
| 27 | #else | ||
| 28 | #hpcupsdir = $(cupsfilterdir) | ||
| 29 | #hpcups_PROGRAMS = hpcups | ||
| 30 | -- | ||
| 31 | 2.37.3 | ||
| 32 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/0003-pserror.c-Define-column-to-be-int-explcitly.patch b/meta-oe/recipes-extended/hplip/hplip/0003-pserror.c-Define-column-to-be-int-explcitly.patch new file mode 100644 index 0000000000..78325ac8d6 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0003-pserror.c-Define-column-to-be-int-explcitly.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | From a27d6264671e7201b5d78bcc9200e7d946429979 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 17:57:53 -0700 | ||
| 4 | Subject: [PATCH 3/4] pserror.c: Define column to be int explcitly | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | prnt/hpps/pserror.c | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | --- a/prnt/hpps/pserror.c | ||
| 12 | +++ b/prnt/hpps/pserror.c | ||
| 13 | @@ -24,7 +24,7 @@ extern char *program ; /* Defined by mai | ||
| 14 | void message(int flags, char *format, ...) | ||
| 15 | { | ||
| 16 | va_list args ; | ||
| 17 | - static column = 0 ; /* current screen column for message wrap */ | ||
| 18 | + static int column = 0 ; /* current screen column for message wrap */ | ||
| 19 | char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */ | ||
| 20 | char *bufptr = msgbuf ; /* message buffer pointer */ | ||
| 21 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch b/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch new file mode 100644 index 0000000000..276d025785 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From 33454817880fa57b2226dd40b724e5c3d6074aca Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 17:58:33 -0700 | ||
| 4 | Subject: [PATCH 4/4] Define missing prototype for functions | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | prnt/cupsext/cupsext.c | 1 + | ||
| 9 | protocol/hp_ipp.c | 4 ++-- | ||
| 10 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
| 11 | |||
| 12 | --- a/prnt/cupsext/cupsext.c | ||
| 13 | +++ b/prnt/cupsext/cupsext.c | ||
| 14 | @@ -101,6 +101,11 @@ typedef int Py_ssize_t; | ||
| 15 | #define _STRINGIZE(x) #x | ||
| 16 | #define STRINGIZE(x) _STRINGIZE(x) | ||
| 17 | |||
| 18 | +void _releaseCupsInstance(void); | ||
| 19 | +int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info); | ||
| 20 | +int setDefaultCupsPrinter(char *pr_name); | ||
| 21 | +int delCupsPrinter(char *pr_name); | ||
| 22 | +int controlCupsPrinter(char *pr_name, int op); | ||
| 23 | |||
| 24 | //static http_t * http = NULL; /* HTTP object */ | ||
| 25 | |||
| 26 | --- a/protocol/hp_ipp.c | ||
| 27 | +++ b/protocol/hp_ipp.c | ||
| 28 | @@ -22,6 +22,7 @@ Boston, MA 02110-1301, USA. | ||
| 29 | #include <cups/cups.h> | ||
| 30 | #include <cups/language.h> | ||
| 31 | #include <cups/ppd.h> | ||
| 32 | +#include <stdio.h> | ||
| 33 | #include <syslog.h> | ||
| 34 | #include <stdarg.h> | ||
| 35 | #include <string.h> /* strcasecmp */ | ||
| 36 | @@ -42,7 +43,7 @@ Boston, MA 02110-1301, USA. | ||
| 37 | #define STRINGIZE(x) _STRINGIZE(x) | ||
| 38 | |||
| 39 | |||
| 40 | -http_t* acquireCupsInstance() | ||
| 41 | +http_t* acquireCupsInstance(void) | ||
| 42 | { | ||
| 43 | if ( http == NULL) | ||
| 44 | { | ||
| 45 | @@ -53,7 +54,7 @@ http_t* acquireCupsInstance() | ||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 49 | -void _releaseCupsInstance() | ||
| 50 | +void _releaseCupsInstance(void) | ||
| 51 | { | ||
| 52 | if (http) | ||
| 53 | { | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch b/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch new file mode 100644 index 0000000000..d844e49ad3 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | From 4b3014df3990d90d6929510f2bde073171503329 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 18:18:44 -0700 | ||
| 4 | Subject: [PATCH] hp_ipp.c: Add printf format to snprintf calls | ||
| 5 | |||
| 6 | Avoid -Wformat warnings | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | protocol/hp_ipp.c | 14 +++++++------- | ||
| 11 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c | ||
| 14 | index 597d9b9..a027baf 100644 | ||
| 15 | --- a/protocol/hp_ipp.c | ||
| 16 | +++ b/protocol/hp_ipp.c | ||
| 17 | @@ -112,7 +112,7 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, | ||
| 18 | } | ||
| 19 | |||
| 20 | if ( info == NULL ) | ||
| 21 | - snprintf( info,sizeof(info), name ); | ||
| 22 | + snprintf( info,sizeof(info), "%s", name ); | ||
| 23 | |||
| 24 | sprintf( printer_uri, "ipp://localhost/printers/%s", name ); | ||
| 25 | |||
| 26 | @@ -513,27 +513,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list) | ||
| 27 | |||
| 28 | if ( strcmp(attr_name, "printer-name") == 0 && | ||
| 29 | val_tag == IPP_TAG_NAME ) { | ||
| 30 | - snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); | ||
| 31 | + snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL) ); | ||
| 32 | } | ||
| 33 | else if ( strcmp(attr_name, "device-uri") == 0 && | ||
| 34 | val_tag == IPP_TAG_URI ) { | ||
| 35 | - snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); | ||
| 36 | + snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL) ); | ||
| 37 | } | ||
| 38 | else if ( strcmp(attr_name, "printer-uri-supported") == 0 && | ||
| 39 | val_tag == IPP_TAG_URI ) { | ||
| 40 | - snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); | ||
| 41 | + snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL) ); | ||
| 42 | } | ||
| 43 | else if ( strcmp(attr_name, "printer-info") == 0 && | ||
| 44 | val_tag == IPP_TAG_TEXT ) { | ||
| 45 | - snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); | ||
| 46 | + snprintf(t_printer->info,sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL) ); | ||
| 47 | } | ||
| 48 | else if ( strcmp(attr_name, "printer-location") == 0 && | ||
| 49 | val_tag == IPP_TAG_TEXT ) { | ||
| 50 | - snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); | ||
| 51 | + snprintf(t_printer->location,sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL) ); | ||
| 52 | } | ||
| 53 | else if ( strcmp(attr_name, "printer-make-and-model") == 0 && | ||
| 54 | val_tag == IPP_TAG_TEXT ) { | ||
| 55 | - snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); | ||
| 56 | + snprintf(t_printer->make_model,sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL) ); | ||
| 57 | } | ||
| 58 | else if ( strcmp(attr_name, "printer-state") == 0 && | ||
| 59 | val_tag == IPP_TAG_ENUM ) { | ||
| 60 | -- | ||
| 61 | 2.37.3 | ||
| 62 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/0006-Workaround-patch-for-missing-Python3-transition-of-t.patch b/meta-oe/recipes-extended/hplip/hplip/0006-Workaround-patch-for-missing-Python3-transition-of-t.patch new file mode 100644 index 0000000000..5d78bb3bbb --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0006-Workaround-patch-for-missing-Python3-transition-of-t.patch | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | From: Till Kamppeter <till.kamppeter@gmail.com> | ||
| 2 | Date: Fri, 22 Jul 2016 09:33:04 +0200 | ||
| 3 | Subject: Workaround patch for missing Python3 transition of the old | ||
| 4 | (pre-USB-storage) photo memory card support (pcardext) as this part builds | ||
| 5 | in Python3 environments but with pointer-related warnings which are fatal | ||
| 6 | errors for Ubuntu's build servers. The patch silences the warnings but the | ||
| 7 | memory card support is dropped in Python3 environments. This patch is | ||
| 8 | supplied by the HPLIP upstream developers and will be replaced by a more | ||
| 9 | proper solution in the next upstream release of HPLIP (see LP: #1275353) | ||
| 10 | |||
| 11 | --- | ||
| 12 | pcard/pcardext/pcardext.c | 59 +++++++++++++++++++++++++++++++++++++---------- | ||
| 13 | pcard/photocard.py | 2 +- | ||
| 14 | unload.py | 5 ++++ | ||
| 15 | 3 files changed, 53 insertions(+), 13 deletions(-) | ||
| 16 | |||
| 17 | --- a/pcard/pcardext/pcardext.c | ||
| 18 | +++ b/pcard/pcardext/pcardext.c | ||
| 19 | @@ -20,7 +20,7 @@ pcardext - Python extension for HP photo | ||
| 20 | Requires: | ||
| 21 | Python 2.2+ | ||
| 22 | |||
| 23 | -Author: Don Welch | ||
| 24 | +Author: Don Welch | ||
| 25 | |||
| 26 | \*****************************************************************************/ | ||
| 27 | |||
| 28 | @@ -41,9 +41,37 @@ typedef int Py_ssize_t; | ||
| 29 | |||
| 30 | int verbose=0; | ||
| 31 | |||
| 32 | +#if PY_MAJOR_VERSION >= 3 | ||
| 33 | + #define MOD_ERROR_VAL NULL | ||
| 34 | + #define MOD_SUCCESS_VAL(val) val | ||
| 35 | + #define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void) | ||
| 36 | + #define PyInt_AS_LONG PyLong_AS_LONG | ||
| 37 | + #define MOD_DEF(ob, name, doc, methods) \ | ||
| 38 | + static struct PyModuleDef moduledef = { \ | ||
| 39 | + PyModuleDef_HEAD_INIT, name, doc, -1, methods, }; \ | ||
| 40 | + ob = PyModule_Create(&moduledef); | ||
| 41 | + | ||
| 42 | + | ||
| 43 | + #define PY_String_Bytes PyBytes_FromStringAndSize | ||
| 44 | + #define PY_AsString_Bytes PyBytes_AsStringAndSize | ||
| 45 | + | ||
| 46 | +#else | ||
| 47 | + #define MOD_ERROR_VAL | ||
| 48 | + #define MOD_SUCCESS_VAL(val) | ||
| 49 | + #define MOD_INIT(name) void init##name(void) | ||
| 50 | + #define MOD_DEF(ob, name, doc, methods) \ | ||
| 51 | + ob = Py_InitModule3(name, methods, doc); | ||
| 52 | + | ||
| 53 | + #define PY_String_Bytes PyString_FromStringAndSize | ||
| 54 | + #define PY_AsString_Bytes PyString_AsStringAndSize | ||
| 55 | + | ||
| 56 | +#endif | ||
| 57 | + | ||
| 58 | PyObject * readsectorFunc = NULL; | ||
| 59 | PyObject * writesectorFunc = NULL; | ||
| 60 | |||
| 61 | + | ||
| 62 | + | ||
| 63 | int ReadSector(int sector, int nsector, void *buf, int size) | ||
| 64 | { | ||
| 65 | PyObject * result; | ||
| 66 | @@ -59,9 +87,13 @@ int ReadSector(int sector, int nsector, | ||
| 67 | if( result ) | ||
| 68 | { | ||
| 69 | Py_ssize_t len = 0; | ||
| 70 | - PyString_AsStringAndSize( result, &result_str, &len ); | ||
| 71 | + | ||
| 72 | + //PyString_AsStringAndSize( result, &result_str, &len ); | ||
| 73 | + //PyBytes_AsStringAndSize( result, &result_str, &len ); | ||
| 74 | + PY_AsString_Bytes( result, &result_str, &len ); | ||
| 75 | |||
| 76 | - if( len < nsector*FAT_HARDSECT ) | ||
| 77 | + | ||
| 78 | + if( len < nsector*FAT_HARDSECT ) | ||
| 79 | { | ||
| 80 | goto abort; | ||
| 81 | } | ||
| 82 | @@ -208,7 +240,9 @@ PyObject * pcardext_read( PyObject * sel | ||
| 83 | |||
| 84 | if( FatReadFileExt( name, offset, len, buffer ) == len ) | ||
| 85 | { | ||
| 86 | - return PyString_FromStringAndSize( (char *)buffer, len ); | ||
| 87 | + // return PyString_FromStringAndSize( (char *)buffer, len ); | ||
| 88 | + return PY_String_Bytes( (char *)buffer, len ); | ||
| 89 | + // return PyBytes_FromStringAndSize( (char *)buffer, len ); | ||
| 90 | } | ||
| 91 | else | ||
| 92 | { | ||
| 93 | @@ -236,14 +270,15 @@ static PyMethodDef pcardext_methods[] = | ||
| 94 | |||
| 95 | static char pcardext_documentation[] = "Python extension for HP photocard services"; | ||
| 96 | |||
| 97 | -void initpcardext( void ) | ||
| 98 | -{ | ||
| 99 | - PyObject * mod = Py_InitModule4( "pcardext", pcardext_methods, | ||
| 100 | - pcardext_documentation, (PyObject*)NULL, | ||
| 101 | - PYTHON_API_VERSION ); | ||
| 102 | - | ||
| 103 | - if (mod == NULL) | ||
| 104 | - return; | ||
| 105 | +MOD_INIT(pcardext) { | ||
| 106 | + | ||
| 107 | + PyObject* mod ; | ||
| 108 | + MOD_DEF(mod, "pcardext", pcardext_documentation, pcardext_methods); | ||
| 109 | + if (mod == NULL) | ||
| 110 | + return MOD_ERROR_VAL; | ||
| 111 | + | ||
| 112 | + return MOD_SUCCESS_VAL(mod); | ||
| 113 | + | ||
| 114 | } | ||
| 115 | |||
| 116 | |||
| 117 | --- a/unload.py | ||
| 118 | +++ b/unload.py | ||
| 119 | @@ -44,6 +44,11 @@ except ImportError: | ||
| 120 | |||
| 121 | # Local | ||
| 122 | from base.g import * | ||
| 123 | +from base.sixext import PY3 | ||
| 124 | +if PY3: | ||
| 125 | + log.error("This functionality is not spported in python3 environment.") | ||
| 126 | + sys.exit(1) | ||
| 127 | + | ||
| 128 | from base import device, utils, tui, module | ||
| 129 | from prnt import cups | ||
| 130 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch b/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch deleted file mode 100644 index aee4ac50cc..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | # ../bin/ld: cannot find -lImageProcessor | ||
| 2 | --- a/Makefile.am | ||
| 3 | +++ b/Makefile.am | ||
| 4 | @@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte | ||
| 5 | prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ | ||
| 6 | prnt/hpcups/genPCLm.h \ | ||
| 7 | common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ | ||
| 8 | - prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ | ||
| 9 | - prnt/hpcups/ImageProcessor.h | ||
| 10 | + prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp | ||
| 11 | |||
| 12 | hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) | ||
| 13 | -hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) | ||
| 14 | +hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) | ||
| 15 | #else | ||
| 16 | #hpcupsdir = $(cupsfilterdir) | ||
| 17 | #hpcups_PROGRAMS = hpcups | ||
| 18 | --- a/prnt/hpcups/HPCupsFilter.cpp | ||
| 19 | +++ b/prnt/hpcups/HPCupsFilter.cpp | ||
| 20 | @@ -637,16 +637,10 @@ int HPCupsFilter::processRasterData(cups | ||
| 21 | |||
| 22 | |||
| 23 | sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); | ||
| 24 | - image_processor_t* imageProcessor = imageProcessorCreate(); | ||
| 25 | |||
| 26 | while (cupsRasterReadHeader2(cups_raster, &cups_header)) | ||
| 27 | { | ||
| 28 | |||
| 29 | - IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); | ||
| 30 | - if (result != IPE_SUCCESS){ | ||
| 31 | - dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | current_page_number++; | ||
| 35 | |||
| 36 | if (current_page_number == 1) { | ||
| 37 | @@ -745,11 +739,6 @@ int HPCupsFilter::processRasterData(cups | ||
| 38 | color_raster = rgbRaster; | ||
| 39 | black_raster = kRaster; | ||
| 40 | |||
| 41 | - result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); | ||
| 42 | - if (result != IPE_SUCCESS){ | ||
| 43 | - dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | |||
| 47 | if ((y == 0) && !is_ljmono) { | ||
| 48 | //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer | ||
| 49 | @@ -780,11 +769,6 @@ int HPCupsFilter::processRasterData(cups | ||
| 50 | } | ||
| 51 | } // for() loop end | ||
| 52 | |||
| 53 | - result = imageProcessorEndPage(imageProcessor); | ||
| 54 | - if (result != IPE_SUCCESS){ | ||
| 55 | - dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | |||
| 59 | m_Job.NewPage(); | ||
| 60 | if (err != NO_ERROR) { | ||
| 61 | @@ -800,8 +784,6 @@ int HPCupsFilter::processRasterData(cups | ||
| 62 | rgbRaster = NULL; | ||
| 63 | } | ||
| 64 | |||
| 65 | - imageProcessorDestroy(imageProcessor); | ||
| 66 | - | ||
| 67 | unlink(hpPreProcessedRasterFile); | ||
| 68 | return ret_status; | ||
| 69 | } | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip/configure.patch b/meta-oe/recipes-extended/hplip/hplip/configure.patch index 8fe77c5edf..571d5fe308 100644 --- a/meta-oe/recipes-extended/hplip/hplip/configure.patch +++ b/meta-oe/recipes-extended/hplip/hplip/configure.patch | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | --- a/configure.in | 1 | --- a/configure.in |
| 2 | +++ b/configure.in | 2 | +++ b/configure.in |
| 3 | @@ -27,8 +27,7 @@ | 3 | @@ -30,7 +30,7 @@ |
| 4 | AC_INIT([HP Linux Imaging and Printing], [3.22.6], [3.22.6], [hplip]) | ||
| 4 | 5 | ||
| 5 | #AC_PREREQ(2.59) | 6 | #AM_INIT_AUTOMAKE([1.9 foreign]) |
| 6 | AC_INIT([HP Linux Imaging and Printing], [3.19.12], [3.19.12], [hplip]) | ||
| 7 | -#AM_INIT_AUTOMAKE([1.9 foreign]) | ||
| 8 | -AM_INIT_AUTOMAKE | 7 | -AM_INIT_AUTOMAKE |
| 9 | +AM_INIT_AUTOMAKE([foreign]) | 8 | +AM_INIT_AUTOMAKE([foreign]) |
| 10 | AC_DISABLE_STATIC | 9 | AC_DISABLE_STATIC |
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb b/meta-oe/recipes-extended/hplip/hplip_3.22.6.bb index ac845ffcf9..b746006c20 100644 --- a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb +++ b/meta-oe/recipes-extended/hplip/hplip_3.22.6.bb | |||
| @@ -5,14 +5,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" | |||
| 5 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | 5 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ |
| 6 | file://configure.patch \ | 6 | file://configure.patch \ |
| 7 | file://fix-libusb-paths.patch \ | 7 | file://fix-libusb-paths.patch \ |
| 8 | file://999-remove-lImageProcessor.patch \ | ||
| 9 | file://600-fix.patch \ | 8 | file://600-fix.patch \ |
| 10 | file://030-replace_unsafe_memcpy_with_memmove.patch \ | 9 | file://030-replace_unsafe_memcpy_with_memmove.patch \ |
| 11 | file://050-fix-glibcisms.patch \ | 10 | file://050-fix-glibcisms.patch \ |
| 12 | file://hplip-3.19.6-fix-return.patch \ | 11 | file://hplip-3.19.6-fix-return.patch \ |
| 12 | file://0001-common-utils-Include-string.h-for-strcasestr.patch \ | ||
| 13 | file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \ | ||
| 14 | file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \ | ||
| 15 | file://0004-Define-missing-prototype-for-functions.patch \ | ||
| 16 | file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ | ||
| 17 | file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ | ||
| 13 | " | 18 | " |
| 14 | SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3" | 19 | SRC_URI[sha256sum] = "27ed0d492febb0b47c656234820d3ce573b24ff5b62e3bf4b2c47f82868d6bb4" |
| 15 | SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255" | ||
| 16 | 20 | ||
| 17 | DEPENDS += "cups python3 libusb" | 21 | DEPENDS += "cups python3 libusb" |
| 18 | 22 | ||
| @@ -25,6 +29,7 @@ CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" | |||
| 25 | 29 | ||
| 26 | EXTRA_OECONF += "\ | 30 | EXTRA_OECONF += "\ |
| 27 | LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ | 31 | LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ |
| 32 | --enable-cups-drv-install \ | ||
| 28 | --enable-cups-ppd-install \ | 33 | --enable-cups-ppd-install \ |
| 29 | --disable-network-build \ | 34 | --disable-network-build \ |
| 30 | --disable-doc-build \ | 35 | --disable-doc-build \ |
| @@ -39,6 +44,7 @@ EXTRA_OECONF += "\ | |||
| 39 | --enable-foomatic-drv-install \ | 44 | --enable-foomatic-drv-install \ |
| 40 | --disable-foomatic-ppd-install \ | 45 | --disable-foomatic-ppd-install \ |
| 41 | --disable-foomatic-rip-hplip-install \ | 46 | --disable-foomatic-rip-hplip-install \ |
| 47 | --disable-imageProcessor_build \ | ||
| 42 | --with-cupsbackenddir=${libexecdir}/cups/backend \ | 48 | --with-cupsbackenddir=${libexecdir}/cups/backend \ |
| 43 | --with-cupsfilterdir=${libexecdir}/cups/filter \ | 49 | --with-cupsfilterdir=${libexecdir}/cups/filter \ |
| 44 | " | 50 | " |
