From e22fe75cdaa424c6d4429a89744edf69acf6c467 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 21 Jun 2024 12:59:21 +0000 Subject: [PATCH] extra/hplip to 3.24.4-1 --- extra/hplip/.SRCINFO | 15 ++-- extra/hplip/PKGBUILD | 22 +++-- extra/hplip/hplip-hpaio-gcc14.patch | 114 ++++++++++++++++++++++++++ extra/hplip/hplip-pserror-gcc14.patch | 12 +++ 4 files changed, 152 insertions(+), 11 deletions(-) create mode 100644 extra/hplip/hplip-hpaio-gcc14.patch create mode 100644 extra/hplip/hplip-pserror-gcc14.patch diff --git a/extra/hplip/.SRCINFO b/extra/hplip/.SRCINFO index e2777e80e..26d12bcbd 100644 --- a/extra/hplip/.SRCINFO +++ b/extra/hplip/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = hplip pkgdesc = Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet - pkgver = 3.23.12 - pkgrel = 6 + pkgver = 3.24.4 + pkgrel = 1 epoch = 1 url = https://hplipopensource.com arch = x86_64 @@ -45,10 +45,11 @@ pkgbase = hplip optdepends = python-pyqt5: for running GUI and hp-toolbox optdepends = libusb: for advanced usb support optdepends = wget: for network support + options = !makeflags backup = etc/hp/hplip.conf backup = etc/sane.d/dll.d/hpaio - source = https://downloads.sourceforge.net/hplip/hplip-3.23.12.tar.gz - source = https://downloads.sourceforge.net/hplip/hplip-3.23.12.tar.gz.asc + source = https://downloads.sourceforge.net/hplip/hplip-3.24.4.tar.gz + source = https://downloads.sourceforge.net/hplip/hplip-3.24.4.tar.gz.asc source = disable_upgrade.patch source = 0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch source = 0018-Allow-non-JPEG-scanning-on-the-HP-DeskJet-3520-All-i.patch @@ -59,8 +60,10 @@ pkgbase = hplip source = reproducible-gzip.patch source = hplip-1_3_23_12-4-python3_12-fix.patch source = hplip-locale-format.patch + source = hplip-hpaio-gcc14.patch + source = hplip-pserror-gcc14.patch validpgpkeys = 4ABA2F66DBD5A95894910E0673D770CDA59047B9 - sha512sums = 7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956fd221f7e1561635508103ae944f19e04d6052d3f8928f2c9685fdcdcf515df + sha512sums = 6162ec58289433659ed4c3a254b2a50863c01acb87a8c0e1a1f935fed2b1916c5ae211c2d84130f40963368ff53e0c8da1878a1fce4dd08bd517f65bbcf6a2d2 sha512sums = SKIP sha512sums = a12aaeece5285ffb86bdbc24871bf512fbc1f29da44ae51ded314378032662074a42b8aca23bebb378bf78ed15bb7f99da59bfb4cd456f3458e7a5ef42a900f8 sha512sums = f79b3f09d022178099f38b9eae1792396e730eb5352a03d088e6610d92b3895f3f65bb92089ce7f5b21d794f9716ceb176d29ca7283e8a48bb04cf6aba305a2f @@ -72,5 +75,7 @@ pkgbase = hplip sha512sums = 379fcbe9dc2986da828a174a0ac4e71a1da43a98408894d5e713e09d7d9cba1e9fac30f9602b81d48d992abe6b65b6402b8a07664efe97400c5d839be33cf15f sha512sums = d8c9918a5559fb4cc968607aae9c2b67814240f4d81f703a15e1a23cca0bedd21b3c79c29363bd361f8b4bed169336d2a9e152eb8ca6309bd725dc2aa6a24509 sha512sums = 321f622c070aee8d4a0a4b2ce1ae81f40ca10959f5707f57f9b2bdfdbeba953792b051470ec2477a747074e123935bb96a2d185f935670127e070466de26eb6d + sha512sums = 1da56de340104a82747607d33d6aa336fbcca8fa6de25ae244bf52cd64920334bcacf50e3f7b9ddbec1126f322325ce847763b02ff0dae44942fd24478ed466f + sha512sums = 63b0ffed2628915f4577932dfdd27a214edfbcf78745eab09cacafe0fa6ed99cdc742a97ac08ce600d202f824a0af790166e25e346f9a51d37c02747e262d742 pkgname = hplip diff --git a/extra/hplip/PKGBUILD b/extra/hplip/PKGBUILD index f4864755c..402c9d414 100644 --- a/extra/hplip/PKGBUILD +++ b/extra/hplip/PKGBUILD @@ -7,8 +7,8 @@ # - patch to remove x86-only ImageProcessor pkgname=hplip -pkgver=3.23.12 -pkgrel=6 +pkgver=3.24.4 +pkgrel=1 epoch=1 pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet" arch=('x86_64') @@ -50,8 +50,10 @@ source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz{,.a python3.diff reproducible-gzip.patch hplip-1_3_23_12-4-python3_12-fix.patch - hplip-locale-format.patch) -sha512sums=('7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956fd221f7e1561635508103ae944f19e04d6052d3f8928f2c9685fdcdcf515df' + hplip-locale-format.patch + hplip-hpaio-gcc14.patch + hplip-pserror-gcc14.patch) +sha512sums=('6162ec58289433659ed4c3a254b2a50863c01acb87a8c0e1a1f935fed2b1916c5ae211c2d84130f40963368ff53e0c8da1878a1fce4dd08bd517f65bbcf6a2d2' 'SKIP' 'a12aaeece5285ffb86bdbc24871bf512fbc1f29da44ae51ded314378032662074a42b8aca23bebb378bf78ed15bb7f99da59bfb4cd456f3458e7a5ef42a900f8' 'f79b3f09d022178099f38b9eae1792396e730eb5352a03d088e6610d92b3895f3f65bb92089ce7f5b21d794f9716ceb176d29ca7283e8a48bb04cf6aba305a2f' @@ -63,8 +65,11 @@ sha512sums=('7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956f 'b8a4c860e90a52ec566ca5a9c7f3a5ecb7386ae76e17b2c6c878073e60eeaf0cb63883b740b4725794be9914e1ab8fc91313efb288395f3095f599c07f54cf14' '379fcbe9dc2986da828a174a0ac4e71a1da43a98408894d5e713e09d7d9cba1e9fac30f9602b81d48d992abe6b65b6402b8a07664efe97400c5d839be33cf15f' 'd8c9918a5559fb4cc968607aae9c2b67814240f4d81f703a15e1a23cca0bedd21b3c79c29363bd361f8b4bed169336d2a9e152eb8ca6309bd725dc2aa6a24509' - '321f622c070aee8d4a0a4b2ce1ae81f40ca10959f5707f57f9b2bdfdbeba953792b051470ec2477a747074e123935bb96a2d185f935670127e070466de26eb6d') + '321f622c070aee8d4a0a4b2ce1ae81f40ca10959f5707f57f9b2bdfdbeba953792b051470ec2477a747074e123935bb96a2d185f935670127e070466de26eb6d' + '1da56de340104a82747607d33d6aa336fbcca8fa6de25ae244bf52cd64920334bcacf50e3f7b9ddbec1126f322325ce847763b02ff0dae44942fd24478ed466f' + '63b0ffed2628915f4577932dfdd27a214edfbcf78745eab09cacafe0fa6ed99cdc742a97ac08ce600d202f824a0af790166e25e346f9a51d37c02747e262d742') validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) +options=(!makeflags) prepare() { cd "$pkgname"-$pkgver @@ -94,7 +99,11 @@ prepare() { patch -Np1 -i ../reproducible-gzip.patch # https://gitlab.archlinux.org/archlinux/packaging/packages/hplip/-/issues/3 - patch -Np1 -i ../hplip-1_3_23_12-4-python3_12-fix.patch +# patch -Np1 -i ../hplip-1_3_23_12-4-python3_12-fix.patch + + # fix build with gcc14 + patch -Np1 -i ../hplip-hpaio-gcc14.patch + patch -Np1 -i ../hplip-pserror-gcc14.patch export AUTOMAKE='automake --foreign' autoreconf --force --install @@ -102,6 +111,7 @@ prepare() { build() { cd "$pkgname"-$pkgver + export CFLAGS+=" -Wno-deprecated-declarations -Wno-implicit-function-declaration -Wno-return-mismatch" ./configure --prefix=/usr \ --enable-qt5 \ --disable-qt4 \ diff --git a/extra/hplip/hplip-hpaio-gcc14.patch b/extra/hplip/hplip-hpaio-gcc14.patch new file mode 100644 index 000000000..f7d195ed1 --- /dev/null +++ b/extra/hplip/hplip-hpaio-gcc14.patch @@ -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; + diff --git a/extra/hplip/hplip-pserror-gcc14.patch b/extra/hplip/hplip-pserror-gcc14.patch new file mode 100644 index 000000000..a4fe3252b --- /dev/null +++ b/extra/hplip/hplip-pserror-gcc14.patch @@ -0,0 +1,12 @@ +diff -Nru hplip-3.23.12.orig/prnt/hpps/pserror.c hplip-3.23.12/prnt/hpps/pserror.c +--- hplip-3.23.12.orig/prnt/hpps/pserror.c 2023-11-27 15:06:40.000000000 +0000 ++++ hplip-3.23.12/prnt/hpps/pserror.c 2024-06-06 07:28:05.765351553 +0000 +@@ -24,7 +24,7 @@ + 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 */ +