Accepting request 1187617 from Printing
OBS-URL: https://build.opensuse.org/request/show/1187617 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hplip?expand=0&rev=155
This commit is contained in:
commit
462d0be98f
114
hplip-hpaio-gcc14.patch
Normal file
114
hplip-hpaio-gcc14.patch
Normal file
@ -0,0 +1,114 @@
|
||||
diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
|
||||
index 57d1dde..3475929 100644
|
||||
--- a/scan/sane/hpaio.c
|
||||
+++ b/scan/sane/hpaio.c
|
||||
@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_
|
||||
ResetDeviceList(&DeviceList);
|
||||
DevDiscovery(localOnly);
|
||||
*deviceList = (const SANE_Device **)DeviceList;
|
||||
- SANE_Device*** devList;
|
||||
+ const SANE_Device*** devList;
|
||||
orblite_get_devices(devList, localOnly);
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
||||
index 2eb7aba..4eaa468 100644
|
||||
--- a/scan/sane/orblite.c
|
||||
+++ b/scan/sane/orblite.c
|
||||
@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
|
||||
},
|
||||
|
||||
// optResolution, // resolution group
|
||||
@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc
|
||||
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
},
|
||||
|
||||
// optMode, // color/depth group
|
||||
@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint
|
||||
},
|
||||
|
||||
// optSource,
|
||||
@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint
|
||||
},
|
||||
|
||||
// optPaperSize,
|
||||
@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint
|
||||
},
|
||||
|
||||
// optPaperSize,
|
||||
@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
|
||||
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
},
|
||||
#ifdef NOTDEF
|
||||
// default template
|
||||
@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
|
||||
SANE_Auth_Callback authorize;
|
||||
const SANE_Device *** device_list;
|
||||
SANE_Bool local_only;
|
||||
+ void * temp_handle;
|
||||
|
||||
|
||||
// Allocate handle, set all handle values to zero
|
||||
@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
|
||||
if (stat != SANE_STATUS_GOOD)
|
||||
return stat;
|
||||
|
||||
- stat = g_handle->bb_orblite_open(devicename, &g_handle);
|
||||
+ temp_handle = g_handle;
|
||||
+ stat = g_handle->bb_orblite_open(devicename, &temp_handle);
|
||||
+ g_handle = temp_handle;
|
||||
if (stat == SANE_STATUS_GOOD)
|
||||
*handle = g_handle;
|
||||
|
17
hplip-pserror-c99.patch
Normal file
17
hplip-pserror-c99.patch
Normal file
@ -0,0 +1,17 @@
|
||||
prnt/pserror.c: Replace an implicit int with an explicit int
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/prnt/hpps/pserror.c b/prnt/hpps/pserror.c
|
||||
index 114d7e1b5fa364fb..493b49c27917a7e6 100644
|
||||
--- a/prnt/hpps/pserror.c
|
||||
+++ b/prnt/hpps/pserror.c
|
||||
@@ -24,7 +24,7 @@ extern char *program ; /* Defined by main program, giving program name */
|
||||
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 */
|
||||
|
19
hplip-scan-hpaio-include.patch
Normal file
19
hplip-scan-hpaio-include.patch
Normal file
@ -0,0 +1,19 @@
|
||||
scam/sane/hpaio.c: Include orblite.h for more function prototypes
|
||||
|
||||
Otherwise the build fails with compilers which do not support
|
||||
implicit function declarations.
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
|
||||
index d342626822fc2190..57d1ddea32fb5816 100644
|
||||
--- a/scan/sane/hpaio.c
|
||||
+++ b/scan/sane/hpaio.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "sclpml.h"
|
||||
#include "escl.h"
|
||||
#include "io.h"
|
||||
+#include "orblite.h"
|
||||
#include "orblitei.h"
|
||||
|
||||
|
48
hplip-scan-orblite-c99.patch
Normal file
48
hplip-scan-orblite-c99.patch
Normal file
@ -0,0 +1,48 @@
|
||||
scan/sane/orblite: Include <dflcn.h> for function prototypes
|
||||
|
||||
This is required for C99 compatibility. Also delete the unused
|
||||
bb_unload function because it calls a call to the undefined
|
||||
_DBG function/macro.
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
||||
index ba86640c7528fc9c..ac59dda9c2dba593 100644
|
||||
--- a/scan/sane/orblite.c
|
||||
+++ b/scan/sane/orblite.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "orblitei.h"
|
||||
#include "orblite.h"//Added New
|
||||
#include <math.h>
|
||||
+#include <dlfcn.h>
|
||||
#include "utils.h"
|
||||
#include "io.h"
|
||||
|
||||
@@ -193,27 +194,6 @@ bugout:
|
||||
|
||||
}
|
||||
|
||||
-static int bb_unload(SANE_THandle ps)
|
||||
-{
|
||||
- _DBG("Calling orblite bb_unload: \n");
|
||||
- if (ps->bb_handle)
|
||||
- {
|
||||
- dlclose(ps->bb_handle);
|
||||
- ps->bb_handle = NULL;
|
||||
- }
|
||||
- if (ps->hpmud_handle)
|
||||
- {
|
||||
- dlclose(ps->hpmud_handle);
|
||||
- ps->hpmud_handle = NULL;
|
||||
- }
|
||||
-// if (ps->math_handle)
|
||||
-// {
|
||||
-// dlclose(ps->math_handle);
|
||||
-// ps->math_handle = NULL;
|
||||
-// }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
SANE_Status
|
||||
orblite_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
||||
{
|
20
hplip-sclpml-strcasestr.patch
Normal file
20
hplip-sclpml-strcasestr.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Kludge to support building C99 mode. This should no longer be needed
|
||||
once glibc declares strcasestr by default, and not just with
|
||||
-D_GNU_SOURCE.
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c
|
||||
index dc8b32ce02ad1202..f2cacd53e86800ce 100644
|
||||
--- a/scan/sane/sclpml.c
|
||||
+++ b/scan/sane/sclpml.c
|
||||
@@ -47,6 +47,9 @@
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
#include "sanei_debug.h"
|
||||
|
||||
+/* This file is not built with _GNU_SOURCE. */
|
||||
+char *strcasestr(const char *, const char *);
|
||||
+
|
||||
//# define SCLPML_DEBUG
|
||||
# ifdef SCLPML_DEBUG
|
||||
# define _DBG(args...) syslog(LOG_INFO, __FILE__ " " STRINGIZE(__LINE__) ": " args)
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 15 15:19:58 UTC 2024 - Martin Jambor <mjambor@suse.com>
|
||||
|
||||
- Add hplip-pserror-c99.patch hplip-scan-hpaio-include.patch
|
||||
hplip-scan-orblite-c99.patch hplip-sclpml-strcasestr.patch
|
||||
hplip-hpaio-gcc14.patch to avoid C99 violations which prevent
|
||||
building with GCC 14. [boo#1225777]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 21 21:30:55 UTC 2024 - Martin Wilck <martin.wilck@suse.com>
|
||||
|
||||
|
12
hplip.spec
12
hplip.spec
@ -86,6 +86,13 @@ Patch403: Revert-changes-from-3.18.5-that-break-hp-setup-for-f.patch
|
||||
# PATCH-FIX-UPSTREAM: https://bugs.launchpad.net/hplip/+bug/1879445
|
||||
Patch404: hplip-3.20.6-python-includes.patch
|
||||
Patch500: hplip-missing-drivers.patch
|
||||
# PATCH-FIX-UPSTREAM boo#1225777
|
||||
Patch601: hplip-pserror-c99.patch
|
||||
Patch602: hplip-scan-hpaio-include.patch
|
||||
Patch603: hplip-scan-orblite-c99.patch
|
||||
Patch604: hplip-sclpml-strcasestr.patch
|
||||
Patch605: hplip-hpaio-gcc14.patch
|
||||
|
||||
BuildRequires: %{pymod devel}
|
||||
BuildRequires: %{pymod qt5-devel}
|
||||
BuildRequires: %{pymod xml}
|
||||
@ -331,6 +338,11 @@ This sub-package is only required by developers.
|
||||
%patch -P 403 -p1
|
||||
%patch -P 404 -p1
|
||||
%patch -P 500 -p1
|
||||
%patch -P 601 -p1
|
||||
%patch -P 602 -p1
|
||||
%patch -P 603 -p1
|
||||
%patch -P 604 -p1
|
||||
%patch -P 605 -p1
|
||||
# replace "env" shebang and "/usr/bin/python" with real executable
|
||||
find . -name '*.py' -o -name pstotiff | \
|
||||
xargs -n 1 sed -i '1s,^#!\(%{_bindir}/env python\|%{_bindir}/python\),#!%{pyexe},'
|
||||
|
Loading…
Reference in New Issue
Block a user