diff options
14 files changed, 264 insertions, 573 deletions
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch deleted file mode 100644 index f259b5f05d..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From 7ef9c040dd959105c16d4dc67e14f3bbea25e77f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 16 Dec 2016 19:51:19 +0000 | ||
| 4 | Subject: [PATCH] include cups/ppd.h for missing ppd definitions | ||
| 5 | |||
| 6 | Fixes errors spotted by clang | ||
| 7 | |||
| 8 | | prnt/hpcups/HPCupsFilter.cpp:365:18: error: use of undeclared identifier 'ppdFindAttr' | ||
| 9 | | if (((attr = ppdFindAttr(m_ppd, "hpPrinterLanguage", NULL)) == NULL) || | ||
| 10 | | ^ | ||
| 11 | | prnt/hpcups/HPCupsFilter.cpp:368:13: error: use of undeclared identifier 'ppdClose' | ||
| 12 | | ppdClose(m_ppd); | ||
| 13 | | ^ | ||
| 14 | | prnt/hpcups/HPCupsFilter.cpp:444:9: error: use of undeclared identifier 'ppdClose' | ||
| 15 | | ppdClose(m_ppd); | ||
| 16 | | ^ | ||
| 17 | | prnt/hpcups/HPCupsFilter.cpp:497:13: error: use of undeclared identifier 'ppdOpenFile' | ||
| 18 | | m_ppd = ppdOpenFile(getenv("PPD")); | ||
| 19 | | ^ | ||
| 20 | |||
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 22 | --- | ||
| 23 | Upstream-Status: Pending | ||
| 24 | |||
| 25 | prnt/hpcups/HPCupsFilter.h | 1 + | ||
| 26 | 1 file changed, 1 insertion(+) | ||
| 27 | |||
| 28 | diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h | ||
| 29 | index 0431a7a..eb0cad6 100644 | ||
| 30 | --- a/prnt/hpcups/HPCupsFilter.h | ||
| 31 | +++ b/prnt/hpcups/HPCupsFilter.h | ||
| 32 | @@ -37,6 +37,7 @@ | ||
| 33 | #include "Job.h" | ||
| 34 | |||
| 35 | #include "dbuscomm.h" | ||
| 36 | +#include <cups/ppd.h> | ||
| 37 | |||
| 38 | #define DBITMAPFILEHEADER 14 | ||
| 39 | #define DBITMAPINFOHEADER 40 | ||
| 40 | -- | ||
| 41 | 1.9.1 | ||
| 42 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch deleted file mode 100644 index 31c005c60c..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | Index: hplip-3.12.6/configure.in | ||
| 2 | =================================================================== | ||
| 3 | --- hplip-3.12.6.orig/configure.in 2014-07-16 20:03:51.310044196 +0000 | ||
| 4 | +++ hplip-3.12.6/configure.in 2014-07-18 07:53:31.589559192 +0000 | ||
| 5 | @@ -27,8 +27,7 @@ | ||
| 6 | |||
| 7 | #AC_PREREQ(2.59) | ||
| 8 | AC_INIT([HP Linux Imaging and Printing], [3.12.6], [3.12.6], [hplip]) | ||
| 9 | -#AM_INIT_AUTOMAKE([1.9 foreign]) | ||
| 10 | -AM_INIT_AUTOMAKE | ||
| 11 | +AM_INIT_AUTOMAKE([1.9 foreign]) | ||
| 12 | AC_DISABLE_STATIC | ||
| 13 | |||
| 14 | # Checks for programs. | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch deleted file mode 100644 index 7df01aab33..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch +++ /dev/null | |||
| @@ -1,395 +0,0 @@ | |||
| 1 | Imported from gentoo: | ||
| 2 | https://bugs.gentoo.org/show_bug.cgi?id=428672 | ||
| 3 | |||
| 4 | diff -Naur hplip-3.12.6_old/prnt/cupsext/cupsext.c hplip-3.12.6/prnt/cupsext/cupsext.c | ||
| 5 | --- hplip-3.12.6_old/prnt/cupsext/cupsext.c 2012-08-04 09:18:18.388330038 +0200 | ||
| 6 | +++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-08-04 09:18:27.855181327 +0200 | ||
| 7 | @@ -87,6 +87,46 @@ | ||
| 8 | #define PY_SSIZE_T_MIN INT_MIN | ||
| 9 | #endif | ||
| 10 | |||
| 11 | +#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) | ||
| 12 | +#define HAVE_CUPS_1_6 1 | ||
| 13 | +#endif | ||
| 14 | + | ||
| 15 | +#ifndef HAVE_CUPS_1_6 | ||
| 16 | +#define ippGetCount(attr) attr->num_values | ||
| 17 | +#define ippGetGroupTag(attr) attr->group_tag | ||
| 18 | +#define ippGetValueTag(attr) attr->value_tag | ||
| 19 | +#define ippGetName(attr) attr->name | ||
| 20 | +#define ippGetBoolean(attr, element) attr->values[element].boolean | ||
| 21 | +#define ippGetInteger(attr, element) attr->values[element].integer | ||
| 22 | +#define ippGetStatusCode(ipp) ipp->request.status.status_code | ||
| 23 | +#define ippGetString(attr, element, language) attr->values[element].string.text | ||
| 24 | + | ||
| 25 | +static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) | ||
| 26 | +{ | ||
| 27 | + if (!ipp) | ||
| 28 | + return (NULL); | ||
| 29 | + return (ipp->current = ipp->attrs); | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) | ||
| 33 | +{ | ||
| 34 | + if (!ipp || !ipp->current) | ||
| 35 | + return (NULL); | ||
| 36 | + return (ipp->current = ipp->current->next); | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) | ||
| 40 | +{ | ||
| 41 | + ipp->request.op.operation_id = op; | ||
| 42 | + return (1); | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +static int ippSetRequestId( ipp_t *ipp, int request_id ) | ||
| 46 | +{ | ||
| 47 | + ipp->request.any.request_id = request_id; | ||
| 48 | + return (1); | ||
| 49 | +} | ||
| 50 | +#endif | ||
| 51 | |||
| 52 | int g_num_options = 0; | ||
| 53 | cups_option_t * g_options; | ||
| 54 | @@ -333,8 +373,8 @@ | ||
| 55 | request = ippNew(); | ||
| 56 | language = cupsLangDefault(); | ||
| 57 | |||
| 58 | - request->request.op.operation_id = CUPS_GET_PRINTERS; | ||
| 59 | - request->request.any.request_id = 1; | ||
| 60 | + ippSetOperation( request, CUPS_GET_PRINTERS ); | ||
| 61 | + ippSetRequestId ( request, 1); | ||
| 62 | |||
| 63 | ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, | ||
| 64 | "attributes-charset", NULL, cupsLangEncoding( language ) ); | ||
| 65 | @@ -378,10 +418,10 @@ | ||
| 66 | ipp_pstate_t state; | ||
| 67 | int i = 0; | ||
| 68 | |||
| 69 | - for ( attr = response->attrs; attr != NULL; attr = attr->next ) | ||
| 70 | + for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) ) | ||
| 71 | { | ||
| 72 | - while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER ) | ||
| 73 | - attr = attr->next; | ||
| 74 | + while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER ) | ||
| 75 | + attr = ippNextAttribute( response ); | ||
| 76 | |||
| 77 | if ( attr == NULL ) | ||
| 78 | break; | ||
| 79 | @@ -390,41 +430,41 @@ | ||
| 80 | state = IPP_PRINTER_IDLE; | ||
| 81 | accepting = 0; | ||
| 82 | |||
| 83 | - while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER ) | ||
| 84 | + while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER ) | ||
| 85 | { | ||
| 86 | - if ( strcmp( attr->name, "printer-name" ) == 0 && | ||
| 87 | - attr->value_tag == IPP_TAG_NAME ) | ||
| 88 | - name = attr->values[ 0 ].string.text; | ||
| 89 | - | ||
| 90 | - else if ( strcmp( attr->name, "device-uri" ) == 0 && | ||
| 91 | - attr->value_tag == IPP_TAG_URI ) | ||
| 92 | - device_uri = attr->values[ 0 ].string.text; | ||
| 93 | - | ||
| 94 | - else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 && | ||
| 95 | - attr->value_tag == IPP_TAG_URI ) | ||
| 96 | - printer_uri = attr->values[ 0 ].string.text; | ||
| 97 | - | ||
| 98 | - else if ( strcmp( attr->name, "printer-info" ) == 0 && | ||
| 99 | - attr->value_tag == IPP_TAG_TEXT ) | ||
| 100 | - info = attr->values[ 0 ].string.text; | ||
| 101 | - | ||
| 102 | - else if ( strcmp( attr->name, "printer-location" ) == 0 && | ||
| 103 | - attr->value_tag == IPP_TAG_TEXT ) | ||
| 104 | - location = attr->values[ 0 ].string.text; | ||
| 105 | - | ||
| 106 | - else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 && | ||
| 107 | - attr->value_tag == IPP_TAG_TEXT ) | ||
| 108 | - make_model = attr->values[ 0 ].string.text; | ||
| 109 | - | ||
| 110 | - else if ( strcmp( attr->name, "printer-state" ) == 0 && | ||
| 111 | - attr->value_tag == IPP_TAG_ENUM ) | ||
| 112 | - state = ( ipp_pstate_t ) attr->values[ 0 ].integer; | ||
| 113 | - | ||
| 114 | - else if (!strcmp(attr->name, "printer-is-accepting-jobs") && | ||
| 115 | - attr->value_tag == IPP_TAG_BOOLEAN) | ||
| 116 | - accepting = attr->values[ 0 ].boolean; | ||
| 117 | + if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 && | ||
| 118 | + ippGetValueTag( attr ) == IPP_TAG_NAME ) | ||
| 119 | + name = ippGetString( attr, 0, NULL ); | ||
| 120 | + | ||
| 121 | + else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 && | ||
| 122 | + ippGetValueTag( attr ) == IPP_TAG_URI ) | ||
| 123 | + device_uri = ippGetString( attr, 0, NULL ); | ||
| 124 | + | ||
| 125 | + else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 && | ||
| 126 | + ippGetValueTag( attr ) == IPP_TAG_URI ) | ||
| 127 | + printer_uri = ippGetString( attr, 0, NULL ); | ||
| 128 | + | ||
| 129 | + else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 && | ||
| 130 | + ippGetValueTag( attr ) == IPP_TAG_TEXT ) | ||
| 131 | + info = ippGetString( attr, 0, NULL ); | ||
| 132 | + | ||
| 133 | + else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 && | ||
| 134 | + ippGetValueTag( attr ) == IPP_TAG_TEXT ) | ||
| 135 | + location = ippGetString( attr, 0, NULL ); | ||
| 136 | + | ||
| 137 | + else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 && | ||
| 138 | + ippGetValueTag( attr ) == IPP_TAG_TEXT ) | ||
| 139 | + make_model = ippGetString( attr, 0, NULL ); | ||
| 140 | + | ||
| 141 | + else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 && | ||
| 142 | + ippGetValueTag( attr ) == IPP_TAG_ENUM ) | ||
| 143 | + state = ( ipp_pstate_t ) ippGetInteger( attr, 0 ); | ||
| 144 | + | ||
| 145 | + else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") && | ||
| 146 | + ippGetValueTag( attr ) == IPP_TAG_BOOLEAN) | ||
| 147 | + accepting = ippGetBoolean( attr, 0 ); | ||
| 148 | |||
| 149 | - attr = attr->next; | ||
| 150 | + attr = ippNextAttribute( response ); | ||
| 151 | } | ||
| 152 | |||
| 153 | if ( device_uri == NULL ) | ||
| 154 | @@ -522,8 +562,8 @@ | ||
| 155 | request = ippNew(); | ||
| 156 | language = cupsLangDefault(); | ||
| 157 | |||
| 158 | - request->request.op.operation_id = CUPS_ADD_PRINTER; | ||
| 159 | - request->request.any.request_id = 1; | ||
| 160 | + ippSetOperation( request, CUPS_ADD_PRINTER ); | ||
| 161 | + ippSetRequestId ( request, 1 ); | ||
| 162 | |||
| 163 | ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, | ||
| 164 | "attributes-charset", NULL, cupsLangEncoding( language ) ); | ||
| 165 | @@ -568,7 +608,7 @@ | ||
| 166 | } | ||
| 167 | else | ||
| 168 | { | ||
| 169 | - status = response->request.status.status_code; | ||
| 170 | + status = ippGetStatusCode( response ); | ||
| 171 | //ippDelete( response ); | ||
| 172 | r = 1; | ||
| 173 | } | ||
| 174 | @@ -631,8 +671,8 @@ | ||
| 175 | */ | ||
| 176 | request = ippNew(); | ||
| 177 | |||
| 178 | - request->request.op.operation_id = CUPS_DELETE_PRINTER; | ||
| 179 | - request->request.op.request_id = 1; | ||
| 180 | + ippSetOperation( request, CUPS_DELETE_PRINTER ); | ||
| 181 | + ippSetRequestId ( request, 1 ); | ||
| 182 | |||
| 183 | language = cupsLangDefault(); | ||
| 184 | |||
| 185 | @@ -650,7 +690,7 @@ | ||
| 186 | */ | ||
| 187 | response = cupsDoRequest( http, request, "/admin/" ); | ||
| 188 | |||
| 189 | - if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) ) | ||
| 190 | + if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) ) | ||
| 191 | { | ||
| 192 | r = 1; | ||
| 193 | } | ||
| 194 | @@ -721,8 +761,8 @@ | ||
| 195 | |||
| 196 | request = ippNew(); | ||
| 197 | |||
| 198 | - request->request.op.operation_id = CUPS_SET_DEFAULT; | ||
| 199 | - request->request.op.request_id = 1; | ||
| 200 | + ippSetOperation( request, CUPS_SET_DEFAULT ); | ||
| 201 | + ippSetRequestId ( request, 1 ); | ||
| 202 | |||
| 203 | language = cupsLangDefault(); | ||
| 204 | |||
| 205 | @@ -743,7 +783,7 @@ | ||
| 206 | |||
| 207 | response = cupsDoRequest( http, request, "/admin/" ); | ||
| 208 | |||
| 209 | - if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) ) | ||
| 210 | + if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) ) | ||
| 211 | { | ||
| 212 | r = 1; | ||
| 213 | } | ||
| 214 | @@ -797,8 +837,8 @@ | ||
| 215 | |||
| 216 | request = ippNew(); | ||
| 217 | |||
| 218 | - request->request.op.operation_id = op; | ||
| 219 | - request->request.op.request_id = 1; | ||
| 220 | + ippSetOperation( request, op ); | ||
| 221 | + ippSetRequestId ( request, 1 ); | ||
| 222 | |||
| 223 | language = cupsLangDefault(); | ||
| 224 | |||
| 225 | @@ -822,7 +862,7 @@ | ||
| 226 | |||
| 227 | response = cupsDoRequest(http, request, "/admin/"); | ||
| 228 | |||
| 229 | - if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT)) | ||
| 230 | + if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT)) | ||
| 231 | { | ||
| 232 | r = 1; | ||
| 233 | } | ||
| 234 | @@ -837,7 +877,7 @@ | ||
| 235 | if ( response != NULL ) | ||
| 236 | ippDelete( response ); | ||
| 237 | |||
| 238 | - return Py_BuildValue( "i", r );; | ||
| 239 | + return Py_BuildValue( "i", r ); | ||
| 240 | } | ||
| 241 | |||
| 242 | |||
| 243 | @@ -1116,8 +1156,8 @@ | ||
| 244 | |||
| 245 | request = ippNew(); | ||
| 246 | |||
| 247 | - request->request.op.operation_id = CUPS_GET_PPDS; | ||
| 248 | - request->request.op.request_id = 1; | ||
| 249 | + ippSetOperation( request, CUPS_GET_PPDS ); | ||
| 250 | + ippSetRequestId ( request, 1 ); | ||
| 251 | |||
| 252 | language = cupsLangDefault(); | ||
| 253 | |||
| 254 | @@ -1143,43 +1183,43 @@ | ||
| 255 | if ((response = cupsDoRequest(http, request, "/")) != NULL) | ||
| 256 | { | ||
| 257 | |||
| 258 | - for (attr = response->attrs; attr; attr = attr->next) | ||
| 259 | + for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response )) | ||
| 260 | { | ||
| 261 | PyObject *dict; | ||
| 262 | char *ppdname = NULL; | ||
| 263 | |||
| 264 | - while (attr && attr->group_tag != IPP_TAG_PRINTER) | ||
| 265 | - attr = attr->next; | ||
| 266 | + while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) | ||
| 267 | + attr = ippNextAttribute( response ); | ||
| 268 | |||
| 269 | if (!attr) | ||
| 270 | break; | ||
| 271 | |||
| 272 | dict = PyDict_New (); | ||
| 273 | |||
| 274 | - for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next) | ||
| 275 | + for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response )) | ||
| 276 | { | ||
| 277 | PyObject *val = NULL; | ||
| 278 | |||
| 279 | - if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME) | ||
| 280 | + if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME) | ||
| 281 | { | ||
| 282 | - ppdname = attr->values[0].string.text; | ||
| 283 | + ppdname = ippGetString( attr, 0, NULL ); | ||
| 284 | |||
| 285 | //sprintf( buf, "print '%s'", ppdname); | ||
| 286 | //PyRun_SimpleString( buf ); | ||
| 287 | } | ||
| 288 | |||
| 289 | - else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD) | ||
| 290 | - //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) || | ||
| 291 | - // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) || | ||
| 292 | - // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) || | ||
| 293 | - // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT)) | ||
| 294 | + else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD) | ||
| 295 | + //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) || | ||
| 296 | + // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) || | ||
| 297 | + // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) || | ||
| 298 | + // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT)) | ||
| 299 | { | ||
| 300 | - val = PyObj_from_UTF8(attr->values[0].string.text); | ||
| 301 | + val = PyObj_from_UTF8(ippGetString( attr, 0, NULL )); | ||
| 302 | } | ||
| 303 | |||
| 304 | if (val) | ||
| 305 | { | ||
| 306 | - PyDict_SetItemString (dict, attr->name, val); | ||
| 307 | + PyDict_SetItemString (dict, ippGetName( attr ), val); | ||
| 308 | Py_DECREF (val); | ||
| 309 | } | ||
| 310 | } | ||
| 311 | diff -Naur hplip-3.12.6_old/scan/sane/hpaio.c hplip-3.12.6/scan/sane/hpaio.c | ||
| 312 | --- hplip-3.12.6_old/scan/sane/hpaio.c 2012-08-04 09:18:21.458389913 +0200 | ||
| 313 | +++ hplip-3.12.6/scan/sane/hpaio.c 2012-08-04 09:18:27.875181720 +0200 | ||
| 314 | @@ -47,6 +47,43 @@ | ||
| 315 | #define DEBUG_DECLARE_ONLY | ||
| 316 | #include "sanei_debug.h" | ||
| 317 | |||
| 318 | +#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) | ||
| 319 | +#define HAVE_CUPS_1_6 1 | ||
| 320 | +#endif | ||
| 321 | + | ||
| 322 | +#ifndef HAVE_CUPS_1_6 | ||
| 323 | +#define ippGetGroupTag(attr) attr->group_tag | ||
| 324 | +#define ippGetValueTag(attr) attr->value_tag | ||
| 325 | +#define ippGetName(attr) attr->name | ||
| 326 | +#define ippGetString(attr, element, language) attr->values[element].string.text | ||
| 327 | + | ||
| 328 | +static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) | ||
| 329 | +{ | ||
| 330 | + if (!ipp) | ||
| 331 | + return (NULL); | ||
| 332 | + return (ipp->current = ipp->attrs); | ||
| 333 | +} | ||
| 334 | + | ||
| 335 | +static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) | ||
| 336 | +{ | ||
| 337 | + if (!ipp || !ipp->current) | ||
| 338 | + return (NULL); | ||
| 339 | + return (ipp->current = ipp->current->next); | ||
| 340 | +} | ||
| 341 | + | ||
| 342 | +static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) | ||
| 343 | +{ | ||
| 344 | + ipp->request.op.operation_id = op; | ||
| 345 | + return (1); | ||
| 346 | +} | ||
| 347 | + | ||
| 348 | +static int ippSetRequestId( ipp_t *ipp, int request_id ) | ||
| 349 | +{ | ||
| 350 | + ipp->request.any.request_id = request_id; | ||
| 351 | + return (1); | ||
| 352 | +} | ||
| 353 | +#endif | ||
| 354 | + | ||
| 355 | static SANE_Device **DeviceList = NULL; | ||
| 356 | |||
| 357 | static int AddDeviceList(char *uri, char *model, SANE_Device ***pd) | ||
| 358 | @@ -186,8 +223,8 @@ | ||
| 359 | /* Assemble the IPP request */ | ||
| 360 | request = ippNew(); | ||
| 361 | |||
| 362 | - request->request.op.operation_id = CUPS_GET_PRINTERS; | ||
| 363 | - request->request.any.request_id = 1; | ||
| 364 | + ippSetOperation( request, CUPS_GET_PRINTERS ); | ||
| 365 | + ippSetRequestId( request, 1 ); | ||
| 366 | |||
| 367 | ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8"); | ||
| 368 | ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en"); | ||
| 369 | @@ -197,20 +234,20 @@ | ||
| 370 | if ((response = cupsDoRequest(http, request, "/")) == NULL) | ||
| 371 | goto bugout; | ||
| 372 | |||
| 373 | - for (attr = response->attrs; attr != NULL; attr = attr->next) | ||
| 374 | + for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response )) | ||
| 375 | { | ||
| 376 | /* Skip leading attributes until we hit a printer. */ | ||
| 377 | - while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER) | ||
| 378 | - attr = attr->next; | ||
| 379 | + while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) | ||
| 380 | + attr = ippNextAttribute( response ); | ||
| 381 | |||
| 382 | if (attr == NULL) | ||
| 383 | break; | ||
| 384 | |||
| 385 | - while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER) | ||
| 386 | + while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER) | ||
| 387 | { | ||
| 388 | - if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0) | ||
| 389 | + if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0) | ||
| 390 | cnt++; | ||
| 391 | - attr = attr->next; | ||
| 392 | + attr = ippNextAttribute( response ); | ||
| 393 | } | ||
| 394 | |||
| 395 | if (attr == NULL) | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch deleted file mode 100644 index b347f831cb..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | diff -rupN hplip-3.12.6_orig/configure.in hplip-3.12.6/configure.in | ||
| 4 | --- hplip-3.12.6_orig/configure.in 2012-06-18 20:44:24.000000000 +1000 | ||
| 5 | +++ hplip-3.12.6/configure.in 2012-08-16 13:40:07.259927650 +1000 | ||
| 6 | @@ -524,6 +524,8 @@ if test "$hpijs_only_build" = "no"; then | ||
| 7 | AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) | ||
| 8 | else | ||
| 9 | AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) | ||
| 10 | + LIBUSBINCLUDEROOT?="/usr/include/" | ||
| 11 | + AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder]) | ||
| 12 | AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) | ||
| 13 | fi | ||
| 14 | fi | ||
| 15 | diff -rupN hplip-3.12.6_orig/Makefile.am hplip-3.12.6/Makefile.am | ||
| 16 | --- hplip-3.12.6_orig/Makefile.am 2012-06-18 20:44:13.000000000 +1000 | ||
| 17 | +++ hplip-3.12.6/Makefile.am 2012-08-16 13:41:12.307932822 +1000 | ||
| 18 | @@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i | ||
| 19 | io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ | ||
| 20 | io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c | ||
| 21 | else | ||
| 22 | -libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" | ||
| 23 | +libhpmud_la_CFLAGS = -I/$(LIBUSBINCLUDEROOT)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" | ||
| 24 | libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ | ||
| 25 | io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ | ||
| 26 | io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c | ||
| 27 | @@ -286,7 +286,7 @@ hpmudext_la_LIBADD = libhpmud.la | ||
| 28 | if LIBUSB01_BUILD | ||
| 29 | hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) | ||
| 30 | else | ||
| 31 | -hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) | ||
| 32 | +hpmudext_la_CFLAGS =-I$(LIBUSBINCLUDEROOT)/libusb-1.0 -I$(PYTHONINCLUDEDIR) | ||
| 33 | endif | ||
| 34 | |||
| 35 | # ui (qt3) | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch deleted file mode 100644 index 0e1b6c4ed3..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [embedded specific] | ||
| 2 | |||
| 3 | --- hplip-3.11.10/setup.py.orig 2011-10-02 14:06:19.000000000 +1100 | ||
| 4 | +++ hplip-3.11.10/setup.py 2012-02-29 08:21:39.167999938 +1100 | ||
| 5 | @@ -573,6 +573,7 @@ | ||
| 6 | |||
| 7 | log.debug("Restarting CUPS...") | ||
| 8 | status, output = utils.run(restart_cups()) | ||
| 9 | + time.sleep(3) | ||
| 10 | log.debug("Restart CUPS returned: exit=%d output=%s" % (status, output)) | ||
| 11 | |||
| 12 | cups.setPasswordPrompt("You do not have permission to add a printer.") | ||
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 new file mode 100644 index 0000000000..2babb2b67a --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | https://bugs.launchpad.net/hplip/+bug/1672256 | ||
| 2 | |||
| 3 | memcpy should never be used with overlapping memory regions | ||
| 4 | |||
| 5 | --- a/io/hpmud/musb.c | ||
| 6 | +++ b/io/hpmud/musb.c | ||
| 7 | @@ -775,7 +775,7 @@ static int device_id(int fd, unsigned ch | ||
| 8 | len = size-1; /* leave byte for zero termination */ | ||
| 9 | if (len > 2) | ||
| 10 | len -= 2; | ||
| 11 | - memcpy(buffer, buffer+2, len); /* remove length */ | ||
| 12 | + memmove(buffer, buffer+2, len); /* remove length */ | ||
| 13 | buffer[len]=0; | ||
| 14 | DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); | ||
| 15 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch new file mode 100644 index 0000000000..e020bd4642 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h | ||
| 2 | index 6605dd9..55c7110 100644 | ||
| 3 | --- a/scan/sane/OrbliteScan/LinuxCommon.h | ||
| 4 | +++ b/scan/sane/OrbliteScan/LinuxCommon.h | ||
| 5 | @@ -18,10 +18,8 @@ typedef u_int32_t UInt32; | ||
| 6 | typedef int32_t SInt32; | ||
| 7 | //typedef unsigned long UInt32; | ||
| 8 | //typedef signed long SInt32; | ||
| 9 | -typedef __S64_TYPE SInt64; | ||
| 10 | -typedef __U64_TYPE UInt64; | ||
| 11 | -typedef __S64_TYPE int64_t; | ||
| 12 | -typedef __U64_TYPE uint64_t; | ||
| 13 | +typedef int64_t SInt64; | ||
| 14 | +typedef uint64_t UInt64; | ||
| 15 | |||
| 16 | //typedef unsigned long ULONG; | ||
| 17 | //typedef void* LPVOID; | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip/600-fix.patch b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch new file mode 100644 index 0000000000..91a5035ae9 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | --- a/configure.in | ||
| 2 | +++ b/configure.in | ||
| 3 | @@ -254,7 +254,6 @@ if test "$class_driver" = "yes"; then | ||
| 4 | test `sh ./createPPD.sh -f` == 0 | ||
| 5 | else | ||
| 6 | AC_MSG_RESULT(no) | ||
| 7 | - test `sh ./createPPD.sh -q` == 0 | ||
| 8 | fi | ||
| 9 | AM_CONDITIONAL(HPLIP_CLASS_DRIVER, test x$class_driver = xyes) | ||
| 10 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch b/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch new file mode 100644 index 0000000000..aee4ac50cc --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 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 new file mode 100644 index 0000000000..8fe77c5edf --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/configure.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | --- a/configure.in | ||
| 2 | +++ b/configure.in | ||
| 3 | @@ -27,8 +27,7 @@ | ||
| 4 | |||
| 5 | #AC_PREREQ(2.59) | ||
| 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 | ||
| 9 | +AM_INIT_AUTOMAKE([foreign]) | ||
| 10 | AC_DISABLE_STATIC | ||
| 11 | |||
| 12 | # Checks for programs. | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch new file mode 100644 index 0000000000..6aa1de0a8a --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | Upstream-Status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | --- a/configure.in | ||
| 4 | +++ b/configure.in | ||
| 5 | @@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test " | ||
| 6 | AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) | ||
| 7 | else | ||
| 8 | AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) | ||
| 9 | + LIBUSBINCLUDEROOT?="/usr/include/" | ||
| 10 | + AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder]) | ||
| 11 | AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) | ||
| 12 | fi | ||
| 13 | fi | ||
| 14 | --- a/Makefile.am | ||
| 15 | +++ b/Makefile.am | ||
| 16 | @@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib | ||
| 17 | libhpmud_la_LDFLAGS += -lusb | ||
| 18 | else | ||
| 19 | libhpmud_la_SOURCES += io/hpmud/musb.c | ||
| 20 | -libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0 | ||
| 21 | +libhpmud_la_CFLAGS += -I$(LIBUSBINCLUDEROOT)/libusb-1.0 | ||
| 22 | libhpmud_la_LDFLAGS += -lusb-1.0 | ||
| 23 | endif | ||
| 24 | |||
| 25 | @@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove | ||
| 26 | endif | ||
| 27 | |||
| 28 | if !LIBUSB01_BUILD | ||
| 29 | -hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 | ||
| 30 | +hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0 | ||
| 31 | endif | ||
| 32 | endif #!HPLIP_CLASS_DRIVER | ||
| 33 | # ui (qt3) | ||
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 new file mode 100644 index 0000000000..67546b07dc --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | From 2fcd0e79b21ec6dbf975ad7d1b5697a78993e2f1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: David Valleau <valleau@chromium.org> | ||
| 3 | Date: Wed, 14 Aug 2019 15:47:38 -0700 | ||
| 4 | Subject: [PATCH] Fixing invalid return in void function | ||
| 5 | |||
| 6 | --- | ||
| 7 | prnt/hpps/hppsfilter.c | 2 +- | ||
| 8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 9 | |||
| 10 | --- a/prnt/hpps/hppsfilter.c | ||
| 11 | +++ b/prnt/hpps/hppsfilter.c | ||
| 12 | @@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m | ||
| 13 | if(ptempbooklet_file == NULL) | ||
| 14 | { | ||
| 15 | fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename); | ||
| 16 | - return 1; | ||
| 17 | + return; | ||
| 18 | } | ||
| 19 | chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); | ||
| 20 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb b/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb deleted file mode 100644 index 765a84643e..0000000000 --- a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | SUMMARY = "HP Linux Imaging and Printing" | ||
| 2 | LICENSE="GPLv2" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=442bb3cbbeeb60643a87325718b8a8ee" | ||
| 4 | |||
| 5 | PR = "r1" | ||
| 6 | |||
| 7 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
| 8 | file://setup-add-sleep-after-cups-reset.patch \ | ||
| 9 | file://fix-libusb-paths.patch \ | ||
| 10 | file://cups-1.6.patch \ | ||
| 11 | file://configure.patch \ | ||
| 12 | file://0001-include-cups-ppd.h-for-missing-ppd-definitions.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | DEPENDS += "cups python libusb" | ||
| 16 | |||
| 17 | inherit autotools-brokensep python3-dir python3native pkgconfig | ||
| 18 | |||
| 19 | export STAGING_INCDIR | ||
| 20 | export STAGING_LIBDIR | ||
| 21 | |||
| 22 | EXTRA_OECONF += "\ | ||
| 23 | LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ | ||
| 24 | --disable-network-build \ | ||
| 25 | --disable-doc-build \ | ||
| 26 | --disable-pp-build \ | ||
| 27 | --disable-scan-build \ | ||
| 28 | --disable-gui-build \ | ||
| 29 | --disable-fax-build \ | ||
| 30 | --disable-policykit \ | ||
| 31 | --disable-qt4 \ | ||
| 32 | --disable-qt3 \ | ||
| 33 | --disable-dbus-build \ | ||
| 34 | --disable-foomatic-drv-install \ | ||
| 35 | --enable-foomatic-ppd-install \ | ||
| 36 | --enable-foomatic-rip-hplip-install \ | ||
| 37 | --with-cupsbackenddir=${libdir}/cups/backend \ | ||
| 38 | --with-cupsfilterdir=${libdir}/cups/filter \ | ||
| 39 | " | ||
| 40 | |||
| 41 | PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" | ||
| 42 | |||
| 43 | RDEPENDS_${PN} += " \ | ||
| 44 | python \ | ||
| 45 | python-syslog \ | ||
| 46 | python-pprint \ | ||
| 47 | python-compression \ | ||
| 48 | python-shell \ | ||
| 49 | python-xml \ | ||
| 50 | python-unixadmin \ | ||
| 51 | python-html \ | ||
| 52 | python-resource \ | ||
| 53 | python-terminal \ | ||
| 54 | python-subprocess\ | ||
| 55 | " | ||
| 56 | RDEPENDS_${PN}-filter += "perl" | ||
| 57 | |||
| 58 | # need to snag the debug file or OE will fail on backend package | ||
| 59 | FILES_${PN}-dbg += "\ | ||
| 60 | ${libdir}/cups/backend/.debug \ | ||
| 61 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ | ||
| 62 | ${libdir}/cups/filter/.debug " | ||
| 63 | |||
| 64 | FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" | ||
| 65 | FILES_${PN}-ppd = "${datadir}/ppd" | ||
| 66 | FILES_${PN}-cups = "${datadir}/cups" | ||
| 67 | FILES_${PN}-backend = "${libdir}/cups/backend" | ||
| 68 | FILES_${PN}-filter = "${libdir}/cups/filter" | ||
| 69 | FILES_${PN}-hal = "${datadir}/hal" | ||
| 70 | |||
| 71 | FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" | ||
| 72 | |||
| 73 | SRC_URI[md5sum] = "5303938e8630775ea6fb383af85775e5" | ||
| 74 | SRC_URI[sha256sum] = "54578000792969adb583e75efeacb9c46ab69659ec7e9424de390613f3595775" | ||
| 75 | |||
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb b/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb new file mode 100644 index 0000000000..883a6ffe95 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | SUMMARY = "HP Linux Imaging and Printing" | ||
| 2 | LICENSE="GPLv2" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" | ||
| 4 | |||
| 5 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
| 6 | file://configure.patch \ | ||
| 7 | file://fix-libusb-paths.patch \ | ||
| 8 | file://999-remove-lImageProcessor.patch \ | ||
| 9 | file://600-fix.patch \ | ||
| 10 | file://030-replace_unsafe_memcpy_with_memmove.patch \ | ||
| 11 | file://050-fix-glibcisms.patch \ | ||
| 12 | file://hplip-3.19.6-fix-return.patch \ | ||
| 13 | " | ||
| 14 | SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3" | ||
| 15 | SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255" | ||
| 16 | |||
| 17 | DEPENDS += "cups python3 libusb" | ||
| 18 | |||
| 19 | inherit autotools-brokensep python3-dir python3native pkgconfig systemd | ||
| 20 | |||
| 21 | export STAGING_INCDIR | ||
| 22 | export STAGING_LIBDIR | ||
| 23 | |||
| 24 | CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" | ||
| 25 | |||
| 26 | EXTRA_OECONF += "\ | ||
| 27 | LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ | ||
| 28 | --enable-cups-ppd-install \ | ||
| 29 | --disable-network-build \ | ||
| 30 | --disable-doc-build \ | ||
| 31 | --disable-pp-build \ | ||
| 32 | --disable-scan-build \ | ||
| 33 | --disable-gui-build \ | ||
| 34 | --disable-fax-build \ | ||
| 35 | --disable-policykit \ | ||
| 36 | --disable-qt4 \ | ||
| 37 | --disable-qt3 \ | ||
| 38 | --disable-dbus-build \ | ||
| 39 | --enable-foomatic-drv-install \ | ||
| 40 | --disable-foomatic-ppd-install \ | ||
| 41 | --disable-foomatic-rip-hplip-install \ | ||
| 42 | --with-cupsbackenddir=${libdir}/cups/backend \ | ||
| 43 | --with-cupsfilterdir=${libdir}/cups/filter \ | ||
| 44 | " | ||
| 45 | |||
| 46 | EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" | ||
| 47 | |||
| 48 | do_install_append() { | ||
| 49 | rm -rf ${D}${datadir}/hplip/upgrade.py | ||
| 50 | rm -rf ${D}${datadir}/hplip/uninstall.py | ||
| 51 | sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py | ||
| 52 | sed -i -e "s|/usr/bin/python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py | ||
| 53 | } | ||
| 54 | |||
| 55 | PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" | ||
| 56 | |||
| 57 | RDEPENDS_${PN} += " \ | ||
| 58 | python3\ | ||
| 59 | python3-syslog \ | ||
| 60 | python3-pprint \ | ||
| 61 | python3-compression \ | ||
| 62 | python3-shell \ | ||
| 63 | python3-xml \ | ||
| 64 | python3-unixadmin \ | ||
| 65 | python3-html \ | ||
| 66 | python3-resource \ | ||
| 67 | python3-terminal \ | ||
| 68 | " | ||
| 69 | RDEPENDS_${PN}-filter += "perl" | ||
| 70 | |||
| 71 | # need to snag the debug file or OE will fail on backend package | ||
| 72 | FILES_${PN}-dbg += "\ | ||
| 73 | ${libdir}/cups/backend/.debug \ | ||
| 74 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ | ||
| 75 | ${libdir}/cups/filter/.debug " | ||
| 76 | |||
| 77 | FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" | ||
| 78 | FILES_${PN}-ppd = "${datadir}/ppd" | ||
| 79 | FILES_${PN}-cups = "${datadir}/cups" | ||
| 80 | FILES_${PN}-backend = "${libdir}/cups/backend" | ||
| 81 | FILES_${PN}-filter = "${libdir}/cups/filter" | ||
| 82 | FILES_${PN}-hal = "${datadir}/hal" | ||
| 83 | |||
| 84 | FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" | ||
| 85 | |||
| 86 | SYSTEMD_SERVICE_${PN} = "hplip-printer@.service" | ||
| 87 | |||
| 88 | CLEANBROKEN = "1" | ||
