[packages/calibre] add upstream patch to fix build with gcc 15

atler atler at pld-linux.org
Sat Jan 24 21:36:07 CET 2026


commit 9a42e943a489796a899e4552b6b2a978b11b2385
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Jan 24 21:33:06 2026 +0100

    add upstream patch to fix build with gcc 15

 calibre.spec |  2 ++
 gcc15.patch  | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
---
diff --git a/calibre.spec b/calibre.spec
index f9a4610..9002c70 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -25,6 +25,7 @@ Patch2:		shebang-python-fix.patch
 Patch3:		desktop-integration.patch
 Patch4:		%{name}-env_module.patch
 Patch5:		icu75.patch
+Patch6:		gcc15.patch
 %define		baeutifulsoup_ver 3.0.5
 %define		pil_ver 1.1.6
 %define		pyqt6_ver 6.3.1
@@ -184,6 +185,7 @@ Pakiet ten dostarcza uzupełnianie nazw dla calibre w powłoce zsh.
 %patch -P3 -p1
 %patch -P4 -p1
 %patch -P5 -p1
+%patch -P6 -p1
 
 # 64bit target build fix
 %{__sed} -i -e "s!'/usr/lib'!'%{_libdir}'!g" setup/build_environment.py
diff --git a/gcc15.patch b/gcc15.patch
new file mode 100644
index 0000000..3bf2550
--- /dev/null
+++ b/gcc15.patch
@@ -0,0 +1,25 @@
+From c04bd03a68ed0582c3522401e8c7e5ae94c7bfde Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek at in.waw.pl>
+Date: Sat, 18 Jan 2025 13:49:36 +0100
+Subject: [PATCH] Fix build with -std=gnu23
+
+Gcc 15 defaults to gnu23, which makes bool a native type, so
+it cannot be redefined like this.
+---
+ src/calibre/ebooks/djvu/bzzdecoder.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/calibre/ebooks/djvu/bzzdecoder.c b/src/calibre/ebooks/djvu/bzzdecoder.c
+index d74a8ddc022b..ac27af7fed0e 100644
+--- a/src/calibre/ebooks/djvu/bzzdecoder.c
++++ b/src/calibre/ebooks/djvu/bzzdecoder.c
+@@ -21,7 +21,9 @@
+ #define STRFY2(x) STRFY(x)
+ #define CORRUPT PyErr_SetString(PyExc_ValueError, "Corrupt bitstream at line: " STRFY2(__LINE__))
+ 
++#if __STDC_VERSION__ < 202311L
+ typedef uint8_t bool;
++#endif
+ 
+ typedef struct Table {
+     uint16_t p;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/calibre.git/commitdiff/4d9f85f33cd50c9fb6a34fff88395c5a76328b70



More information about the pld-cvs-commit mailing list