mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
hplip: update to 3.24.4
Added patch fixing compilation with GCC14. Remove outdated patches. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Luiz Angelo Daros de Luca
parent
d551f2182b
commit
a3f35d79b1
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hplip
|
||||
PKG_VERSION:=3.23.12
|
||||
PKG_VERSION:=3.24.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/hplip
|
||||
PKG_HASH:=a76c2ac8deb31ddb5f0da31398d25ac57440928a0692dcb060a48daa718e69ed
|
||||
PKG_HASH:=5d7643831893a5e2addf9d42d581a5dbfe5aaf023626886b8762c5645da0f1fb
|
||||
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0 GPL-2.0-or-later
|
||||
|
||||
174
utils/hplip/patches/040-gcc14.patch
Normal file
174
utils/hplip/patches/040-gcc14.patch
Normal file
@@ -0,0 +1,174 @@
|
||||
--- a/common/utils.h
|
||||
+++ b/common/utils.h
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef _COMMON_UTILS_H
|
||||
#define _COMMON_UTILS_H
|
||||
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <syslog.h>
|
||||
--- a/scan/sane/bb_ledm.c
|
||||
+++ b/scan/sane/bb_ledm.c
|
||||
@@ -28,6 +28,7 @@
|
||||
# include <stdlib.h>
|
||||
|
||||
# include <stdint.h>
|
||||
+# include <unistd.h>
|
||||
|
||||
# define _STRINGIZE(x) #x
|
||||
# define STRINGIZE(x) _STRINGIZE(x)
|
||||
--- a/scan/sane/hpaio.c
|
||||
+++ b/scan/sane/hpaio.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "escl.h"
|
||||
#include "io.h"
|
||||
#include "orblitei.h"
|
||||
+#include "orblite.h"
|
||||
|
||||
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
@@ -252,8 +253,8 @@ extern SANE_Status sane_hpaio_get_device
|
||||
ResetDeviceList(&DeviceList);
|
||||
DevDiscovery(localOnly);
|
||||
*deviceList = (const SANE_Device **)DeviceList;
|
||||
- SANE_Device*** devList;
|
||||
- orblite_get_devices(devList, localOnly);
|
||||
+ const SANE_Device** devList;
|
||||
+ orblite_get_devices(&devList, localOnly);
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
--- a/scan/sane/http.c
|
||||
+++ b/scan/sane/http.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
+#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
--- a/scan/sane/orblite.c
|
||||
+++ b/scan/sane/orblite.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#undef NDEBUG
|
||||
#include "orblitei.h"
|
||||
#include "orblite.h"//Added New
|
||||
+#include <dlfcn.h>
|
||||
#include <math.h>
|
||||
#include "utils.h"
|
||||
#include "io.h"
|
||||
@@ -63,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
|
||||
@@ -92,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
|
||||
@@ -100,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,
|
||||
@@ -108,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,
|
||||
@@ -116,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,
|
||||
@@ -124,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
|
||||
@@ -195,7 +196,7 @@ bugout:
|
||||
|
||||
static int bb_unload(SANE_THandle ps)
|
||||
{
|
||||
- _DBG("Calling orblite bb_unload: \n");
|
||||
+ DBG("Calling orblite bb_unload: \n");
|
||||
if (ps->bb_handle)
|
||||
{
|
||||
dlclose(ps->bb_handle);
|
||||
@@ -304,7 +305,7 @@ orblite_open (SANE_String_Const devicena
|
||||
if (stat != SANE_STATUS_GOOD)
|
||||
return stat;
|
||||
|
||||
- stat = g_handle->bb_orblite_open(devicename, &g_handle);
|
||||
+ stat = g_handle->bb_orblite_open(devicename, (void **)&g_handle);
|
||||
if (stat == SANE_STATUS_GOOD)
|
||||
*handle = g_handle;
|
||||
|
||||
--- a/scan/sane/sclpml.c
|
||||
+++ b/scan/sane/sclpml.c
|
||||
@@ -25,6 +25,11 @@
|
||||
|
||||
\************************************************************************************/
|
||||
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
+#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@@ -1,15 +0,0 @@
|
||||
Fix missing definition of uint64_t while compiling
|
||||
under uclibc or glibc
|
||||
|
||||
https://bugs.launchpad.net/hplip/+bug/1826965
|
||||
|
||||
--- a/scan/sane/OrbliteScan/LinuxCommon.h
|
||||
+++ b/scan/sane/OrbliteScan/LinuxCommon.h
|
||||
@@ -2,6 +2,7 @@
|
||||
#define H_LinuxCommon
|
||||
|
||||
#include <sys/types.h>
|
||||
+#include <stdint.h>
|
||||
|
||||
/* Common typedefs for Linux */
|
||||
|
||||
Reference in New Issue
Block a user