summaryrefslogtreecommitdiffstats
path: root/source/ap
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap')
-rwxr-xr-xsource/ap/amp/amp.SlackBuild2
-rwxr-xr-xsource/ap/bpe/bpe.SlackBuild7
-rwxr-xr-xsource/ap/cdrtools/cdrtools.SlackBuild3
-rwxr-xr-xsource/ap/ghostscript/ghostscript.SlackBuild3
-rwxr-xr-xsource/ap/gutenprint/gutenprint.SlackBuild4
-rw-r--r--source/ap/hplip/hplip-covscan.patch615
-rw-r--r--source/ap/hplip/hplip-hpaio-gcc14.patch114
-rw-r--r--source/ap/hplip/hplip-pcardext-disable.patch16
-rw-r--r--source/ap/hplip/hplip-pserror-c99.patch17
-rw-r--r--source/ap/hplip/hplip-scan-hpaio-include.patch19
-rw-r--r--source/ap/hplip/hplip-scan-orblite-c99.patch21
-rwxr-xr-xsource/ap/hplip/hplip.SlackBuild14
-rwxr-xr-xsource/ap/libx86/libx86.SlackBuild3
-rw-r--r--source/ap/mc/bogus.cflags.diff10
-rwxr-xr-xsource/ap/mc/mc.SlackBuild5
-rwxr-xr-xsource/ap/rzip/rzip.SlackBuild3
-rwxr-xr-xsource/ap/sc-im/sc-im.SlackBuild3
-rwxr-xr-xsource/ap/sc/sc.SlackBuild1
-rw-r--r--source/ap/sc/sc.gcc14.diff11
-rwxr-xr-xsource/ap/seejpeg/seejpeg.SlackBuild3
-rwxr-xr-xsource/ap/sox/sox.SlackBuild3
-rwxr-xr-xsource/ap/vorbis-tools/vorbis-tools.SlackBuild3
-rw-r--r--source/ap/zsh/0007-zsh-configure-c99.patch44
-rwxr-xr-xsource/ap/zsh/zsh.SlackBuild2
24 files changed, 917 insertions, 9 deletions
diff --git a/source/ap/amp/amp.SlackBuild b/source/ap/amp/amp.SlackBuild
index 1f955b2a9..85ee4749d 100755
--- a/source/ap/amp/amp.SlackBuild
+++ b/source/ap/amp/amp.SlackBuild
@@ -58,7 +58,7 @@ zcat $CWD/amp-gcc34.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exi
# Avoid crashes caused by using agressive optimization with newer compilers:
zcat $CWD/amp.do.not.overoptimize.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
chown -R root:root .
-./configure --prefix=/usr $ARCH-slackware-linux || exit 1
+CFLAGS="-Wno-error=implicit-int" ./configure --prefix=/usr $ARCH-slackware-linux || exit 1
make || exit 1
mkdir -p $PKG/usr/doc $PKG/usr/bin $PKG/usr/man/man1
strip amp
diff --git a/source/ap/bpe/bpe.SlackBuild b/source/ap/bpe/bpe.SlackBuild
index f353c1430..3ed4529e1 100755
--- a/source/ap/bpe/bpe.SlackBuild
+++ b/source/ap/bpe/bpe.SlackBuild
@@ -54,6 +54,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-bpe
@@ -71,7 +74,8 @@ zcat $CWD/bpe.port.to.strerror.diff.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr || exit 1
+ --prefix=/usr \
+ $ARCH-slackware-linux-gnu || exit 1
make || exit 1
make install DESTDIR=$PKG || exit 1
( cd $PKG
@@ -88,4 +92,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/bpe-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/cdrtools/cdrtools.SlackBuild b/source/ap/cdrtools/cdrtools.SlackBuild
index 34334abbf..fe4f79166 100755
--- a/source/ap/cdrtools/cdrtools.SlackBuild
+++ b/source/ap/cdrtools/cdrtools.SlackBuild
@@ -66,6 +66,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+export CFLAGS="-Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
# When running make below, you'll see "errors" like these:
# config.h:34:10: fatal error: lconfig.h: No such file or directory
# 34 | #include "lconfig.h"
diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild
index af557de3e..fde47b4b3 100755
--- a/source/ap/ghostscript/ghostscript.SlackBuild
+++ b/source/ap/ghostscript/ghostscript.SlackBuild
@@ -68,6 +68,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
cd $TMP
rm -rf ${SRCPREFIX}${PKGNAM}-${VERSION}
tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.?z || exit 1
diff --git a/source/ap/gutenprint/gutenprint.SlackBuild b/source/ap/gutenprint/gutenprint.SlackBuild
index 90c829319..2904ee44c 100755
--- a/source/ap/gutenprint/gutenprint.SlackBuild
+++ b/source/ap/gutenprint/gutenprint.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-gutenprint
rm -rf $PKG
@@ -76,6 +79,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/ap/hplip/hplip-covscan.patch b/source/ap/hplip/hplip-covscan.patch
new file mode 100644
index 000000000..6c8858165
--- /dev/null
+++ b/source/ap/hplip/hplip-covscan.patch
@@ -0,0 +1,615 @@
+diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c
+--- hplip-3.23.3/common/utils.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/common/utils.c 2023-05-29 13:58:10.969395214 +0200
+@@ -1,5 +1,9 @@
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include "utils.h"
+-#include "string.h"
++#include <string.h>
+ #include <dlfcn.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c
+--- hplip-3.23.3/io/hpmud/hpmud.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/hpmud.c 2023-05-29 13:58:10.970395208 +0200
+@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_
+ }
+
+ strncpy(ds->uri, msp->device[dd].uri, sizeof(ds->uri));
++ ds->uri[sizeof(ds->uri)-1] = '\0';
+ ds->io_mode = msp->device[dd].io_mode;
+ ds->channel_cnt = msp->device[dd].channel_cnt;
+ ds->mlc_up = msp->device[dd].mlc_up;
+diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c
+--- hplip-3.23.3/io/hpmud/jd.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/jd.c 2023-05-29 13:58:10.970395208 +0200
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <signal.h>
++#include <stdlib.h>
+ #include "hpmud.h"
+ #include "hpmudi.h"
+
+diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c
+--- hplip-3.23.3/io/hpmud/model.c.covscan 2023-05-29 13:58:10.958395279 +0200
++++ hplip-3.23.3/io/hpmud/model.c 2023-05-29 13:58:10.970395208 +0200
+@@ -117,6 +117,7 @@ static int ReadConfig()
+ if (rcbuf[0] == '[')
+ {
+ strncpy(section, rcbuf, sizeof(section)); /* found new section */
++ section[sizeof(section)-1] = '\0';
+ continue;
+ }
+
+@@ -125,6 +126,7 @@ static int ReadConfig()
+ if ((strncasecmp(section, "[dirs]", 6) == 0) && (strcasecmp(key, "home") == 0))
+ {
+ strncpy(homedir, value, sizeof(homedir));
++ homedir[sizeof(homedir)-1] = '\0';
+ break; /* done */
+ }
+ }
+diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c
+--- hplip-3.23.3/io/hpmud/musb.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/musb.c 2023-05-29 13:58:10.970395208 +0200
+@@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+
+diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c
+--- hplip-3.23.3/io/hpmud/pp.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/pp.c 2023-05-29 13:58:10.970395208 +0200
+@@ -632,7 +632,7 @@ static int device_id(int fd, char *buffe
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am
+--- hplip-3.23.3/Makefile.am.covscan 2023-05-29 13:58:10.944395361 +0200
++++ hplip-3.23.3/Makefile.am 2023-05-29 13:58:10.969395214 +0200
+@@ -3,7 +3,7 @@
+ #
+ # (c) 2004-2015 Copyright HP Development Company, LP
+ # Author: David Suffield, Naga Samrat Chowdary Narla, Sarbeswar Meher
+-INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/
++INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -Iprotocol
+ CFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
+ CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
+
+@@ -310,7 +310,7 @@ dist_pcard_DATA = pcard/__init__.py pcar
+ pcardextdir = $(pyexecdir)
+ pcardext_LTLIBRARIES = pcardext.la
+ pcardext_la_LDFLAGS = -module -avoid-version
+-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c
++pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h
+ pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
+
+ # prnt
+@@ -322,7 +322,7 @@ lib_LTLIBRARIES += libhpipp.la
+ #hpipp_LTLIBRARIES = hpipp.la
+ #hpipp_la_LDFLAGS = -module -avoid-version
+ libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h
+-libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
++libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -D_GNU_SOURCE
+ libhpipp_la_LDFLAGS = -version-info 0:1:0
+ libhpipp_la_LIBADD = libhpmud.la
+
+diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c
+--- hplip-3.23.3/pcard/fat.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/pcard/fat.c 2023-05-29 13:58:10.971395203 +0200
+@@ -519,14 +519,17 @@ int FatFreeSpace(void)
+
+ int FatDiskAttributes( PHOTO_CARD_ATTRIBUTES * pa )
+ {
+- strncpy( pa->OEMID, bpb.OEMID, 8 );
++ strncpy(pa->OEMID, bpb.OEMID, sizeof(pa->OEMID));
++ pa->OEMID[sizeof(pa->OEMID)-1] = '\0';
+ pa->BytesPerSector = bpb.BytesPerSector;
+ pa->SectorsPerCluster = bpb.SectorsPerCluster;
+ pa->ReservedSectors = bpb.ReservedSectors;
+ pa->SectorsPerFat = bpb.SectorsPerFat;
+ pa->RootEntries = bpb.RootEntries;
+- strncpy( pa->SystemID, (char *)bpb.SystemID, 8 );
+- strncpy( pa->VolumeLabel, (char *)bpb.VolumeLabel, 11 );
++ strncpy(pa->SystemID, (char *)bpb.SystemID, sizeof(pa->SystemID));
++ pa->SystemID[sizeof(pa->SystemID)-1] = '\0';
++ strncpy(pa->VolumeLabel, (char *)bpb.VolumeLabel, sizeof(pa->VolumeLabel));
++ pa->VolumeLabel[sizeof(pa->VolumeLabel)-1] = '\0';
+ pa->WriteProtect = da.WriteProtect;
+
+ return 0;
+@@ -741,6 +744,7 @@ int FatSetCWD(char *dir)
+ return 1;
+
+ strncpy(cwd.Name, fa.Name, sizeof(cwd.Name));
++ cwd.Name[sizeof(cwd.Name)-1] = '\0';
+ cwd.StartSector = ConvertClusterToSector(fa.StartCluster);
+ cwd.CurrSector = cwd.StartSector;
+ cwd.StartCluster = fa.StartCluster;
+diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp
+--- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200
+@@ -1302,6 +1302,7 @@ DRIVER_ERROR PrintContext::SelectDevice
+ if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize))
+ {
+ strncpy((char *)pSS->strDevID,szDeviceId,DevIDBuffSize);
++ pSS->strDevID[sizeof(pSS->strDevID)-1] = '\0';
+ }
+ thePrinter = pPFI->CreatePrinter (pSS, familyHandle);
+ if (thePrinter->constructor_error != NO_ERROR)
+diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hpijs/systemservices.cpp
+--- hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan 2023-03-28 09:26:27.000000000 +0200
++++ hplip-3.23.3/prnt/hpijs/systemservices.cpp 2023-05-29 13:58:10.971395203 +0200
+@@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM
+ IOMode.bDevID =IM.bDevID && IOMode.bDevID;
+
+ if (model)
++ {
+ strncpy(strModel,model, sizeof(strModel));
++ strModel[sizeof(strModel)-1] = '\0';
++ }
+ }
+
+ APDK_END_NAMESPACE
+diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hppsfilter.c
+--- hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/prnt/hpps/hppsfilter.c 2023-05-29 13:58:10.972395197 +0200
+@@ -274,13 +274,13 @@ static void WriteHeader(char **argument)
+ /* Writing Header Information
+ argument[1] = JOB ID , argument[2]= USERNAME, argument[3] = TITLE */
+ hpwrite("\x1b%-12345X@PJL JOBNAME=", strlen("\x1b%-12345X@PJL JOBNAME="));
+- sprintf(buffer, "hplip_%s_%s\x0a", argument[2], argument[1]);
++ snprintf(buffer, MAX_BUFFER-1, "hplip_%s_%s\x0a", argument[2], argument[1]);
+ hpwrite(buffer, strlen(buffer));
+ memset(buffer, 0, sizeof(buffer));
+- sprintf(buffer, "@PJL SET USERNAME=\"%s\"\x0a", argument[2]);
++ snprintf(buffer, MAX_BUFFER-1, "@PJL SET USERNAME=\"%s\"\x0a", argument[2]);
+ hpwrite(buffer, strlen(buffer));
+ memset(buffer, 0, sizeof(buffer));
+- sprintf(buffer, "@PJL SET JOBNAME=\"%s\"\x0a", argument[3]);
++ snprintf(buffer, MAX_BUFFER-1, "@PJL SET JOBNAME=\"%s\"\x0a", argument[3]);
+ hpwrite(buffer, strlen(buffer));
+ fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n");
+ return;
+diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h
+--- hplip-3.23.3/protocol/hp_ipp.h.covscan 2023-05-29 13:58:10.972395197 +0200
++++ hplip-3.23.3/protocol/hp_ipp.h 2023-05-29 13:59:03.645085468 +0200
+@@ -168,6 +168,11 @@ HPIPP_RESULT parseResponseHeader(char* h
+ HPIPP_RESULT prepend_http_header(raw_ipp *raw_request,const char *resource);
+ enum HPMUD_RESULT sendUSBRequest(char *buf, int size, raw_ipp *responseptr, char * device_uri);
+ enum HPMUD_RESULT sendUSBFileRequest(char *buf, int size, int fileHandle,raw_ipp *responseptr, char *device_uri);
++void _releaseCupsInstance();
++int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info);
++int delCupsPrinter(char *pr_name);
++int setDefaultCupsPrinter(char *pr_name);
++int controlCupsPrinter(char *pr_name, int op);
+
+ ipp_t * createFaxDetailRequest(const char *printer_name);
+ ipp_t * getDeviceFaxModemAttributes(char* device_uri,char* printer_name, int *count);
+diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm.c
+--- hplip-3.23.3/scan/sane/bb_ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/bb_ledm.c 2023-05-29 13:58:10.972395197 +0200
+@@ -26,6 +26,7 @@
+ # include "http.h"
+ # include "xml.h"
+ # include <stdlib.h>
++# include <unistd.h>
+
+ # include <stdint.h>
+
+diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h
+--- hplip-3.23.3/scan/sane/common.h.covscan 2023-05-29 13:58:10.727396637 +0200
++++ hplip-3.23.3/scan/sane/common.h 2023-05-29 13:58:10.972395197 +0200
+@@ -36,7 +36,7 @@
+ #define _STRINGIZE(x) #x
+ #define STRINGIZE(x) _STRINGIZE(x)
+
+-#define BUG(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); DBG(2, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
++#define BUG_SCAN(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); DBG(2, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
+ #define BUG_DUMP(data, size) bugdump((data), (size))
+ #define BUG_SZ(args...) {syslog(LOG_ERR, args); DBG(2, args);}
+
+diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c
+--- hplip-3.23.3/scan/sane/escl.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/escl.c 2023-05-29 13:58:10.972395197 +0200
+@@ -849,7 +849,7 @@ SANE_Status escl_control_option(SANE_Han
+ //DBG8("escl_control_option (option=%s) action=%d\n", ps->option[option].name, action);
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+ return stat;
+@@ -1159,7 +1159,7 @@ void escl_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c
+--- hplip-3.23.3/scan/sane/http.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/http.c 2023-05-29 13:58:10.973395191 +0200
+@@ -36,6 +36,7 @@
+ #include <string.h>
+ #include <syslog.h>
+ #include <ctype.h>
++#include <unistd.h>
+ #include "hpmud.h"
+ #include "http.h"
+
+diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c
+--- hplip-3.23.3/scan/sane/io.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/io.c 2023-05-29 13:58:10.973395191 +0200
+@@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (dbus_error_is_set(&dbus_err))
+ {
+- BUG("dBus Connection Error (%s)!\n", dbus_err.message);
++ BUG_SCAN("dBus Connection Error (%s)!\n", dbus_err.message);
+ dbus_error_free(&dbus_err);
+ }
+
+@@ -79,7 +79,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (NULL == msg)
+ {
+- BUG("dbus message is NULL!\n");
++ BUG_SCAN("dbus message is NULL!\n");
+ return 0;
+ }
+
+@@ -94,7 +94,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (!dbus_connection_send(dbus_conn, msg, NULL))
+ {
+- BUG("dbus message send failed!\n");
++ BUG_SCAN("dbus message send failed!\n");
+ return 0;
+ }
+
+diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c
+--- hplip-3.23.3/scan/sane/ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/ledm.c 2023-05-29 13:58:10.973395191 +0200
+@@ -813,7 +813,7 @@ SANE_Status ledm_control_option(SANE_Han
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+ return stat;
+@@ -1078,7 +1078,7 @@ void ledm_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell.c
+--- hplip-3.23.3/scan/sane/marvell.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/marvell.c 2023-05-29 13:58:10.976395173 +0200
+@@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_se
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -335,7 +335,7 @@ static struct marvell_session *create_se
+
+ if ((ps = malloc(sizeof(struct marvell_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct marvell_session));
+@@ -402,7 +402,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -431,7 +431,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -441,7 +441,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (hpmud_open_channel(session->dd, HPMUD_S_MARVELL_SCAN_CHANNEL, &session->cd) != HPMUD_R_OK)
+ {
+- BUG("unable to open %s channel %s\n", HPMUD_S_MARVELL_SCAN_CHANNEL, session->uri);
++ BUG_SCAN("unable to open %s channel %s\n", HPMUD_S_MARVELL_SCAN_CHANNEL, session->uri);
+ stat = SANE_STATUS_DEVICE_BUSY;
+ goto bugout;
+ }
+@@ -554,7 +554,7 @@ void marvell_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -849,7 +849,7 @@ SANE_Status marvell_control_option(SANE_
+ stat = SANE_STATUS_GOOD;
+ break;
+ }
+- BUG("value=%d brymin=%d brymax=%d\n", *int_value, ps->bryRange.min, ps->bryRange.max);
++ BUG_SCAN("value=%d brymin=%d brymax=%d\n", *int_value, ps->bryRange.min, ps->bryRange.max);
+ }
+ else
+ { /* Set default. */
+@@ -866,7 +866,7 @@ SANE_Status marvell_control_option(SANE_
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -905,7 +905,7 @@ SANE_Status marvell_start(SANE_Handle ha
+
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -963,7 +963,7 @@ SANE_Status marvell_start(SANE_Handle ha
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -1023,7 +1023,7 @@ SANE_Status marvell_read(SANE_Handle han
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
+diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c
+--- hplip-3.23.3/scan/sane/sclpml.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/sclpml.c 2023-05-29 13:58:10.976395173 +0200
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <string.h>
++#include <sys/time.h>
+ #include "sane.h"
+ #include "saneopts.h"
+ #include "common.h"
+@@ -2090,7 +2091,7 @@ void sclpml_close(SANE_Handle handle)
+ DBG(8, "sane_hpaio_close(): %s %d\n", __FILE__, __LINE__);
+ if (hpaio == NULL || hpaio != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c
+--- hplip-3.23.3/scan/sane/soap.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/soap.c 2023-05-29 13:58:10.977395167 +0200
+@@ -142,7 +142,7 @@ static int get_ip_data(struct soap_sessi
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -219,7 +219,7 @@ static struct soap_session *create_sessi
+
+ if ((ps = malloc(sizeof(struct soap_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct soap_session));
+@@ -418,7 +418,7 @@ SANE_Status soap_open(SANE_String_Const
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -434,7 +434,7 @@ SANE_Status soap_open(SANE_String_Const
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -519,7 +519,7 @@ void soap_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -824,7 +824,7 @@ SANE_Status soap_control_option(SANE_Han
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -862,7 +862,7 @@ SANE_Status soap_start(SANE_Handle handl
+ ps->user_cancel = 0;
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -913,7 +913,7 @@ SANE_Status soap_start(SANE_Handle handl
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -955,7 +955,7 @@ SANE_Status soap_start(SANE_Handle handl
+
+ if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ stat = SANE_STATUS_IO_ERROR;
+ goto bugout;
+ }
+@@ -1007,7 +1007,7 @@ SANE_Status soap_read(SANE_Handle handle
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
+diff -up hplip-3.23.3/scan/sane/soapht.c.covscan hplip-3.23.3/scan/sane/soapht.c
+--- hplip-3.23.3/scan/sane/soapht.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/soapht.c 2023-05-29 13:58:10.977395167 +0200
+@@ -136,7 +136,7 @@ static int get_ip_data(struct soap_sessi
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -435,7 +435,7 @@ static struct soap_session *create_sessi
+
+ if ((ps = malloc(sizeof(struct soap_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct soap_session));
+@@ -459,7 +459,7 @@ SANE_Status soapht_open(SANE_String_Cons
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -475,7 +475,7 @@ SANE_Status soapht_open(SANE_String_Cons
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -554,7 +554,7 @@ void soapht_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -904,7 +904,7 @@ SANE_Status soapht_control_option(SANE_H
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -946,7 +946,7 @@ SANE_Status soapht_start(SANE_Handle han
+
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -1032,7 +1032,7 @@ SANE_Status soapht_start(SANE_Handle han
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -1075,7 +1075,7 @@ SANE_Status soapht_start(SANE_Handle han
+
+ if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ stat = SANE_STATUS_IO_ERROR;
+ goto bugout;
+ }
+@@ -1124,7 +1124,7 @@ SANE_Status soapht_read(SANE_Handle hand
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
diff --git a/source/ap/hplip/hplip-hpaio-gcc14.patch b/source/ap/hplip/hplip-hpaio-gcc14.patch
new file mode 100644
index 000000000..f7d195ed1
--- /dev/null
+++ b/source/ap/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/source/ap/hplip/hplip-pcardext-disable.patch b/source/ap/hplip/hplip-pcardext-disable.patch
new file mode 100644
index 000000000..c16fb5a25
--- /dev/null
+++ b/source/ap/hplip/hplip-pcardext-disable.patch
@@ -0,0 +1,16 @@
+--- ./Makefile.am.orig 2024-05-10 18:14:51.431337550 -0500
++++ ./Makefile.am 2024-05-10 18:15:37.078338571 -0500
+@@ -306,13 +306,6 @@
+ pcarddir = $(hplipdir)/pcard
+ dist_pcard_DATA = pcard/__init__.py pcard/photocard.py
+
+-# pcardext
+-pcardextdir = $(pyexecdir)
+-pcardext_LTLIBRARIES = pcardext.la
+-pcardext_la_LDFLAGS = -module -avoid-version
+-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h
+-pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
+-
+ # prnt
+ prntdir = $(hplipdir)/prnt
+ dist_prnt_DATA = prnt/cups.py prnt/__init__.py prnt/ldl.py prnt/pcl.py prnt/colorcal.py
diff --git a/source/ap/hplip/hplip-pserror-c99.patch b/source/ap/hplip/hplip-pserror-c99.patch
new file mode 100644
index 000000000..747af3abf
--- /dev/null
+++ b/source/ap/hplip/hplip-pserror-c99.patch
@@ -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 */
+
diff --git a/source/ap/hplip/hplip-scan-hpaio-include.patch b/source/ap/hplip/hplip-scan-hpaio-include.patch
new file mode 100644
index 000000000..79d1d94b7
--- /dev/null
+++ b/source/ap/hplip/hplip-scan-hpaio-include.patch
@@ -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"
+
+
diff --git a/source/ap/hplip/hplip-scan-orblite-c99.patch b/source/ap/hplip/hplip-scan-orblite-c99.patch
new file mode 100644
index 000000000..c921f22f1
--- /dev/null
+++ b/source/ap/hplip/hplip-scan-orblite-c99.patch
@@ -0,0 +1,21 @@
+diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
+index ba86640..2eb7aba 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"
+
+@@ -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);
diff --git a/source/ap/hplip/hplip.SlackBuild b/source/ap/hplip/hplip.SlackBuild
index 682377996..c39b0f047 100755
--- a/source/ap/hplip/hplip.SlackBuild
+++ b/source/ap/hplip/hplip.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+#SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -86,6 +89,16 @@ zcat $CWD/hplip.python3.shebang.diff.gz | patch -p1 --verbose || exit 1
# Fix the desktop file to show correct icon and category
zcat $CWD/fix-desktop-file.patch.gz | patch -p1 --verbose || exit 1
+# GCC 14 fixes:
+cat $CWD/hplip-pserror-c99.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-hpaio-gcc14.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-covscan.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-scan-orblite-c99.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-scan-hpaio-include.patch | patch -p1 --verbose || exit 1
+
+# This extension was never ported to python3:
+cat $CWD/hplip-pcardext-disable.patch | patch -p1 --verbose || exit 1
+
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
unset SHADOW_OPTIONS
@@ -203,4 +216,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/libx86/libx86.SlackBuild b/source/ap/libx86/libx86.SlackBuild
index cbf9f9867..2c6dfcd0f 100755
--- a/source/ap/libx86/libx86.SlackBuild
+++ b/source/ap/libx86/libx86.SlackBuild
@@ -64,6 +64,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion -Wno-error=incompatible-pointer-types"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/ap/mc/bogus.cflags.diff b/source/ap/mc/bogus.cflags.diff
new file mode 100644
index 000000000..0fec13e7f
--- /dev/null
+++ b/source/ap/mc/bogus.cflags.diff
@@ -0,0 +1,10 @@
+--- ./m4.include/mc-cflags.m4.orig 2024-01-20 13:34:38.000000000 -0600
++++ ./m4.include/mc-cflags.m4 2024-05-08 12:42:18.326695150 -0500
+@@ -57,7 +57,6 @@
+ AX_APPEND_COMPILE_FLAGS([-Wmissing-format-attribute], [mc_configured_cflags], [$EXTRA_OPTION])
+ AX_APPEND_COMPILE_FLAGS([-Wmissing-parameter-type], [mc_configured_cflags], [$EXTRA_OPTION])
+ AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes], [mc_configured_cflags], [$EXTRA_OPTION])
+- AX_APPEND_COMPILE_FLAGS([-Wmissing-variable-declarations], [mc_configured_cflags], [$EXTRA_OPTION])
+ AX_APPEND_COMPILE_FLAGS([-Wnested-externs], [mc_configured_cflags], [$EXTRA_OPTION])
+ AX_APPEND_COMPILE_FLAGS([-Wno-long-long], [mc_configured_cflags], [$EXTRA_OPTION])
+ AX_APPEND_COMPILE_FLAGS([-Wno-unreachable-code], [mc_configured_cflags], [$EXTRA_OPTION])
diff --git a/source/ap/mc/mc.SlackBuild b/source/ap/mc/mc.SlackBuild
index 19082a848..71d9107b6 100755
--- a/source/ap/mc/mc.SlackBuild
+++ b/source/ap/mc/mc.SlackBuild
@@ -73,9 +73,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-if [ ! -x ./configure ]; then
- ./autogen.sh
-fi
+cat $CWD/bogus.cflags.diff | patch -p1 --verbose || exit 1
+autoreconf -vif
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/ap/rzip/rzip.SlackBuild b/source/ap/rzip/rzip.SlackBuild
index 716b98ec0..352efbce2 100755
--- a/source/ap/rzip/rzip.SlackBuild
+++ b/source/ap/rzip/rzip.SlackBuild
@@ -55,6 +55,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-rzip
diff --git a/source/ap/sc-im/sc-im.SlackBuild b/source/ap/sc-im/sc-im.SlackBuild
index b48e8fa7f..b9f380143 100755
--- a/source/ap/sc-im/sc-im.SlackBuild
+++ b/source/ap/sc-im/sc-im.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+export CFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/ap/sc/sc.SlackBuild b/source/ap/sc/sc.SlackBuild
index 77f5cbf98..b815dd55f 100755
--- a/source/ap/sc/sc.SlackBuild
+++ b/source/ap/sc/sc.SlackBuild
@@ -87,6 +87,7 @@ find . \
# Old software, modern compiler:
zcat $CWD/sc-7.16-3.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/sc.gcc14.diff.gz | patch -p1 --verbose || exit 1
# Build:
make $NUMJOBS || exit 1
diff --git a/source/ap/sc/sc.gcc14.diff b/source/ap/sc/sc.gcc14.diff
new file mode 100644
index 000000000..25c9f1e0b
--- /dev/null
+++ b/source/ap/sc/sc.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.orig 2024-05-11 16:51:27.919158388 -0500
++++ ./Makefile 2024-05-11 16:53:10.235160676 -0500
+@@ -336,7 +336,7 @@
+ # real effect on the reliability of the program, but may concern some
+ # people who don't understand them.
+ #CFLAGS=-DSYSV3 -O2 -Wall -pipe
+-CFLAGS=-DSYSV3 -O2 -pipe
++CFLAGS=-DSYSV3 -O2 -pipe -Wno-error=implicit-function-declaration -Wno-error=implicit-int
+ LIB=-lm -lncurses
+
+ # All of the source files
diff --git a/source/ap/seejpeg/seejpeg.SlackBuild b/source/ap/seejpeg/seejpeg.SlackBuild
index cb3ba4adb..6bb06e2a1 100755
--- a/source/ap/seejpeg/seejpeg.SlackBuild
+++ b/source/ap/seejpeg/seejpeg.SlackBuild
@@ -73,7 +73,7 @@ find . \
( cd libjpeg-6a ; ./configure ; make || exit 1 ) || exit 1
ln -sf libjpeg-6a jpeglib
-make seejpeg || exit 1
+CFLAGS="-Wno-error=incompatible-pointer-types" make seejpeg || exit 1
strip seejpeg
cat seejpeg > $PKG/usr/bin/seejpeg
@@ -89,4 +89,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/seejpeg-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/sox/sox.SlackBuild b/source/ap/sox/sox.SlackBuild
index fa8c4d363..2cc0fb7ce 100755
--- a/source/ap/sox/sox.SlackBuild
+++ b/source/ap/sox/sox.SlackBuild
@@ -52,6 +52,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
# If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
TAG="_alsa"
diff --git a/source/ap/vorbis-tools/vorbis-tools.SlackBuild b/source/ap/vorbis-tools/vorbis-tools.SlackBuild
index 7f23e008e..41d813480 100755
--- a/source/ap/vorbis-tools/vorbis-tools.SlackBuild
+++ b/source/ap/vorbis-tools/vorbis-tools.SlackBuild
@@ -69,6 +69,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
diff --git a/source/ap/zsh/0007-zsh-configure-c99.patch b/source/ap/zsh/0007-zsh-configure-c99.patch
new file mode 100644
index 000000000..c4b36231b
--- /dev/null
+++ b/source/ap/zsh/0007-zsh-configure-c99.patch
@@ -0,0 +1,44 @@
+Avoid incompatible pointer types in terminfo global variable checks.
+Some compilers reject these incompatible pointer types, causing the
+checks to always fail, when these variables are in fact available.
+
+Submitted upstream: <https://www.zsh.org/mla/workers/2023/msg01112.html>
+
+diff --git a/configure.ac b/configure.ac
+index a58242f453b4a8f3..5534f42df14eb28c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then
+ fi
+
+ AC_MSG_CHECKING(if boolcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
+ AC_MSG_RESULT($boolcodes)
+
+ AC_MSG_CHECKING(if numcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
+ AC_MSG_RESULT($numcodes)
+
+ AC_MSG_CHECKING(if strcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
+ AC_MSG_RESULT($strcodes)
+
+ AC_MSG_CHECKING(if boolnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
+ AC_MSG_RESULT($boolnames)
+
+ AC_MSG_CHECKING(if numnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
+ AC_MSG_RESULT($numnames)
+
+ AC_MSG_CHECKING(if strnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
+ AC_MSG_RESULT($strnames)
+
+ dnl There are apparently defective terminal library headers on some
diff --git a/source/ap/zsh/zsh.SlackBuild b/source/ap/zsh/zsh.SlackBuild
index 3a5aa5c69..361b365ab 100755
--- a/source/ap/zsh/zsh.SlackBuild
+++ b/source/ap/zsh/zsh.SlackBuild
@@ -77,6 +77,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+cat $CWD/0007-zsh-configure-c99.patch | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \