diff options
Diffstat (limited to 'meta-oe/recipes-extended/hplip')
16 files changed, 813 insertions, 119 deletions
diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-Drop-using-register-storage-classifier.patch b/meta-oe/recipes-extended/hplip/hplip/0001-Drop-using-register-storage-classifier.patch new file mode 100644 index 0000000000..237374d74b --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0001-Drop-using-register-storage-classifier.patch @@ -0,0 +1,309 @@ +From c36f0af7ba75c133edc46f052b291188351b6c20 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Jan 2023 15:49:16 -0800 +Subject: [PATCH] Drop using register storage classifier + +Its beeing dropped from latest standards beginning C++17 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + ip/xjpg_dct.c | 4 +-- + ip/xjpg_dct.h | 4 +-- + prnt/hpcups/Mode9.cpp | 2 +- + prnt/hpcups/ModeDeltaPlus.cpp | 4 +-- + prnt/hpcups/jccolor.c | 46 +++++++++++++++++------------------ + prnt/hpijs/compression.cpp | 2 +- + prnt/hpijs/jccolor.c | 44 ++++++++++++++++----------------- + prnt/hpijs/ljfastraster.cpp | 4 +-- + prnt/hpps/psutil.c | 6 ++--- + 9 files changed, 58 insertions(+), 58 deletions(-) + +diff --git a/ip/xjpg_dct.c b/ip/xjpg_dct.c +index 63f021b..1986923 100644 +--- a/ip/xjpg_dct.c ++++ b/ip/xjpg_dct.c +@@ -103,7 +103,7 @@ + | for the Winograd DCT. | + |____________________________________________________________________________| + */ +-void dct_forward (register int *block_p) ++void dct_forward (int *block_p) + { + #define CONST_FRAC_BITS 14 /* bits of frac in CONST_1-CONST_5 below */ + +@@ -257,7 +257,7 @@ void dct_forward (register int *block_p) + | and level-shifting, you must clamp these values to 0..255. | + |____________________________________________________________________________| + */ +-void dct_inverse (register int *block_p) ++void dct_inverse (int *block_p) + { + #define CONST_FRAC_BITS 13 /* bits of frac in CONST_1-CONST_5 below */ + +diff --git a/ip/xjpg_dct.h b/ip/xjpg_dct.h +index 7dc90f3..149d66f 100644 +--- a/ip/xjpg_dct.h ++++ b/ip/xjpg_dct.h +@@ -43,8 +43,8 @@ + |____________________________________________________________________________| + */ + +-void dct_forward (register int *block_p); ++void dct_forward (int *block_p); + +-void dct_inverse (register int *block_p); ++void dct_inverse (int *block_p); + + /* End of File */ +diff --git a/prnt/hpcups/Mode9.cpp b/prnt/hpcups/Mode9.cpp +index 94ff571..6cc210a 100644 +--- a/prnt/hpcups/Mode9.cpp ++++ b/prnt/hpcups/Mode9.cpp +@@ -203,7 +203,7 @@ bool Mode9::Process(RASTERDATA* input) + unsigned int offset,byte_count,rem_count; + Mode9_comtype command; + char* dest= (char*) compressBuf; +- register char *dptr=dest; ++ char *dptr=dest; + + while ( size > 0 ) + { +diff --git a/prnt/hpcups/ModeDeltaPlus.cpp b/prnt/hpcups/ModeDeltaPlus.cpp +index 4552f4a..6a5837f 100644 +--- a/prnt/hpcups/ModeDeltaPlus.cpp ++++ b/prnt/hpcups/ModeDeltaPlus.cpp +@@ -241,8 +241,8 @@ bool ModeDeltaPlus::compress (BYTE *outmem, + const uint32_t inheight, + uint32_t horz_ht_dist) + { +- register BYTE *outptr = outmem; +- register uint32_t col; ++ BYTE *outptr = outmem; ++ uint32_t col; + const BYTE *seedrow; + uint32_t seedrow_count = 0; + uint32_t location = 0; +diff --git a/prnt/hpcups/jccolor.c b/prnt/hpcups/jccolor.c +index 7cc8906..6794575 100644 +--- a/prnt/hpcups/jccolor.c ++++ b/prnt/hpcups/jccolor.c +@@ -73,7 +73,7 @@ typedef my_color_converter * my_cconvert_ptr; + + /* We allocate one big table and divide it up into eight parts, instead of + * doing eight alloc_small requests. This lets us use a single table base +- * address, which can be held in a register in the inner loops on many ++ * address, which can be held in a in the inner loops on many + * machines (more than can hold all eight addresses, anyway). + */ + +@@ -205,11 +205,11 @@ rgb_ycc_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows) + { + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; +- register int r, g, b; +- register INT32 * ctab = cconvert->rgb_ycc_tab; +- register JSAMPROW inptr; +- register JSAMPROW outptr0, outptr1, outptr2; +- register JDIMENSION col; ++ int r, g, b; ++ INT32 * ctab = cconvert->rgb_ycc_tab; ++ JSAMPROW inptr; ++ JSAMPROW outptr0, outptr1, outptr2; ++ JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { +@@ -261,11 +261,11 @@ rgb_gray_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows) + { + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; +- register int r, g, b; +- register INT32 * ctab = cconvert->rgb_ycc_tab; +- register JSAMPROW inptr; +- register JSAMPROW outptr; +- register JDIMENSION col; ++ int r, g, b; ++ INT32 * ctab = cconvert->rgb_ycc_tab; ++ JSAMPROW inptr; ++ JSAMPROW outptr; ++ JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { +@@ -300,11 +300,11 @@ cmyk_ycck_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows) + { + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; +- register int r, g, b; +- register INT32 * ctab = cconvert->rgb_ycc_tab; +- register JSAMPROW inptr; +- register JSAMPROW outptr0, outptr1, outptr2, outptr3; +- register JDIMENSION col; ++ int r, g, b; ++ INT32 * ctab = cconvert->rgb_ycc_tab; ++ JSAMPROW inptr; ++ JSAMPROW outptr0, outptr1, outptr2, outptr3; ++ JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { +@@ -354,9 +354,9 @@ grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) + { +- register JSAMPROW inptr; +- register JSAMPROW outptr; +- register JDIMENSION col; ++ JSAMPROW inptr; ++ JSAMPROW outptr; ++ JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + int instride = cinfo->input_components; + +@@ -383,10 +383,10 @@ null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) + { +- register JSAMPROW inptr; +- register JSAMPROW outptr; +- register JDIMENSION col; +- register int ci; ++ JSAMPROW inptr; ++ JSAMPROW outptr; ++ JDIMENSION col; ++ int ci; + int nc = cinfo->num_components; + JDIMENSION num_cols = cinfo->image_width; + +diff --git a/prnt/hpijs/compression.cpp b/prnt/hpijs/compression.cpp +index fcac793..10194ca 100644 +--- a/prnt/hpijs/compression.cpp ++++ b/prnt/hpijs/compression.cpp +@@ -266,7 +266,7 @@ BOOL Mode9::Process(RASTERDATA* input) + unsigned int offset,byte_count,rem_count; + Mode9_comtype command; + char* dest= (char*) compressBuf; +- register char *dptr=dest; ++ char *dptr=dest; + + while ( size > 0 ) + { +diff --git a/prnt/hpijs/jccolor.c b/prnt/hpijs/jccolor.c +index a6b2333..8486b65 100644 +--- a/prnt/hpijs/jccolor.c ++++ b/prnt/hpijs/jccolor.c +@@ -206,11 +206,11 @@ rgb_ycc_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows)
+ {
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+- register int r, g, b;
+- register INT32 * ctab = cconvert->rgb_ycc_tab;
+- register JSAMPROW inptr;
+- register JSAMPROW outptr0, outptr1, outptr2;
+- register JDIMENSION col;
++ int r, g, b;
++ INT32 * ctab = cconvert->rgb_ycc_tab;
++ JSAMPROW inptr;
++ JSAMPROW outptr0, outptr1, outptr2;
++ JDIMENSION col;
+ JDIMENSION num_cols = cinfo->image_width;
+
+ while (--num_rows >= 0) {
+@@ -262,11 +262,11 @@ rgb_gray_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows)
+ {
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+- register int r, g, b;
+- register INT32 * ctab = cconvert->rgb_ycc_tab;
+- register JSAMPROW inptr;
+- register JSAMPROW outptr;
+- register JDIMENSION col;
++ int r, g, b;
++ INT32 * ctab = cconvert->rgb_ycc_tab;
++ JSAMPROW inptr;
++ JSAMPROW outptr;
++ JDIMENSION col;
+ JDIMENSION num_cols = cinfo->image_width;
+
+ while (--num_rows >= 0) {
+@@ -301,11 +301,11 @@ cmyk_ycck_convert (j_compress_ptr cinfo, + JDIMENSION output_row, int num_rows)
+ {
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+- register int r, g, b;
+- register INT32 * ctab = cconvert->rgb_ycc_tab;
+- register JSAMPROW inptr;
+- register JSAMPROW outptr0, outptr1, outptr2, outptr3;
+- register JDIMENSION col;
++ int r, g, b;
++ INT32 * ctab = cconvert->rgb_ycc_tab;
++ JSAMPROW inptr;
++ JSAMPROW outptr0, outptr1, outptr2, outptr3;
++ JDIMENSION col;
+ JDIMENSION num_cols = cinfo->image_width;
+
+ while (--num_rows >= 0) {
+@@ -355,9 +355,9 @@ grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows)
+ {
+- register JSAMPROW inptr;
+- register JSAMPROW outptr;
+- register JDIMENSION col;
++ JSAMPROW inptr;
++ JSAMPROW outptr;
++ JDIMENSION col;
+ JDIMENSION num_cols = cinfo->image_width;
+ int instride = cinfo->input_components;
+
+@@ -384,10 +384,10 @@ null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows)
+ {
+- register JSAMPROW inptr;
+- register JSAMPROW outptr;
+- register JDIMENSION col;
+- register int ci;
++ JSAMPROW inptr;
++ JSAMPROW outptr;
++ JDIMENSION col;
++ int ci;
+ int nc = cinfo->num_components;
+ JDIMENSION num_cols = cinfo->image_width;
+
+diff --git a/prnt/hpijs/ljfastraster.cpp b/prnt/hpijs/ljfastraster.cpp +index 8c7073a..7e82fac 100644 +--- a/prnt/hpijs/ljfastraster.cpp ++++ b/prnt/hpijs/ljfastraster.cpp +@@ -919,8 +919,8 @@ BOOL ModeDeltaPlus::Compress (HPUInt8 *outmem, + const uint32_t inheight, + uint32_t horz_ht_dist) + { +- register HPUInt8 *outptr = outmem; +- register uint32_t col; ++ HPUInt8 *outptr = outmem; ++ uint32_t col; + const HPUInt8 *seedrow; + uint32_t seedrow_count = 0; + uint32_t location = 0; +diff --git a/prnt/hpps/psutil.c b/prnt/hpps/psutil.c +index 7282dc2..87fba4f 100644 +--- a/prnt/hpps/psutil.c ++++ b/prnt/hpps/psutil.c +@@ -148,9 +148,9 @@ static int fcopy(long upto) + /* build array of pointers to start/end of pages */ + void scanpages(void) + { +- register char *comment = buffer+2; +- register int nesting = 0; +- register long int record; ++ char *comment = buffer+2; ++ int nesting = 0; ++ long int record; + + if ((pageptr = (long *)malloc(sizeof(long)*maxpages)) == NULL) + message(FATAL, "out of memory\n"); +-- +2.39.1 + diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch new file mode 100644 index 0000000000..d45db1b2e3 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch @@ -0,0 +1,40 @@ +From 5cfe30829174a18ec64e53c84292a0229ffa5602 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + <zboszor@gmail.com> +Date: Thu, 30 Mar 2023 11:31:27 +0200 +Subject: [PATCH] Fix installing ipp-usb quirk +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use $(DESTDIR) as installation prefix for +/usr/share/usb-ipp/quirk/HPLIP.conf. + +Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> +--- +Upstream-Status: Pending + + Makefile.am | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index e10364d..f520225 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -703,10 +703,9 @@ if !DISBALE_IMAGEPROCESSOR_BUILD + ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ + fi + endif #DISABLE_IMAGEPROCESSOR +- if [ -d "/usr/share/ipp-usb/quirks/" ]; then \ +- echo "ipp-usb directory exists"; \ +- cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \ +- fi ++ install -d -m0755 $(DESTDIR)/usr/share/ipp-usb/quirks ; \ ++ echo "ipp-usb directory exists"; \ ++ cp prnt/ipp-usb/HPLIP.conf $(DESTDIR)/usr/share/ipp-usb/quirks/ + if !HPLIP_CLASS_DRIVER + # If scanner build, add hpaio entry to sane dll.conf. + if [ "$(scan_build)" = "yes" ]; then \ +-- +2.39.2 + 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 @@ +From 20984c73bea8c3df00f297176edd4f6d47c31b55 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 17:49:20 -0700 +Subject: [PATCH 1/4] common/utils: Include string.h for strcasestr + +Also define _GNU_SOURCE for the same + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + common/utils.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/common/utils.c ++++ b/common/utils.c +@@ -1,9 +1,11 @@ ++#define _GNU_SOURCE + #include "utils.h" + #include "string.h" + #include <dlfcn.h> + #include <sys/stat.h> + #include <errno.h> + #include <stdlib.h> ++#include <string.h> /* strcasestr */ + + extern int errno; + +--- a/protocol/hp_ipp.c ++++ b/protocol/hp_ipp.c +@@ -18,12 +18,13 @@ Boston, MA 02110-1301, USA. + + \******************************************************************************/ + +- ++#define _GNU_SOURCE + #include <cups/cups.h> + #include <cups/language.h> + #include <cups/ppd.h> + #include <syslog.h> + #include <stdarg.h> ++#include <string.h> /* strcasecmp */ + #include <sys/types.h> + #include <pwd.h> + #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..fa973a8d85 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch @@ -0,0 +1,48 @@ +From 3d53d02af7c45763eb33f7bbe5f9e389fbcb7e21 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 17:55:48 -0700 +Subject: [PATCH 2/4] Add ImageProcessor only when DISBALE_IMAGEPROCESSOR_BUILD + is not set + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 5f75759..73421b1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -597,7 +597,11 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp + prnt/hpcups/ImageProcessor.h + + hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) ++if !DISBALE_IMAGEPROCESSOR_BUILD ++hpcups_LDADD += "-lImageProcessor" ++endif #DISABLE_IMAGEPROCESSOR ++ + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +@@ -687,6 +692,7 @@ + + install-data-hook: + if HPLIP_BUILD ++if !DISBALE_IMAGEPROCESSOR_BUILD + if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ + cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ + chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +@@ -697,6 +703,7 @@ + chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ + ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ + fi ++endif #DISABLE_IMAGEPROCESSOR + if [ -d "/usr/share/ipp-usb/quirks/" ]; then \ + echo "ipp-usb directory exists"; \ + cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \ +-- +2.37.3 + 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..bf93c222ea --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0003-pserror.c-Define-column-to-be-int-explcitly.patch @@ -0,0 +1,23 @@ +From a27d6264671e7201b5d78bcc9200e7d946429979 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 17:57:53 -0700 +Subject: [PATCH 3/4] pserror.c: Define column to be int explcitly + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + prnt/hpps/pserror.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/prnt/hpps/pserror.c ++++ b/prnt/hpps/pserror.c +@@ -24,7 +24,7 @@ extern char *program ; /* Defined by mai + 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 */ + 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..7223bf939e --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0004-Define-missing-prototype-for-functions.patch @@ -0,0 +1,55 @@ +From 33454817880fa57b2226dd40b724e5c3d6074aca Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 17:58:33 -0700 +Subject: [PATCH 4/4] Define missing prototype for functions + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + prnt/cupsext/cupsext.c | 1 + + protocol/hp_ipp.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/prnt/cupsext/cupsext.c ++++ b/prnt/cupsext/cupsext.c +@@ -101,6 +101,11 @@ typedef int Py_ssize_t; + #define _STRINGIZE(x) #x + #define STRINGIZE(x) _STRINGIZE(x) + ++void _releaseCupsInstance(void); ++int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info); ++int setDefaultCupsPrinter(char *pr_name); ++int delCupsPrinter(char *pr_name); ++int controlCupsPrinter(char *pr_name, int op); + + //static http_t * http = NULL; /* HTTP object */ + +--- a/protocol/hp_ipp.c ++++ b/protocol/hp_ipp.c +@@ -22,6 +22,7 @@ Boston, MA 02110-1301, USA. + #include <cups/cups.h> + #include <cups/language.h> + #include <cups/ppd.h> ++#include <stdio.h> + #include <syslog.h> + #include <stdarg.h> + #include <string.h> /* strcasecmp */ +@@ -42,7 +43,7 @@ Boston, MA 02110-1301, USA. + #define STRINGIZE(x) _STRINGIZE(x) + + +-http_t* acquireCupsInstance() ++http_t* acquireCupsInstance(void) + { + if ( http == NULL) + { +@@ -53,7 +54,7 @@ http_t* acquireCupsInstance() + } + + +-void _releaseCupsInstance() ++void _releaseCupsInstance(void) + { + if (http) + { 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..ac0ff81e6f --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch @@ -0,0 +1,64 @@ +From 4b3014df3990d90d6929510f2bde073171503329 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 18:18:44 -0700 +Subject: [PATCH] hp_ipp.c: Add printf format to snprintf calls + +Avoid -Wformat warnings + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + protocol/hp_ipp.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c +index 597d9b9..a027baf 100644 +--- a/protocol/hp_ipp.c ++++ b/protocol/hp_ipp.c +@@ -112,7 +112,7 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, + } + + if ( info == NULL ) +- snprintf( info,sizeof(info), name ); ++ snprintf( info,sizeof(info), "%s", name ); + + sprintf( printer_uri, "ipp://localhost/printers/%s", name ); + +@@ -513,27 +513,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list) + + if ( strcmp(attr_name, "printer-name") == 0 && + val_tag == IPP_TAG_NAME ) { +- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "device-uri") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-uri-supported") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-info") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->info,sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-location") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->location,sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-make-and-model") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->make_model,sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-state") == 0 && + val_tag == IPP_TAG_ENUM ) { +-- +2.37.3 + 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..194deb8b81 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0006-Workaround-patch-for-missing-Python3-transition-of-t.patch @@ -0,0 +1,132 @@ +From: Till Kamppeter <till.kamppeter@gmail.com> +Date: Fri, 22 Jul 2016 09:33:04 +0200 +Subject: Workaround patch for missing Python3 transition of the old + (pre-USB-storage) photo memory card support (pcardext) as this part builds + in Python3 environments but with pointer-related warnings which are fatal + errors for Ubuntu's build servers. The patch silences the warnings but the + memory card support is dropped in Python3 environments. This patch is + supplied by the HPLIP upstream developers and will be replaced by a more + proper solution in the next upstream release of HPLIP (see LP: #1275353) + +--- +Upstream-Status: Pending + + pcard/pcardext/pcardext.c | 59 +++++++++++++++++++++++++++++++++++++---------- + pcard/photocard.py | 2 +- + unload.py | 5 ++++ + 3 files changed, 53 insertions(+), 13 deletions(-) + +--- a/pcard/pcardext/pcardext.c ++++ b/pcard/pcardext/pcardext.c +@@ -20,7 +20,7 @@ pcardext - Python extension for HP photo + Requires: + Python 2.2+ + +-Author: Don Welch ++Author: Don Welch + + \*****************************************************************************/ + +@@ -41,9 +41,37 @@ typedef int Py_ssize_t; + + int verbose=0; + ++#if PY_MAJOR_VERSION >= 3 ++ #define MOD_ERROR_VAL NULL ++ #define MOD_SUCCESS_VAL(val) val ++ #define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void) ++ #define PyInt_AS_LONG PyLong_AS_LONG ++ #define MOD_DEF(ob, name, doc, methods) \ ++ static struct PyModuleDef moduledef = { \ ++ PyModuleDef_HEAD_INIT, name, doc, -1, methods, }; \ ++ ob = PyModule_Create(&moduledef); ++ ++ ++ #define PY_String_Bytes PyBytes_FromStringAndSize ++ #define PY_AsString_Bytes PyBytes_AsStringAndSize ++ ++#else ++ #define MOD_ERROR_VAL ++ #define MOD_SUCCESS_VAL(val) ++ #define MOD_INIT(name) void init##name(void) ++ #define MOD_DEF(ob, name, doc, methods) \ ++ ob = Py_InitModule3(name, methods, doc); ++ ++ #define PY_String_Bytes PyString_FromStringAndSize ++ #define PY_AsString_Bytes PyString_AsStringAndSize ++ ++#endif ++ + PyObject * readsectorFunc = NULL; + PyObject * writesectorFunc = NULL; + ++ ++ + int ReadSector(int sector, int nsector, void *buf, int size) + { + PyObject * result; +@@ -59,9 +87,13 @@ int ReadSector(int sector, int nsector, + if( result ) + { + Py_ssize_t len = 0; +- PyString_AsStringAndSize( result, &result_str, &len ); ++ ++ //PyString_AsStringAndSize( result, &result_str, &len ); ++ //PyBytes_AsStringAndSize( result, &result_str, &len ); ++ PY_AsString_Bytes( result, &result_str, &len ); + +- if( len < nsector*FAT_HARDSECT ) ++ ++ if( len < nsector*FAT_HARDSECT ) + { + goto abort; + } +@@ -208,7 +240,9 @@ PyObject * pcardext_read( PyObject * sel + + if( FatReadFileExt( name, offset, len, buffer ) == len ) + { +- return PyString_FromStringAndSize( (char *)buffer, len ); ++ // return PyString_FromStringAndSize( (char *)buffer, len ); ++ return PY_String_Bytes( (char *)buffer, len ); ++ // return PyBytes_FromStringAndSize( (char *)buffer, len ); + } + else + { +@@ -236,14 +270,15 @@ static PyMethodDef pcardext_methods[] = + + static char pcardext_documentation[] = "Python extension for HP photocard services"; + +-void initpcardext( void ) +-{ +- PyObject * mod = Py_InitModule4( "pcardext", pcardext_methods, +- pcardext_documentation, (PyObject*)NULL, +- PYTHON_API_VERSION ); +- +- if (mod == NULL) +- return; ++MOD_INIT(pcardext) { ++ ++ PyObject* mod ; ++ MOD_DEF(mod, "pcardext", pcardext_documentation, pcardext_methods); ++ if (mod == NULL) ++ return MOD_ERROR_VAL; ++ ++ return MOD_SUCCESS_VAL(mod); ++ + } + + +--- a/unload.py ++++ b/unload.py +@@ -44,6 +44,11 @@ except ImportError: + + # Local + from base.g import * ++from base.sixext import PY3 ++if PY3: ++ log.error("This functionality is not spported in python3 environment.") ++ sys.exit(1) ++ + from base import device, utils, tui, module + from prnt import cups + diff --git a/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch b/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch index 2babb2b67a..e8ca8b2d6c 100644 --- a/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch +++ b/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + https://bugs.launchpad.net/hplip/+bug/1672256 memcpy should never be used with overlapping memory regions diff --git a/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch index e020bd4642..93fdcf4bfd 100644 --- a/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch +++ b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h index 6605dd9..55c7110 100644 --- a/scan/sane/OrbliteScan/LinuxCommon.h diff --git a/meta-oe/recipes-extended/hplip/hplip/600-fix.patch b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch index 91a5035ae9..cddc5e0065 100644 --- a/meta-oe/recipes-extended/hplip/hplip/600-fix.patch +++ b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/configure.in +++ b/configure.in @@ -254,7 +254,6 @@ if test "$class_driver" = "yes"; then 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 @@ -# ../bin/ld: cannot find -lImageProcessor ---- a/Makefile.am -+++ b/Makefile.am -@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte - prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ - prnt/hpcups/genPCLm.h \ - common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ -- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ -- prnt/hpcups/ImageProcessor.h -+ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp - - hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) --hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) -+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) - #else - #hpcupsdir = $(cupsfilterdir) - #hpcups_PROGRAMS = hpcups ---- a/prnt/hpcups/HPCupsFilter.cpp -+++ b/prnt/hpcups/HPCupsFilter.cpp -@@ -637,16 +637,10 @@ int HPCupsFilter::processRasterData(cups - - - sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); -- image_processor_t* imageProcessor = imageProcessorCreate(); - - while (cupsRasterReadHeader2(cups_raster, &cups_header)) - { - -- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); -- } -- - current_page_number++; - - if (current_page_number == 1) { -@@ -745,11 +739,6 @@ int HPCupsFilter::processRasterData(cups - color_raster = rgbRaster; - black_raster = kRaster; - -- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); -- } -- - - if ((y == 0) && !is_ljmono) { - //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer -@@ -780,11 +769,6 @@ int HPCupsFilter::processRasterData(cups - } - } // for() loop end - -- result = imageProcessorEndPage(imageProcessor); -- if (result != IPE_SUCCESS){ -- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); -- } -- - - m_Job.NewPage(); - if (err != NO_ERROR) { -@@ -800,8 +784,6 @@ int HPCupsFilter::processRasterData(cups - rgbRaster = NULL; - } - -- imageProcessorDestroy(imageProcessor); -- - unlink(hpPreProcessedRasterFile); - return ret_status; - } diff --git a/meta-oe/recipes-extended/hplip/hplip/configure.patch b/meta-oe/recipes-extended/hplip/hplip/configure.patch index 8fe77c5edf..0e0fd47fa1 100644 --- a/meta-oe/recipes-extended/hplip/hplip/configure.patch +++ b/meta-oe/recipes-extended/hplip/hplip/configure.patch @@ -1,10 +1,11 @@ +Upstream-Status: Pending + --- a/configure.in +++ b/configure.in -@@ -27,8 +27,7 @@ +@@ -30,7 +30,7 @@ + AC_INIT([HP Linux Imaging and Printing], [3.22.10], [3.22.10], [hplip]) - #AC_PREREQ(2.59) - AC_INIT([HP Linux Imaging and Printing], [3.19.12], [3.19.12], [hplip]) --#AM_INIT_AUTOMAKE([1.9 foreign]) + #AM_INIT_AUTOMAKE([1.9 foreign]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([foreign]) AC_DISABLE_STATIC diff --git a/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch index 6aa1de0a8a..f2cd2be60d 100644 --- a/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch +++ b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch @@ -1,33 +1,69 @@ -Upstream-Status: Inappropriate [configuration] +Don't hardcode paths to libusb, instead use pkg-config. ---- a/configure.in -+++ b/configure.in -@@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test " - AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) - else - AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) -+ LIBUSBINCLUDEROOT?="/usr/include/" -+ AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder]) - AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) - fi - fi +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/Makefile.am b/Makefile.am +index b77327f..29e838a 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib - libhpmud_la_LDFLAGS += -lusb +@@ -107,12 +107,11 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/ + + if LIBUSB01_BUILD + libhpmud_la_SOURCES += io/hpmud/musb_libusb01.c +-libhpmud_la_LDFLAGS += -lusb else libhpmud_la_SOURCES += io/hpmud/musb.c -libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0 -+libhpmud_la_CFLAGS += -I$(LIBUSBINCLUDEROOT)/libusb-1.0 - libhpmud_la_LDFLAGS += -lusb-1.0 +-libhpmud_la_LDFLAGS += -lusb-1.0 endif ++libhpmud_la_CFLAGS += $(USB_CFLAGS) ++libhpmud_la_LDFLAGS += $(USB_LIBS) + + + if NETWORK_BUILD +@@ -356,7 +355,7 @@ hpmudextdir = $(pyexecdir) + hpmudext_LTLIBRARIES = hpmudext.la + hpmudext_la_LDFLAGS = -module -avoid-version + hpmudext_la_SOURCES = io/mudext/hpmudext.c +-hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) ++hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) $(USB_CFLAGS) + hpmudext_la_LIBADD = libhpmud.la -@@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove + if NETWORK_BUILD +@@ -364,9 +363,6 @@ hpmudext_la_LIBADD += libhpdiscovery.la + hpmudext_la_CFLAGS += -Iprotocol/discovery endif - if !LIBUSB01_BUILD +-if !LIBUSB01_BUILD -hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 -+hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0 - endif +-endif endif #!HPLIP_CLASS_DRIVER # ui (qt3) + if GUI_BUILD +diff --git a/configure.in b/configure.in +index b1c690c..4a65c97 100644 +--- a/configure.in ++++ b/configure.in +@@ -36,6 +36,7 @@ AC_PROG_CXX + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LIBTOOL ++PKG_PROG_PKG_CONFIG + + # Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile. + AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)]) +@@ -620,11 +621,9 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu + AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)]) + AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)]) + if test "$libusb01_build" = "yes"; then +- AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)]) +- AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) ++ PKG_CHECK_MODULES([USB], [libusb]) + else +- AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) +- AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) ++ PKG_CHECK_MODULES([USB], [libusb-1.0]) + fi + fi + diff --git a/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch b/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch index 67546b07dc..45b25c5e76 100644 --- a/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch +++ b/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch @@ -4,6 +4,8 @@ Date: Wed, 14 Aug 2019 15:47:38 -0700 Subject: [PATCH] Fixing invalid return in void function --- +Upstream-Status: Pending + prnt/hpps/hppsfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb index 457a974534..c54b2e0d88 100644 --- a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb +++ b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb @@ -1,22 +1,29 @@ SUMMARY = "HP Linux Imaging and Printing" -LICENSE="GPLv2" +LICENSE="GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://configure.patch \ file://fix-libusb-paths.patch \ - file://999-remove-lImageProcessor.patch \ file://600-fix.patch \ file://030-replace_unsafe_memcpy_with_memmove.patch \ file://050-fix-glibcisms.patch \ file://hplip-3.19.6-fix-return.patch \ -" -SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3" -SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255" + file://0001-common-utils-Include-string.h-for-strcasestr.patch \ + file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \ + file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \ + file://0004-Define-missing-prototype-for-functions.patch \ + file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ + file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ + file://0001-Fix-installing-ipp-usb-quirk.patch \ + file://0001-Drop-using-register-storage-classifier.patch" +SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/p/hplip/activity" -DEPENDS += "cups python3 libusb" +DEPENDS += "cups python3 libusb1 python3-setuptools-native" -inherit autotools-brokensep python3-dir python3native pkgconfig systemd +inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd export STAGING_INCDIR export STAGING_LIBDIR @@ -24,7 +31,7 @@ export STAGING_LIBDIR CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" EXTRA_OECONF += "\ - LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ + --enable-cups-drv-install \ --enable-cups-ppd-install \ --disable-network-build \ --disable-doc-build \ @@ -39,13 +46,14 @@ EXTRA_OECONF += "\ --enable-foomatic-drv-install \ --disable-foomatic-ppd-install \ --disable-foomatic-rip-hplip-install \ + --disable-imageProcessor_build \ --with-cupsbackenddir=${libexecdir}/cups/backend \ --with-cupsfilterdir=${libexecdir}/cups/filter \ " -EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" +EXTRA_OEMAKE = "CPPFLAGS='${CFLAGS}' rulessystemdir=${systemd_unitdir}/system/" -do_install_append() { +do_install:append() { rm -rf ${D}${datadir}/hplip/upgrade.py rm -rf ${D}${datadir}/hplip/uninstall.py sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py @@ -54,7 +62,7 @@ do_install_append() { PACKAGE_BEFORE_PN += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ python3\ python3-syslog \ python3-pprint \ @@ -66,23 +74,18 @@ RDEPENDS_${PN} += " \ python3-resource \ python3-terminal \ " -RDEPENDS_${PN}-filter += "perl" - -# need to snag the debug file or OE will fail on backend package -FILES_${PN}-dbg += "\ - ${libexecdir}/cups/backend/.debug \ - ${PYTHON_SITEPACKAGES_DIR}/.debug \ - ${libexecdir}/cups/filter/.debug " +RDEPENDS:${PN}-filter += "perl ghostscript" -FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" -FILES_${PN}-ppd = "${datadir}/ppd" -FILES_${PN}-cups = "${datadir}/cups" -FILES_${PN}-backend = "${libexecdir}/cups/backend" -FILES_${PN}-filter = "${libexecdir}/cups/filter" -FILES_${PN}-hal = "${datadir}/hal" +FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf" +FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" +FILES:${PN}-ppd = "${datadir}/ppd" +FILES:${PN}-cups = "${datadir}/cups" +FILES:${PN}-backend = "${libexecdir}/cups/backend" +FILES:${PN}-filter = "${libexecdir}/cups/filter" +FILES:${PN}-hal = "${datadir}/hal" -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" -SYSTEMD_SERVICE_${PN} = "hplip-printer@.service" +SYSTEMD_SERVICE:${PN} = "hplip-printer@.service" CLEANBROKEN = "1" |