From 6656fc08728a0295c84880dab689e0e9c8f93f8a Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 Apr 2026 00:03:56 +0200 Subject: [PATCH 01/31] calibre: update to 9.6.0. --- .../calibre/patches/disable-piper-env.patch | 17 +++ srcpkgs/calibre/patches/disable-piper.patch | 17 +++ .../calibre/patches/py313-re-scanner.patch | 106 ------------------ srcpkgs/calibre/patches/qt610.patch | 11 -- srcpkgs/calibre/template | 20 ++-- 5 files changed, 44 insertions(+), 127 deletions(-) create mode 100644 srcpkgs/calibre/patches/disable-piper-env.patch create mode 100644 srcpkgs/calibre/patches/disable-piper.patch delete mode 100644 srcpkgs/calibre/patches/py313-re-scanner.patch delete mode 100644 srcpkgs/calibre/patches/qt610.patch diff --git a/srcpkgs/calibre/patches/disable-piper-env.patch b/srcpkgs/calibre/patches/disable-piper-env.patch new file mode 100644 index 00000000000000..7995ecde5ea11b --- /dev/null +++ b/srcpkgs/calibre/patches/disable-piper-env.patch @@ -0,0 +1,17 @@ +--- a/setup/build_environment.py ++++ b/setup/build_environment.py +@@ -220,10 +220,10 @@ elif ismacos: + uchardet_inc_dirs = pkgconfig_include_dirs('uchardet', '', '/usr/include/uchardet') + uchardet_lib_dirs = pkgconfig_lib_dirs('uchardet', '', '/usr/lib') + uchardet_libs = pkgconfig_libs('uchardet', '', '') +- piper_inc_dirs = pkgconfig_include_dirs('espeak-ng', '', '/usr/include') + pkgconfig_include_dirs( +- 'libonnxruntime', '', '/usr/include/onnxruntime') +- piper_lib_dirs = pkgconfig_lib_dirs('espeak-ng', '', '/usr/lib') + pkgconfig_lib_dirs('libonnxruntime', '', '/usr/lib') +- piper_libs = pkgconfig_libs('espeak-ng', '', 'espeak-ng') + pkgconfig_libs('libonnxruntime', '', 'onnxruntime') ++ # Piper disabled - requires onnxruntime which is not packaged ++ piper_inc_dirs = [] ++ piper_lib_dirs = [] ++ piper_libs = [] + for x in ('libavcodec', 'libavformat', 'libavdevice', 'libavfilter', 'libavutil', 'libpostproc', 'libswresample', 'libswscale'): + for inc in pkgconfig_include_dirs(x, '', '/usr/include'): + if inc and inc not in ffmpeg_inc_dirs: \ No newline at end of file diff --git a/srcpkgs/calibre/patches/disable-piper.patch b/srcpkgs/calibre/patches/disable-piper.patch new file mode 100644 index 00000000000000..b0e3093b751dfb --- /dev/null +++ b/srcpkgs/calibre/patches/disable-piper.patch @@ -0,0 +1,17 @@ +--- a/setup/extensions.json ++++ b/setup/extensions.json +@@ -135,14 +135,6 @@ + "needs_c++": "17" + }, +- { +- "name": "piper", +- "sources": "calibre/utils/tts/piper.cpp", +- "needs_c++": "17", +- "libraries": "!piper_libs", +- "lib_dirs": "!piper_lib_dirs", +- "inc_dirs": "!piper_inc_dirs" +- }, + { + "name": "html_as_json", + "sources": "calibre/srv/html_as_json.cpp", + "needs_c++": "11" diff --git a/srcpkgs/calibre/patches/py313-re-scanner.patch b/srcpkgs/calibre/patches/py313-re-scanner.patch deleted file mode 100644 index 6ce0f84c6e9bc1..00000000000000 --- a/srcpkgs/calibre/patches/py313-re-scanner.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -Nur a/src/calibre/utils/_py313_scanner.py b/src/calibre/utils/_py313_scanner.py ---- a/src/calibre/utils/_py313_scanner.py 1969-12-31 19:00:00.000000000 -0500 -+++ b/src/calibre/utils/_py313_scanner.py 2025-12-04 16:43:12.371808182 -0500 -@@ -0,0 +1,52 @@ -+### THIS FILE WAS ADDED SPECIFICALLY TO THE VOID LINUX PACKAGE -+### -+### Python 3.14.1 has restricted the use of re.Scanner to patterns that do not -+### use capturing groups because capturing groups never worked properly and can -+### cause the interpreter to crash. Cf. -+### -+### https://github.com/python/cpython/pull/140944 -+### -+### The Scanner implementation is undocumented and there is some debate how to -+### address programs that rely on this now-missing functionality. Because it -+### seemed to work in calibre, and upstream has not addressed the change, we -+### will just vendor the implementation from Python 3.13 for now. -+ -+from re import _compiler, _parser, RegexFlag -+class Scanner: -+ def __init__(self, lexicon, flags=0): -+ from re._constants import BRANCH, SUBPATTERN -+ if isinstance(flags, RegexFlag): -+ flags = flags.value -+ self.lexicon = lexicon -+ # combine phrases into a compound pattern -+ p = [] -+ s = _parser.State() -+ s.flags = flags -+ for phrase, action in lexicon: -+ gid = s.opengroup() -+ p.append(_parser.SubPattern(s, [ -+ (SUBPATTERN, (gid, 0, 0, _parser.parse(phrase, flags))), -+ ])) -+ s.closegroup(gid, p[-1]) -+ p = _parser.SubPattern(s, [(BRANCH, (None, p))]) -+ self.scanner = _compiler.compile(p) -+ def scan(self, string): -+ result = [] -+ append = result.append -+ match = self.scanner.scanner(string).match -+ i = 0 -+ while True: -+ m = match() -+ if not m: -+ break -+ j = m.end() -+ if i == j: -+ break -+ action = self.lexicon[m.lastindex-1][1] -+ if callable(action): -+ self.match = m -+ action = action(self, m.group()) -+ if action is not None: -+ append(action) -+ i = j -+ return result, string[i:] -diff -Nur a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py ---- a/src/calibre/utils/formatter.py 2025-07-17 23:41:17.000000000 -0400 -+++ b/src/calibre/utils/formatter.py 2025-12-04 16:43:51.782906462 -0500 -@@ -25,6 +25,7 @@ - from calibre.utils.localization import _ - from polyglot.builtins import error_message - -+from ._py313_scanner import Scanner - - class Node: - NODE_RVALUE = 1 -@@ -1690,7 +1691,7 @@ - compress_spaces = re.compile(r'\s+') - backslash_comma_to_comma = re.compile(r'\\,') - -- arg_parser = re.Scanner([ -+ arg_parser = Scanner([ - (r',', lambda x,t: ''), - (r'.*?((?=#|>#)', lambda x,t: (_Parser.LEX_NUMERIC_INFIX, t)), - (r'(==|!=|<=|<|>=|>)', lambda x,t: (_Parser.LEX_STRING_INFIX, t)), - (r'(if|then|else|elif|fi)\b',lambda x,t: (_Parser.LEX_KEYWORD, t)), -diff -Nur a/src/calibre/utils/search_query_parser.py b/src/calibre/utils/search_query_parser.py ---- a/src/calibre/utils/search_query_parser.py 2025-07-17 23:41:17.000000000 -0400 -+++ b/src/calibre/utils/search_query_parser.py 2025-12-04 16:44:16.500968101 -0500 -@@ -28,6 +28,8 @@ - from polyglot.binary import as_hex_unicode, from_hex_unicode - from polyglot.builtins import codepoint_to_chr - -+from ._py313_scanner import Scanner -+ - ''' - This class manages access to the preference holding the saved search queries. - It exists to ensure that unicode is used throughout, and also to permit -@@ -157,7 +159,7 @@ - docstring_sep = '□ༀ؆' # Unicode white square, Tibetian Om, Arabic-Indic Cube Root - - # Had to translate named constants to numeric values -- lex_scanner = re.Scanner([ -+ lex_scanner = Scanner([ - (r'[()]', lambda x,t: (Parser.OPCODE, t)), - (r'@.+?:[^")\s]+', lambda x,t: (Parser.WORD, str(t))), - (r'[^"()\s]+', lambda x,t: (Parser.WORD, str(t))), diff --git a/srcpkgs/calibre/patches/qt610.patch b/srcpkgs/calibre/patches/qt610.patch deleted file mode 100644 index da5490bebcd9b8..00000000000000 --- a/srcpkgs/calibre/patches/qt610.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/calibre/headless/CMakeLists.txt -+++ b/src/calibre/headless/CMakeLists.txt -@@ -1,7 +1,7 @@ - cmake_minimum_required(VERSION 3.21) - project(headless) - set(CMAKE_AUTOMOC ON) --find_package(Qt6Gui REQUIRED) -+find_package(Qt6 REQUIRED COMPONENTS Gui GuiPrivate Core CorePrivate) - add_library(headless MODULE main.cpp headless_backingstore.cpp headless_integration.cpp) - set_property(TARGET headless PROPERTY QT_PLUGIN_TYPE "platforms") - set_property(TARGET headless PROPERTY QT_PLUGIN_CLASS_NAME "HeadlessIntegrationPlugin") diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 60ff0f4f43a325..4141c43bdd631b 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre -version=8.7.0 -revision=4 +version=9.6.0 +revision=1 build_helper=python3 pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow @@ -11,13 +11,13 @@ hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow mathjax liberation-fonts-ttf python3-zeroconf xdg-utils rapydscript-ng python3-PyQt-builder python3-Markdown python3-xxhash" makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel - libpodofo-devel libwmf-devel libxkbcommon-devel poppler-cpp-devel - freetype-devel uchardet-devel openssl-devel icu-devel libusb-devel - sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel - python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network - python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel - qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel - ffmpeg6-devel" + libpodofo-devel libwmf-devel libxkbcommon-devel poppler-cpp-devel + freetype-devel uchardet-devel openssl-devel icu-devel libusb-devel + sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel + python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network + python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel + qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel + ffmpeg6-devel" depends="desktop-file-utils optipng poppler python3-BeautifulSoup4 qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw @@ -39,7 +39,7 @@ license="GPL-3.0-only" homepage="https://calibre-ebook.com" changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.txt" distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz" -checksum=2cfe587e3773d8607fe8bbefbcd77b5cfb816124cac89e491353deb8f2fa9324 +checksum=c4d740d50a0c2e38ac33af10e815366cbd2d0846a06dafca3008eaafe2f09bea python_version=3 lib32disabled=yes nocross="python3 setup.py gui" From 3948628fd25bfc3ce680410de9f987101d6b0831 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 Apr 2026 00:04:00 +0200 Subject: [PATCH 02/31] scribus: update to 1.6.5. --- srcpkgs/scribus/patches/poppler-25.06.patch | 17 --- srcpkgs/scribus/patches/poppler-25.07.patch | 30 ----- srcpkgs/scribus/patches/poppler-25.09.patch | 128 -------------------- srcpkgs/scribus/patches/poppler-25.10.patch | 98 --------------- srcpkgs/scribus/template | 6 +- 5 files changed, 3 insertions(+), 276 deletions(-) delete mode 100644 srcpkgs/scribus/patches/poppler-25.06.patch delete mode 100644 srcpkgs/scribus/patches/poppler-25.07.patch delete mode 100644 srcpkgs/scribus/patches/poppler-25.09.patch delete mode 100644 srcpkgs/scribus/patches/poppler-25.10.patch diff --git a/srcpkgs/scribus/patches/poppler-25.06.patch b/srcpkgs/scribus/patches/poppler-25.06.patch deleted file mode 100644 index 07633fbf1ecc92..00000000000000 --- a/srcpkgs/scribus/patches/poppler-25.06.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp -index 4518fa4..8214243 100644 ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -606,7 +606,12 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, - FormWidget *fm = m_formWidgets->getWidget(i); - if (!fm) - continue; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 06, 0) -+ std::shared_ptr anoSharedPtr = fm->getWidgetAnnotation(); -+ AnnotWidget* ano = anoSharedPtr.get(); -+#else - AnnotWidget *ano = fm->getWidgetAnnotation(); -+#endif - if (!ano) - continue; - if (ano != (AnnotWidget*) annota) diff --git a/srcpkgs/scribus/patches/poppler-25.07.patch b/srcpkgs/scribus/patches/poppler-25.07.patch deleted file mode 100644 index a04b0b4058ff96..00000000000000 --- a/srcpkgs/scribus/patches/poppler-25.07.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -3255,7 +3255,12 @@ void SlaOutputDev::updateFont(GfxState * - break; - case fontTrueType: - case fontTrueTypeOT: --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0) -+ if (!fileName.empty()) -+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); -+ else -+ ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum); -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) - if (!fileName.empty()) - ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); - else -@@ -3400,7 +3405,12 @@ void SlaOutputDev::updateFont(GfxState * - #endif - else - { --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0) -+ if (!fileName.empty()) -+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); -+ else -+ ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum); -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) - if (!fileName.empty()) - ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); - else diff --git a/srcpkgs/scribus/patches/poppler-25.09.patch b/srcpkgs/scribus/patches/poppler-25.09.patch deleted file mode 100644 index 920df1d5f7bf95..00000000000000 --- a/srcpkgs/scribus/patches/poppler-25.09.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -1480,14 +1480,27 @@ void SlaOutputDev::restoreState(GfxState - m_graphicStack.restore(); - } - --void SlaOutputDev::beginTransparencyGroup(GfxState *state, const double *bbox, GfxColorSpace * /*blendingColorSpace*/, bool isolated, bool knockout, bool forSoftMask) -+void SlaOutputDev::beginTransparencyGroup(GfxState *state, -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+ const std::array &bbox, -+#else -+ const double *bbox, -+#endif -+ GfxColorSpace * /*blendingColorSpace*/, -+ bool isolated, -+ bool knockout, -+ bool forSoftMask) - { - // qDebug() << "SlaOutputDev::beginTransparencyGroup isolated:" << isolated << "knockout:" << knockout << "forSoftMask:" << forSoftMask; - pushGroup("", forSoftMask); - m_groupStack.top().isolated = isolated; - } - -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+void SlaOutputDev::paintTransparencyGroup(GfxState *state, const std::array &bbox) -+#else - void SlaOutputDev::paintTransparencyGroup(GfxState *state, const double *bbox) -+#endif - { - // qDebug() << "SlaOutputDev::paintTransparencyGroup"; - if (m_groupStack.count() != 0) -@@ -1586,7 +1599,15 @@ void SlaOutputDev::endTransparencyGroup( - m_tmpSel->clear(); - } - --void SlaOutputDev::setSoftMask(GfxState * /*state*/, const double * bbox, bool alpha, Function *transferFunc, GfxColor * /*backdropColor*/) -+void SlaOutputDev::setSoftMask(GfxState * /*state*/, -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+ const std::array &bbox, -+#else -+ const double * bbox, -+#endif -+ bool alpha, -+ Function *transferFunc, -+ GfxColor * /*backdropColor*/) - { - if (m_groupStack.count() <= 0) - return; -@@ -2341,7 +2362,9 @@ bool SlaOutputDev::patchMeshShadedFill(G - return true; - } - --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, GfxTilingPattern *tPat, const std::array &mat, int x0, int y0, int x1, int y1, double xStep, double yStep) -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) - bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) - #else - bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, const double *pmat, int /*paintType*/, int /*tilingType*/, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) -@@ -2349,8 +2372,8 @@ bool SlaOutputDev::tilingPatternFill(Gfx - { - // qDebug() << "SlaOutputDev::tilingPatternFill"; - #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) -- const double *bbox = tPat->getBBox(); -- const double *pmat = tPat->getMatrix(); -+ const auto &bbox = tPat->getBBox(); -+ const auto &pmat = tPat->getMatrix(); - Dict *resDict = tPat->getResDict(); - #endif - -@@ -3835,7 +3858,7 @@ QString SlaOutputDev::getAnnotationColor - return CommonStrings::None; - if (color->getSpace() == AnnotColor::colorRGB) - { -- const double *color_data = color->getValues(); -+ const auto &color_data = color->getValues(); - double Rc = color_data[0]; - double Gc = color_data[1]; - double Bc = color_data[2]; -@@ -3844,7 +3867,7 @@ QString SlaOutputDev::getAnnotationColor - } - else if (color->getSpace() == AnnotColor::colorCMYK) - { -- const double *color_data = color->getValues(); -+ const auto &color_data = color->getValues(); - double Cc = color_data[0]; - double Mc = color_data[1]; - double Yc = color_data[2]; -@@ -3854,7 +3877,7 @@ QString SlaOutputDev::getAnnotationColor - } - else if (color->getSpace() == AnnotColor::colorGray) - { -- const double *color_data = color->getValues(); -+ const auto &color_data = color->getValues(); - double Kc = 1.0 - color_data[0]; - tmp.setCmykColorF(0, 0, 0, Kc); - fNam = m_doc->PageColors.tryAddColor(namPrefix+tmp.name(), tmp); ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -199,7 +199,9 @@ public: - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+ bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const std::array &mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override; -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) - bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override; - #else - bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) override; -@@ -262,10 +264,16 @@ public: - bool maskInvert, bool maskInterpolate) override; - - //----- transparency groups and soft masks -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0) -+ void beginTransparencyGroup(GfxState *state, const std::array &bbox, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) override; -+ void paintTransparencyGroup(GfxState *state, const std::array &bbox) override; -+ void setSoftMask(GfxState * /*state*/, const std::array & /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override; -+#else - void beginTransparencyGroup(GfxState *state, const double *bbox, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) override; - void paintTransparencyGroup(GfxState *state, const double *bbox) override; -- void endTransparencyGroup(GfxState *state) override; - void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override; -+#endif -+ void endTransparencyGroup(GfxState *state) override; - void clearSoftMask(GfxState * /*state*/) override; - - void updateFillColor(GfxState *state) override; diff --git a/srcpkgs/scribus/patches/poppler-25.10.patch b/srcpkgs/scribus/patches/poppler-25.10.patch deleted file mode 100644 index 769d3ebd744e46..00000000000000 --- a/srcpkgs/scribus/patches/poppler-25.10.patch +++ /dev/null @@ -1,98 +0,0 @@ ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -33,6 +33,14 @@ for which a new license (GPL+exception) - - namespace - { -+std::size_t goo_string_len(const GooString *str) -+{ -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 10, 0) -+ return str->size(); -+#else -+ return str->getLength(); -+#endif -+} - // Compute the intersection of two paths while considering the fillrule of each of them. - // QPainterPath has the right interface to do the operation but is currently buggy. - // See for example https://bugreports.qt.io/browse/QTBUG-83102. Thus this function -@@ -4080,25 +4088,25 @@ void SlaOutputDev::pushGroup(const QStri - - QString SlaOutputDev::UnicodeParsedString(const GooString *s1) const - { -- if (!s1 || s1->getLength() == 0) -+ if (!s1 || goo_string_len(s1) == 0) - return QString(); - bool isUnicode; - int i; - Unicode u; - QString result; -- if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getLength() > 1 && (s1->getChar(1) & 0xff) == 0xff)) -+ if ((s1->getChar(0) & 0xff) == 0xfe && (goo_string_len(s1) > 1 && (s1->getChar(1) & 0xff) == 0xff)) - { - isUnicode = true; - i = 2; -- result.reserve((s1->getLength() - 2) / 2); -+ result.reserve((goo_string_len(s1) - 2) / 2); - } - else - { - isUnicode = false; - i = 0; -- result.reserve(s1->getLength()); -+ result.reserve(goo_string_len(s1)); - } -- while (i < s1->getLength()) -+ while (i < goo_string_len(s1)) - { - if (isUnicode) - { ---- a/scribus/plugins/import/pdf/importpdf.cpp -+++ b/scribus/plugins/import/pdf/importpdf.cpp -@@ -65,6 +65,16 @@ for which a new license (GPL+exception) - #include "ui/multiprogressdialog.h" - #include "ui/propertiespalette.h" - -+static inline -+std::size_t goo_string_len(const GooString *str) -+{ -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 10, 0) -+ return str->size(); -+#else -+ return str->getLength(); -+#endif -+} -+ - PdfPlug::PdfPlug(ScribusDoc* doc, int flags) - { - m_tmpSele = new Selection(this, false); -@@ -928,25 +938,25 @@ QRectF PdfPlug::getCBox(int box, int pgN - - QString PdfPlug::UnicodeParsedString(const GooString *s1) - { -- if (!s1 || s1->getLength() == 0) -+ if (!s1 || goo_string_len(s1) == 0) - return QString(); - bool isUnicode; - int i; - Unicode u; - QString result; -- if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getLength() > 1 && (s1->getChar(1) & 0xff) == 0xff)) -+ if ((s1->getChar(0) & 0xff) == 0xfe && (goo_string_len(s1) > 1 && (s1->getChar(1) & 0xff) == 0xff)) - { - isUnicode = true; - i = 2; -- result.reserve((s1->getLength() - 2) / 2); -+ result.reserve((goo_string_len(s1) - 2) / 2); - } - else - { - isUnicode = false; - i = 0; -- result.reserve(s1->getLength()); -+ result.reserve(goo_string_len(s1)); - } -- while (i < s1->getLength()) -+ while (i < goo_string_len(s1)) - { - if (isUnicode) - { diff --git a/srcpkgs/scribus/template b/srcpkgs/scribus/template index ad35009108435a..400e597a4ddb40 100644 --- a/srcpkgs/scribus/template +++ b/srcpkgs/scribus/template @@ -1,7 +1,7 @@ # Template file for 'scribus' pkgname=scribus -version=1.6.4 -revision=5 +version=1.6.5 +revision=1 build_style=cmake configure_args="-DWANT_DISTROBUILD=ON -DQT_PREFIX=${XBPS_CROSS_BASE}/usr -DWANT_GRAPHICSMAGICK=1 -DWANT_CPP20=ON" @@ -17,7 +17,7 @@ maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://scribus.net" distfiles="$SOURCEFORGE_SITE/scribus/scribus/${version}/scribus-${version}.tar.xz" -checksum=533be7af03acfaa736ec5f7a3fc2562abd200fef5ca2a7cdee02b5f44d61829e +checksum=09bdb736a8ff8a437191458a36d847cc0adeca0fc059cf696474e0ba6f59ac6a python_version=3 CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" From dd8d7b0ed1fb9a55fcc7f7558328b214a29c0d00 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 Apr 2026 00:04:04 +0200 Subject: [PATCH 03/31] krename: update to 5.0.60. --- srcpkgs/krename/patches/e7dd767a.patch | 90 ------------------ srcpkgs/krename/patches/podofo-0.10.patch | 107 ---------------------- srcpkgs/krename/template | 18 ++-- 3 files changed, 11 insertions(+), 204 deletions(-) delete mode 100644 srcpkgs/krename/patches/e7dd767a.patch delete mode 100644 srcpkgs/krename/patches/podofo-0.10.patch diff --git a/srcpkgs/krename/patches/e7dd767a.patch b/srcpkgs/krename/patches/e7dd767a.patch deleted file mode 100644 index a0ef428ce46b17..00000000000000 --- a/srcpkgs/krename/patches/e7dd767a.patch +++ /dev/null @@ -1,90 +0,0 @@ -Patch-Source: https://invent.kde.org/utilities/krename/-/commit/e7dd767a -From e7dd767a9a1068ee1fe1502c4d619b57d3b12add Mon Sep 17 00:00:00 2001 -From: Andreas Sturmlechner -Date: Fri, 26 May 2023 23:23:10 +0200 -Subject: [PATCH] Fix build with >=exiv2-0.28, raise minimum to 0.27 - -- enables use of EXIV2_TEST_VERSION macro -- exiv2 headers cleanup - -Signed-off-by: Andreas Sturmlechner ---- - CMakeLists.txt | 6 +----- - config-krename.h.cmake | 3 --- - src/exiv2plugin.cpp | 17 +++++------------ - 3 files changed, 6 insertions(+), 20 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0bda8ac..72e7297 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,13 +56,9 @@ set_package_properties(Taglib PROPERTIES - TYPE OPTIONAL) - - # Find exiv2 --find_package(LibExiv2 0.13) # AccessMode was added in 0.13 -+find_package(LibExiv2 0.27) # EXIV2_TEST_VERSION was added in 0.27 - set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL) - --if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27") -- set(HAVE_LIBEXIV2_0_27 TRUE) --endif() -- - # Find podofo - find_package(PoDoFo) - set_package_properties(PoDoFo PROPERTIES -diff --git a/config-krename.h.cmake b/config-krename.h.cmake -index 76c3d30..862e40b 100644 ---- a/config-krename.h.cmake -+++ b/config-krename.h.cmake -@@ -6,9 +6,6 @@ - /* have Exiv2 */ - #cmakedefine01 HAVE_EXIV2 - --/* Defined if we have libexiv2 >= 0.27 */ --#cmakedefine HAVE_LIBEXIV2_0_27 -- - /* have PoDoFo */ - #cmakedefine01 HAVE_PODOFO - -diff --git a/src/exiv2plugin.cpp b/src/exiv2plugin.cpp -index 5694d8c..25e8869 100644 ---- a/src/exiv2plugin.cpp -+++ b/src/exiv2plugin.cpp -@@ -3,20 +3,9 @@ - - #include "exiv2plugin.h" - --#include "../config-krename.h" -- - #include - --#include --#include --#include --#include --#ifdef HAVE_LIBEXIV2_0_27 -- #include --#else -- #include --#endif --#include -+#include - - #include "batchrenamer.h" - #include "tokenhelpdialog.h" -@@ -381,7 +370,11 @@ QString Exiv2Plugin::processFile(BatchRenamer *b, int index, const QString &file - std::string strFilename(asc.constData(), asc.length()); - - try { -+#if EXIV2_TEST_VERSION(0,28,0) -+ Image::UniquePtr image = Exiv2::ImageFactory::open(strFilename); -+#else - Image::AutoPtr image = Exiv2::ImageFactory::open(strFilename); -+#endif - if (image.get() != nullptr && image->good()) { - image->readMetadata(); - --- -GitLab - diff --git a/srcpkgs/krename/patches/podofo-0.10.patch b/srcpkgs/krename/patches/podofo-0.10.patch deleted file mode 100644 index 4cb7751408d207..00000000000000 --- a/srcpkgs/krename/patches/podofo-0.10.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 056d614dc2166cd25749caf264b1b4d9d348f4d4 Mon Sep 17 00:00:00 2001 -From: Antonio Rojas -Date: Mon, 17 Jul 2023 20:29:37 +0000 -Subject: [PATCH] Support podofo 0.10 - -Version 0.10 of podofo is a complete rewrite. krename's use of it is minimal, so porting is easy. - -Switch the cmake module to use pkgconfig, which is available since 0.9.5 (release in 2017). - -Unfortunately, the hack to find the version number is still needed, since the pc file is buggy and ships an empty "Version" field. ---- - cmake/modules/FindPoDoFo.cmake | 31 +++++++++++++++---------------- - src/podofoplugin.cpp | 20 ++++++++++++++++++++ - 2 files changed, 35 insertions(+), 16 deletions(-) - ---- a/cmake/modules/FindPoDoFo.cmake -+++ b/cmake/modules/FindPoDoFo.cmake -@@ -36,15 +36,8 @@ - # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --find_path(PoDoFo_INCLUDE_DIRS -- NAMES podofo/podofo.h --) --find_library(PoDoFo_LIBRARIES -- NAMES libpodofo podofo --) -- --include(FindPackageHandleStandardArgs) --find_package_handle_standard_args(PoDoFo DEFAULT_MSG PoDoFo_LIBRARIES PoDoFo_INCLUDE_DIRS) -+include(FindPkgConfig) -+pkg_search_module(PoDoFo libpodofo libpodofo-0) - - set(PoDoFo_DEFINITIONS) - if(PoDoFo_FOUND) -@@ -61,17 +54,19 @@ if(PoDoFo_FOUND) - endif() - endif() - -- # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public -- # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will -- # hopefully be released soon with 0.9.6. Note that krename doesn't use -- # OpenSSL in any way. -- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$") -- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$") -- file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$") -+ find_file(PoDoFo_CONFIG podofo_config.h PATHS ${PoDoFo_INCLUDE_DIRS} PATH_SUFFIXES auxiliary base) -+ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$") -+ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$") -+ file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$") - string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MAJOR_VER "${PoDoFo_MAJOR_VER_LINE}") - string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MINOR_VER "${PoDoFo_MINOR_VER_LINE}") - string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+([0-9]+)$" "\\1" PoDoFo_PATCH_VER "${PoDoFo_PATCH_VER_LINE}") - set(PoDoFo_VERSION "${PoDoFo_MAJOR_VER}.${PoDoFo_MINOR_VER}.${PoDoFo_PATCH_VER}") -+ -+ # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public -+ # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will -+ # hopefully be released soon with 0.9.6. Note that krename doesn't use -+ # OpenSSL in any way. - if(PoDoFo_VERSION VERSION_EQUAL "0.9.5") - find_package(OpenSSL) - if (OpenSSL_FOUND) -@@ -84,4 +79,8 @@ if(PoDoFo_FOUND) - endif() - endif() - -+if(PoDoFo_VERSION VERSION_GREATER_EQUAL 0.10.0) -+ set(CMAKE_CXX_STANDARD 17) -+endif() -+ - mark_as_advanced(PoDoFo_INCLUDE_DIRS PoDoFo_LIBRARIES PoDoFo_DEFINITIONS) ---- a/src/podofoplugin.cpp -+++ b/src/podofoplugin.cpp -@@ -61,6 +61,25 @@ QString PodofoPlugin::processFile(BatchR - try { - PdfMemDocument doc; - doc.Load(filename.toUtf8().data()); -+#if (PODOFO_VERSION_MINOR>=10 || PODOFO_VERSION_MAJOR>=1) -+ const PdfInfo *info = doc.GetInfo(); -+ -+ if (token == "pdfauthor") { -+ return info->GetAuthor().has_value() ? QString::fromUtf8(info->GetAuthor()->GetString().c_str()) : QString(); -+ } else if (token == "pdfcreator") { -+ return info->GetCreator().has_value() ? QString::fromUtf8(info->GetCreator()->GetString().c_str()) : QString(); -+ } else if (token == "pdfkeywords") { -+ return info->GetKeywords().has_value() ? QString::fromUtf8(info->GetKeywords()->GetString().c_str()) : QString(); -+ } else if (token == "pdfsubject") { -+ return info->GetSubject().has_value() ? QString::fromUtf8(info->GetSubject()->GetString().c_str()) : QString(); -+ } else if (token == "pdftitle") { -+ return info->GetTitle().has_value() ? QString::fromUtf8(info->GetTitle()->GetString().c_str()) : QString(); -+ } else if (token == "pdfproducer") { -+ return info->GetProducer().has_value() ? QString::fromUtf8(info->GetProducer()->GetString().c_str()) : QString(); -+ } else if (token == "pdfpages") { -+ return QString::number(doc.GetPages().GetCount()); -+ } -+#else - PdfInfo *info = doc.GetInfo(); - - if (token == "pdfauthor") { -@@ -78,6 +97,7 @@ QString PodofoPlugin::processFile(BatchR - } else if (token == "pdfpages") { - return QString::number(doc.GetPageCount()); - } -+#endif - } catch (PdfError &error) { - return QString::fromUtf8(error.what()); - } diff --git a/srcpkgs/krename/template b/srcpkgs/krename/template index 2b2079d3d041f5..a108bfc1738909 100644 --- a/srcpkgs/krename/template +++ b/srcpkgs/krename/template @@ -1,14 +1,18 @@ # Template file for 'krename' pkgname=krename -version=5.0.2 -revision=4 +version=5.0.60 +revision=1 +wrksrc="krename-8a0fe463fc35ca176cc5743ba3fecdef4c23d306" build_style=cmake -hostmakedepends="extra-cmake-modules gettext kcoreaddons pkg-config qt5-host-tools qt5-qmake" -makedepends="exiv2-devel freetype-devel kjs-devel kparts-devel libpodofo-devel - taglib-devel" +hostmakedepends="extra-cmake-modules gettext kcoreaddons pkg-config qt6-base" +makedepends="exiv2-devel freetype-devel kf6-karchive-devel kf6-kcompletion-devel + kf6-kconfig-devel kf6-kcoreaddons-devel kf6-kcrash-devel kf6-ki18n-devel + kf6-kiconthemes-devel kf6-kitemviews-devel kf6-kjobwidgets-devel kf6-kio-devel + kf6-kservice-devel kf6-kwidgetsaddons-devel kf6-kxmlgui-devel libpodofo-devel + qt6-base-devel qt6-qt5compat-devel taglib-devel" short_desc="Powerful batch renamer for KDE" maintainer="Piotr Wójcik " license="GPL-2.0-or-later" homepage="https://userbase.kde.org/KRename" -distfiles="${KDE_SITE}/krename/${version}/src/krename-${version}.tar.xz" -checksum=b23c60a7ddd9f6db4dd7f55ac55fcca8a558fa68aaf8fa5cb89e1eaf692f23ed +distfiles="https://invent.kde.org/utilities/krename/-/archive/8a0fe463fc35ca176cc5743ba3fecdef4c23d306/krename-8a0fe463fc35ca176cc5743ba3fecdef4c23d306.tar.gz" +checksum=647fe9d015662a075bb54557a38791b89bb06af948c5ee40ba89c1f71c008668 \ No newline at end of file From 29db4ec87aa8b072a083b97cddd3a46a458ce4bb Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 Apr 2026 00:04:07 +0200 Subject: [PATCH 04/31] horizon: update to 2.7.2. migrate from libpodofo0.9.7 to libpodofo --- srcpkgs/horizon/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template index d8aa9068390847..3c80bf6606c100 100644 --- a/srcpkgs/horizon/template +++ b/srcpkgs/horizon/template @@ -1,11 +1,11 @@ # Template file for 'horizon' pkgname=horizon -version=2.7.1 +version=2.7.2 revision=1 build_style=meson hostmakedepends="pkg-config cmake glib-devel" makedepends="cairomm-devel librsvg-devel sqlite-devel - glm libgit2-devel libcurl-devel occt-devel cppzmq libpodofo0.9.7-devel libzip-devel + glm libgit2-devel libcurl-devel occt-devel cppzmq libpodofo-devel libzip-devel gtkmm-devel libepoxy-devel libsodium-devel libarchive-devel libspnav-devel" short_desc="Free EDA package" maintainer="Érico Nogueira " @@ -13,7 +13,7 @@ license="GPL-3.0-only" homepage="https://horizon-eda.org/" changelog="https://raw.githubusercontent.com/horizon-eda/horizon/master/CHANGELOG.md" distfiles="https://github.com/horizon-eda/horizon/archive/v${version}.tar.gz" -checksum=499102738195691d55570d743ece77422c7fa4cc946f6cb76df956d9ff6ae42f +checksum=6b605f7e4c46d894a64997e0f60eba937e7d68d908b4d715cd2dde3364bd79a2 pre_configure() { # this needs to be set when cross compiling, otherwise meson complains From d6c872e2f8fbda1ee90020b6487cb463fbaa23c8 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 06:48:53 +0200 Subject: [PATCH 05/31] podofo: update to 1.0.3. --- common/shlibs | 2 +- srcpkgs/podofo/template | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/common/shlibs b/common/shlibs index c089f3ac79f5e2..3547a12630fc22 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2715,7 +2715,7 @@ libKF5WidgetsAddons.so.5 kwidgetsaddons-5.26.0_1 libsearpc.so.1 libsearpc-3.0.7_1 libseafile.so.0 seafile-libclient-7.0.10_2 libpodofo.so.0.9.7 libpodofo0.9.7-0.9.7_1 -libpodofo.so.2 libpodofo-0.10.3_1 +libpodofo.so.3 libpodofo-1.0.3_1 libIrcUtil.so.3 libcommuni-3.4.0_1 libIrcCore.so.3 libcommuni-3.4.0_1 libIrcModel.so.3 libcommuni-3.4.0_1 diff --git a/srcpkgs/podofo/template b/srcpkgs/podofo/template index d44c9c609e577f..ab5c4f267e22c2 100644 --- a/srcpkgs/podofo/template +++ b/srcpkgs/podofo/template @@ -1,20 +1,19 @@ # Template file for 'podofo' pkgname=podofo -version=0.10.5 +version=1.0.3 revision=1 build_style=cmake -configure_args="-DPODOFO_BUILD_STATIC=FALSE -DPODOFO_BUILD_TOOLS=TRUE - -DPODOFO_BUILD_TEST=TRUE" +configure_args="-DPODOFO_BUILD_STATIC=FALSE + -DPODOFO_BUILD_UNSUPPORTED_TOOLS=TRUE -DPODOFO_BUILD_TEST=TRUE" hostmakedepends="pkg-config" -makedepends="fontconfig-devel libidn-devel openssl-devel lua53-devel tiff-devel - libxml2-devel zlib-devel libjpeg-turbo-devel libpng-devel freetype-devel" +makedepends="fontconfig-devel openssl-devel tiff-devel libxml2-devel zlib-devel + libjpeg-turbo-devel libpng-devel freetype-devel" short_desc="Library to work with the PDF file format" maintainer="Andrea Brancaleoni " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://github.com/podofo/podofo" distfiles="https://github.com/podofo/podofo/archive/refs/tags/${version}.tar.gz" -checksum=49b159e88ba177ad2561b5cf6cbd68ecbe83272f5488bc527e44f97dbf695273 -# disable_parallel_build=yes +checksum=02815b21a51632c2849d41b067597e9356bbc54bad0efcd84c902b555c203ce7 post_install() { local _f @@ -27,7 +26,7 @@ libpodofo_package() { replaces="podofo<0.9.3_1" short_desc+=" - shared library" pkg_install() { - vmove usr/lib/*.so.* + vmove "usr/lib/*.so.*" } } @@ -38,6 +37,6 @@ libpodofo-devel_package() { vmove usr/include vmove "usr/lib/*.so" vmove usr/lib/pkgconfig - vmove "usr/share/podofo/*.cmake" + vmove usr/lib/cmake } } From 08a15a5505030fec1c5b8845ca8c2bb0d1a14e06 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 08:30:26 +0200 Subject: [PATCH 06/31] calibre: patch for podofo 1.0.x --- srcpkgs/calibre/patches/podofo-1.0.patch | 530 +++++++++++++++++++++++ srcpkgs/calibre/template | 2 +- 2 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/calibre/patches/podofo-1.0.patch diff --git a/srcpkgs/calibre/patches/podofo-1.0.patch b/srcpkgs/calibre/patches/podofo-1.0.patch new file mode 100644 index 00000000000000..3b593c4138128c --- /dev/null +++ b/srcpkgs/calibre/patches/podofo-1.0.patch @@ -0,0 +1,530 @@ +From 964cd9474d97d039ac548640335fcaef17406e96 Mon Sep 17 00:00:00 2001 +From: Andrea Brancaleoni +Date: Sat, 11 Apr 2026 07:56:40 +0200 +Subject: [PATCH] Add podofo 1.0.x support + +--- + src/calibre/utils/podofo/doc.cpp | 51 +++++++++++++++++++------ + src/calibre/utils/podofo/fonts.cpp | 54 ++++++++++++++++++++++----- + src/calibre/utils/podofo/global.h | 43 +++++++++++++++++++++ + src/calibre/utils/podofo/images.cpp | 6 ++- + src/calibre/utils/podofo/impose.cpp | 28 +++++++++++++- + src/calibre/utils/podofo/outline.cpp | 16 ++++++++ + src/calibre/utils/podofo/outlines.cpp | 19 +++++++++- + src/calibre/utils/podofo/utils.cpp | 4 ++ + 8 files changed, 195 insertions(+), 26 deletions(-) + +diff --git a/src/calibre/utils/podofo/doc.cpp b/src/calibre/utils/podofo/doc.cpp +index 0829193f0b..5f3afc2c88 100644 +--- a/src/calibre/utils/podofo/doc.cpp ++++ b/src/calibre/utils/podofo/doc.cpp +@@ -172,7 +172,11 @@ PDFDoc_uncompress_pdf(PDFDoc *self, PyObject *args) { + try { + stream->Unwrap(); + } catch (PdfError& e) { ++#if PODOFO_1_0_OR_LATER ++ if (e.GetCode() != PdfErrorCode::FlateError) throw e; ++#else + if (e.GetCode() != PdfErrorCode::Flate) throw e; ++#endif + } + } + catch (PdfError& e) { +@@ -225,8 +229,8 @@ PDFDoc_image_count(PDFDoc *self, PyObject *args) { + try { + for (auto &it : self->doc->GetObjects()) { + if( it->IsDictionary() ) { +- obj_type = it->GetDictionary().GetKey( PdfName::KeyType ); +- obj_sub_type = it->GetDictionary().GetKey( PdfName::KeySubtype ); ++ obj_type = it->GetDictionary().GetKey( podofo_key_type() ); ++ obj_sub_type = it->GetDictionary().GetKey( podofo_key_subtype() ); + if( ( obj_type && obj_type->IsName() && ( obj_type->GetName().GetString() == "XObject" ) ) || + ( obj_sub_type && obj_sub_type->IsName() && ( obj_sub_type->GetName().GetString() == "Image" ) ) ) count++; + } +@@ -370,7 +374,7 @@ PDFDoc_append(PDFDoc *self, PyObject *args) { + PdfName("MediaBox"), + PdfName("CropBox"), + PdfName("Rotate"), +- PdfName::KeyNull ++ podofo_key_null() + }; + PdfMemDocument *dest = self->doc; + std::vector docs(PyTuple_GET_SIZE(args)); +@@ -416,20 +420,33 @@ PDFDoc_append(PDFDoc *self, PyObject *args) { + auto& dest_page = *x.dest_page; + dest_page.GetDictionary().AddKey("Parent", x.dest_page_parent); + // Set the page contents +- if (auto key = src_page.GetDictionary().GetKeyAs(PdfName::KeyContents); key.IsIndirect()) { ++ if (auto key = src_page.GetDictionary().GetKeyAs(podofo_key_contents()); key.IsIndirect()) { + if (auto search = ref_map.find(key); search != ref_map.end()) { ++#if PODOFO_1_0_OR_LATER ++ dest_page.GetOrCreateContents().Reset(); ++ dest_page.GetDictionary().AddKey(podofo_key_contents(), *search->second); ++#else + dest_page.GetOrCreateContents().Reset(search->second); ++#endif + } + } + // ensure the contents is not NULL to prevent segfaults in other code that assumes it + dest_page.GetOrCreateContents(); + + // Set the page resources ++#if PODOFO_1_0_OR_LATER ++ if (src_page.GetResources().GetObject().IsDictionary()) { ++ const auto &src_resources = src_page.GetResources().GetDictionary(); ++ dest_page.GetResources().GetDictionary() = src_resources; ++ ref_map.apply(dest_page.GetResources().GetObject()); ++ } ++#else + if (src_page.GetResources() != nullptr) { + const auto &src_resources = src_page.GetResources()->GetDictionary(); + dest_page.GetOrCreateResources().GetDictionary() = src_resources; + ref_map.apply(dest_page.GetResources()->GetObject()); + } else dest_page.GetOrCreateResources(); ++#endif + + // Copy inherited properties + auto inherited = inheritableAttributes; +@@ -486,7 +503,7 @@ PDFDoc_set_box(PDFDoc *self, PyObject *args) { + Rect r(left, bottom, width, height); + PdfArray o; + r.ToArray(o); +- self->doc->GetPages().GetPageAt(num).GetObject().GetDictionary().AddKey(PdfName(box), o); ++ self->doc->GetPages().GetPageAt(num).GetObject().GetDictionary().AddKey(PdfName(std::string_view(box)), o); + } catch(const PdfError & err) { + podofo_set_exception(err); + return NULL; +@@ -557,7 +574,7 @@ PDFDoc_set_xmp_metadata(PDFDoc *self, PyObject *args) { + auto& metadata = self->doc->GetCatalog().GetOrCreateMetadataObject(); + auto& stream = metadata.GetOrCreateStream(); + stream.SetData(std::string_view(raw, len), true); +- metadata.GetDictionary().RemoveKey(PdfName::KeyFilter); ++ metadata.GetDictionary().RemoveKey(podofo_key_filter()); + } catch(const PdfError & err) { + podofo_set_exception(err); return NULL; + } catch (...) { +@@ -590,8 +607,8 @@ PDFDoc_extract_anchors(PDFDoc *self, PyObject *args) { + unsigned int pagenum = page->GetPageNumber(); + double left = dest[2].GetReal(), top = dest[3].GetReal(); + long long zoom = dest[4].GetNumber(); +- const std::string &anchor = itres.first.GetString(); +- PyObject *key = PyUnicode_DecodeUTF8(anchor.c_str(), anchor.length(), "replace"); ++ const auto anchor_sv = itres.first.GetString(); ++ PyObject *key = PyUnicode_DecodeUTF8(anchor_sv.data(), anchor_sv.length(), "replace"); + PyObject *tuple = Py_BuildValue("IddL", pagenum, left, top, zoom); + if (!tuple || !key) { break; } + int ret = PyDict_SetItem(ans, key, tuple); +@@ -622,8 +639,8 @@ alter_link(PDFDoc *self, PdfDictionary &link, PyObject *alter_callback, bool mar + } + PdfDictionary &A = link.GetKey("A")->GetDictionary(); + PdfObject *uo = A.GetKey("URI"); +- const std::string &uri = uo->GetString().GetString(); +- pyunique_ptr ret(PyObject_CallObject(alter_callback, Py_BuildValue("(N)", PyUnicode_DecodeUTF8(uri.c_str(), uri.length(), "replace")))); ++ auto uri_sv = uo->GetString().GetString(); ++ pyunique_ptr ret(PyObject_CallObject(alter_callback, Py_BuildValue("(N)", PyUnicode_DecodeUTF8(uri_sv.data(), uri_sv.length(), "replace")))); + if (!ret) { return; } + if (PyTuple_Check(ret.get()) && PyTuple_GET_SIZE(ret.get()) == 4) { + int pagenum; double left, top, zoom; +@@ -634,8 +651,18 @@ alter_link(PDFDoc *self, PdfDictionary &link, PyObject *alter_callback, bool mar + return; + } + link.RemoveKey("A"); ++#if PODOFO_1_0_OR_LATER ++ PdfArray dest_array; ++ dest_array.Add(page->GetObject().GetIndirectReference()); ++ dest_array.Add(PdfName("XYZ")); ++ dest_array.Add(left); ++ dest_array.Add(top); ++ dest_array.Add(zoom); ++ link.AddKey("Dest", dest_array); ++#else + PdfDestination dest(*page, left, top, zoom); + dest.AddToDictionary(link); ++#endif + } + } + } +@@ -654,10 +681,10 @@ PDFDoc_alter_links(PDFDoc *self, PyObject *args) { + for (auto &it : self->doc->GetObjects()) { + PdfDictionary *link; + if(it->TryGetDictionary(link)) { +- if (dictionary_has_key_name(*link, PdfName::KeyType, "Annot") && dictionary_has_key_name(*link, PdfName::KeySubtype, "Link")) { ++ if (dictionary_has_key_name(*link, podofo_key_type(), "Annot") && dictionary_has_key_name(*link, podofo_key_subtype(), "Link")) { + PdfObject *akey; PdfDictionary *A; + if ((akey = link->GetKey("A")) && akey->TryGetDictionary(A)) { +- if (dictionary_has_key_name(*A, PdfName::KeyType, "Action") && dictionary_has_key_name(*A, "S", "URI")) { ++ if (dictionary_has_key_name(*A, podofo_key_type(), "Action") && dictionary_has_key_name(*A, "S", "URI")) { + PdfObject *uo = A->GetKey("URI"); + if (uo && uo->IsString()) { + links.push_back(object_as_reference(it)); +diff --git a/src/calibre/utils/podofo/fonts.cpp b/src/calibre/utils/podofo/fonts.cpp +index 14ccca6b35..796d2fe9f7 100644 +--- a/src/calibre/utils/podofo/fonts.cpp ++++ b/src/calibre/utils/podofo/fonts.cpp +@@ -45,6 +45,7 @@ get_font_file(const PdfObject *descriptor) { + + static inline void + remove_font(PdfIndirectObjectList &objects, PdfObject *font) { ++#if !PODOFO_1_0_OR_LATER + PdfDictionary *dict; + if (font->TryGetDictionary(dict)) { + PdfObject *descriptor = dict->FindKey("FontDescriptor"); +@@ -55,6 +56,7 @@ remove_font(PdfIndirectObjectList &objects, PdfObject *font) { + } + } + objects.RemoveObject(object_as_reference(font)).reset(); ++#endif + } + + static void +@@ -123,9 +125,16 @@ list_fonts(PDFDoc *self, PyObject *args) { + for (auto &it : objects) { + if (it->IsDictionary()) { + const PdfDictionary &dict = it->GetDictionary(); +- if (dictionary_has_key_name(dict, PdfName::KeyType, "Font") && dict.HasKey("BaseFont")) { ++ if (dictionary_has_key_name(dict, podofo_key_type(), "Font") && dict.HasKey("BaseFont")) { ++#if PODOFO_1_0_OR_LATER ++ auto name_sv = dict.GetKey("BaseFont")->GetName().GetString(); ++ std::string name(name_sv); ++ auto subtype_sv = dict.GetKey(podofo_key_subtype())->GetName().GetString(); ++ std::string subtype(subtype_sv); ++#else + const std::string &name = dict.GetKey("BaseFont")->GetName().GetString(); +- const std::string &subtype = dict.GetKey(PdfName::KeySubtype)->GetName().GetString(); ++ const std::string &subtype = dict.GetKey(podofo_key_subtype())->GetName().GetString(); ++#endif + const PdfReference &ref = object_as_reference(it); + unsigned long num = ref.ObjectNumber(), generation = ref.GenerationNumber(); + const PdfObject *descriptor = dict.FindKey("FontDescriptor"); +@@ -140,12 +149,25 @@ list_fonts(PDFDoc *self, PyObject *args) { + if (!w2) return NULL; + } + if (dict.HasKey("Encoding") && dict.GetKey("Encoding")->IsName()) { ++#if PODOFO_1_0_OR_LATER ++ auto enc_sv = dict.GetKey("Encoding")->GetName().GetString(); ++ encoding.reset(PyUnicode_FromString(std::string(enc_sv).c_str())); ++#else + encoding.reset(PyUnicode_FromString(dict.GetKey("Encoding")->GetName().GetString().c_str())); ++#endif + if (!encoding) return NULL; + } +- if (dict.HasKey("CIDToGIDMap") && (!dict.GetKey("CIDToGIDMap")->IsName() || strcmp(dict.GetKey("CIDToGIDMap")->GetName().GetString().c_str(), "Identity") != 0)) { +- const PdfObjectStream *stream = dict.GetKey("CIDToGIDMap")->GetStream(); +- if (stream) stream->CopyToSafe(cid_gid_map); ++ if (dict.HasKey("CIDToGIDMap")) { ++ bool is_identity = false; ++#if PODOFO_1_0_OR_LATER ++ is_identity = std::string(dict.GetKey("CIDToGIDMap")->GetName().GetString()) == "Identity"; ++#else ++ is_identity = strcmp(dict.GetKey("CIDToGIDMap")->GetName().GetString().c_str(), "Identity") == 0; ++#endif ++ if (!dict.GetKey("CIDToGIDMap")->IsName() || !is_identity) { ++ const PdfObjectStream *stream = dict.GetKey("CIDToGIDMap")->GetStream(); ++ if (stream) stream->CopyToSafe(cid_gid_map); ++ } + } + if (descriptor) { + const PdfObject *ff = get_font_file(descriptor); +@@ -209,7 +231,7 @@ remove_unused_fonts(PDFDoc *self, PyObject *args) { + for (PdfObject *k : objects) { + if (k->IsDictionary()) { + const PdfDictionary &dict = k->GetDictionary(); +- if (dictionary_has_key_name(dict, PdfName::KeyType, "XObject") && dictionary_has_key_name(dict, PdfName::KeySubtype, "Form")) { ++ if (dictionary_has_key_name(dict, podofo_key_type(), "XObject") && dictionary_has_key_name(dict, podofo_key_subtype(), "Form")) { + std::unique_ptr xo; + if (PdfXObject::TryCreateFromObject(*k, xo)) used_fonts_in_canvas(*xo, used_fonts); + } +@@ -221,8 +243,12 @@ remove_unused_fonts(PDFDoc *self, PyObject *args) { + for (auto &k : objects) { + if (k->IsDictionary()) { + const PdfDictionary &dict = k->GetDictionary(); +- if (dictionary_has_key_name(dict, PdfName::KeyType, "Font")) { ++ if (dictionary_has_key_name(dict, podofo_key_type(), "Font")) { ++#if PODOFO_1_0_OR_LATER ++ std::string font_type(dict.GetKey(podofo_key_subtype())->GetName().GetString()); ++#else + const std::string &font_type = dict.GetKey(PdfName::KeySubtype)->GetName().GetString(); ++#endif + if (font_type == "Type0") { + all_fonts.insert(object_as_reference(k)); + } else if (font_type == "Type3") { +@@ -262,7 +288,9 @@ remove_unused_fonts(PDFDoc *self, PyObject *args) { + + for (auto &x : charprocs_usage) { + if (x.second == 0u) { ++#if !PODOFO_1_0_OR_LATER + objects.RemoveObject(x.first).reset(); ++#endif + } + } + +@@ -317,8 +345,10 @@ merge_fonts(PDFDoc *self, PyObject *args) { + PdfObjectStream *stream = ff->GetStream(); + stream->SetData(bufferview(data, sz)); + } else { ++#if !PODOFO_1_0_OR_LATER + objects.RemoveObject(object_as_reference(ff)).reset(); + descriptor.AddKey(font_file_key, object_as_reference(font_file)); ++#endif + } + } + Py_RETURN_NONE; +@@ -367,8 +397,12 @@ dedup_type3_fonts(PDFDoc *self, PyObject *args) { + for (auto &k : objects) { + if (!k->IsDictionary()) continue; + const PdfDictionary &dict = k->GetDictionary(); +- if (dictionary_has_key_name(dict, PdfName::KeyType, "Font")) { +- const std::string &font_type = dict.GetKey(PdfName::KeySubtype)->GetName().GetString(); ++ if (dictionary_has_key_name(dict, podofo_key_type(), "Font")) { ++#if PODOFO_1_0_OR_LATER ++ std::string font_type(dict.GetKey(podofo_key_subtype())->GetName().GetString()); ++#else ++ const std::string &font_type = dict.GetKey(podofo_key_subtype())->GetName().GetString(); ++#endif + if (font_type == "Type3") { + all_type3_fonts.insert(object_as_reference(k)); + for (auto &x : dict.GetKey("CharProcs")->GetDictionary()) { +@@ -392,8 +426,10 @@ dedup_type3_fonts(PDFDoc *self, PyObject *args) { + for (auto &ref : x.second) { + if (ref != canonical_ref) { + ref_map[ref] = x.first.reference(); ++#if !PODOFO_1_0_OR_LATER + objects.RemoveObject(ref).reset(); + count++; ++#endif + } + } + } +diff --git a/src/calibre/utils/podofo/global.h b/src/calibre/utils/podofo/global.h +index d819afb60b..f5d3418daf 100644 +--- a/src/calibre/utils/podofo/global.h ++++ b/src/calibre/utils/podofo/global.h +@@ -13,9 +13,52 @@ + #define USING_SHARED_PODOFO + #include + #include ++ ++#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0)) ++#define PODOFO_1_0_OR_LATER 1 ++#else ++#define PODOFO_1_0_OR_LATER 0 ++#endif ++ + using namespace PoDoFo; + using namespace std::literals; + ++static inline PdfName podofo_key_type() { ++#if PODOFO_1_0_OR_LATER ++ return PdfName("Type"); ++#else ++ return PdfName::KeyType; ++#endif ++} ++static inline PdfName podofo_key_subtype() { ++#if PODOFO_1_0_OR_LATER ++ return PdfName("Subtype"); ++#else ++ return PdfName::KeySubtype; ++#endif ++} ++static inline const PdfName& podofo_key_null() { ++#if PODOFO_1_0_OR_LATER ++ return PdfName::Null; ++#else ++ return PdfName::KeyNull; ++#endif ++} ++static inline PdfName podofo_key_contents() { ++#if PODOFO_1_0_OR_LATER ++ return PdfName("Contents"); ++#else ++ return PdfName::KeyContents; ++#endif ++} ++static inline PdfName podofo_key_filter() { ++#if PODOFO_1_0_OR_LATER ++ return PdfName("Filter"); ++#else ++ return PdfName::KeyFilter; ++#endif ++} ++ + namespace pdf { + + // Module exception types +diff --git a/src/calibre/utils/podofo/images.cpp b/src/calibre/utils/podofo/images.cpp +index 6337deecd9..d5e57fb807 100644 +--- a/src/calibre/utils/podofo/images.cpp ++++ b/src/calibre/utils/podofo/images.cpp +@@ -83,7 +83,7 @@ run_one_dedup_pass(PDFDoc *self, hash_cache_map &hash_cache) { + for (auto &k : objects) { + if (!k->IsDictionary()) continue; + const PdfDictionary &dict = k->GetDictionary(); +- if (dictionary_has_key_name(dict, PdfName::KeyType, "XObject") && dictionary_has_key_name(dict, PdfName::KeySubtype, "Image")) { ++ if (dictionary_has_key_name(dict, podofo_key_type(), "XObject") && dictionary_has_key_name(dict, podofo_key_subtype(), "Image")) { + Image img(object_as_reference(k), k, hash_cache); + auto it = image_map.find(img); + if (it == image_map.end()) { +@@ -99,8 +99,10 @@ run_one_dedup_pass(PDFDoc *self, hash_cache_map &hash_cache) { + for (auto &ref : x.second) { + if (ref != canonical_ref) { + ref_map[ref] = canonical_ref; ++#if !PODOFO_1_0_OR_LATER + objects.RemoveObject(ref).reset(); + count++; ++#endif + } + } + } +@@ -126,7 +128,7 @@ run_one_dedup_pass(PDFDoc *self, hash_cache_map &hash_cache) { + } + } + if (changed) resources.AddKey("XObject", new_xobject); +- } else if (dictionary_has_key_name(dict, PdfName::KeyType, "XObject") && dictionary_has_key_name(dict, PdfName::KeySubtype, "Image") && dict.HasKey("SMask") && dict.MustGetKey("SMask").IsReference()) { ++ } else if (dictionary_has_key_name(dict, podofo_key_type(), "XObject") && dictionary_has_key_name(dict, podofo_key_subtype(), "Image") && dict.HasKey("SMask") && dict.MustGetKey("SMask").IsReference()) { + try { + const PdfReference &r = ref_map.at(dict.MustGetKey("SMask").GetReference()); + dict.AddKey("SMask", r); +diff --git a/src/calibre/utils/podofo/impose.cpp b/src/calibre/utils/podofo/impose.cpp +index 2923e6369f..c881a50604 100644 +--- a/src/calibre/utils/podofo/impose.cpp ++++ b/src/calibre/utils/podofo/impose.cpp +@@ -14,17 +14,41 @@ using namespace pdf; + static void + impose_page(PdfMemDocument *doc, unsigned int dest_page_num, unsigned int src_page_num) { + auto &src_page = doc->GetPages().GetPageAt(src_page_num); ++#if PODOFO_1_0_OR_LATER ++ auto xobj = doc->CreateXObjectForm(src_page.GetMediaBox()); ++ xobj->FillFromPage(src_page); ++ auto &dest = doc->GetPages().GetPageAt(dest_page_num); ++ // Add XObject to page resources via the dictionary directly ++ PdfObject& page_obj = dest.GetObject(); ++ PdfObject* res_obj = page_obj.GetDictionary().FindKey("Resources"); ++ PdfDictionary* resources_dict; ++ if (res_obj == nullptr || !res_obj->TryGetDictionary(resources_dict)) { ++ resources_dict = &doc->GetObjects().CreateDictionaryObject().GetDictionary(); ++ page_obj.GetDictionary().AddKey("Resources", *resources_dict); ++ } ++ PdfObject* xobj_dict = resources_dict->FindKey("XObject"); ++ PdfDictionary* xobj_dict_ptr; ++ if (xobj_dict == nullptr || !xobj_dict->TryGetDictionary(xobj_dict_ptr)) { ++ xobj_dict_ptr = &doc->GetObjects().CreateDictionaryObject().GetDictionary(); ++ resources_dict->AddKey("XObject", *xobj_dict_ptr); ++ } ++ xobj_dict_ptr->AddKey(PdfName("HeaderFooter"), xobj->GetObject().GetIndirectReference()); ++ PdfContents *contents = dest.GetContents(); ++ std::ostringstream s; ++ s << "q\n1 0 0 1 0 0 cm\n/HeaderFooter Do\nQ\n" << contents->GetCopy(); ++ contents->Reset(); ++ contents->CreateStreamForAppending(PdfStreamAppendFlags::None).SetData(s.str()); ++#else + auto xobj = doc->CreateXObjectForm(src_page.GetMediaBox(), "HeaderFooter"); + xobj->FillFromPage(src_page); + auto &dest = doc->GetPages().GetPageAt(dest_page_num); + dest.GetOrCreateResources().AddResource("XObject", xobj->GetIdentifier(), xobj->GetObject().GetIndirectReference()); +- // prepend the header footer xobject to the stream. This means header/footer is drawn first then the contents, which works +- // since chromium does not draw in margin areas. The reverse, i.e. appending, does not work with older WebEngine before Qt 6.5. + PdfContents *contents = dest.GetContents(); + std::ostringstream s; + s << "q\n1 0 0 1 0 0 cm\n/" << xobj->GetIdentifier().GetString() << " Do\nQ\n" << contents->GetCopy(); + contents->Reset(); + contents->GetStreamForAppending().SetData(s.str()); ++#endif + } + + static PyObject* +diff --git a/src/calibre/utils/podofo/outline.cpp b/src/calibre/utils/podofo/outline.cpp +index c3de7efced..15bd674faf 100644 +--- a/src/calibre/utils/podofo/outline.cpp ++++ b/src/calibre/utils/podofo/outline.cpp +@@ -62,11 +62,27 @@ create(PDFOutlineItem *self, PyObject *args) { + PdfString title = podofo_convert_pystring(title_buf); + const PdfPage *page = get_page(self->doc, num - 1); + if (!page) { PyErr_Format(PyExc_ValueError, "Invalid page number: %u", num); return NULL; } ++#if PODOFO_1_0_OR_LATER ++ PdfOutlineItem *child; ++ if (PyObject_IsTrue(as_child)) { ++ child = &self->item->CreateChild(title); ++ } else ++ child = &self->item->CreateNext(title); ++ PdfArray dest_array; ++ dest_array.Add(page->GetObject().GetIndirectReference()); ++ dest_array.Add(PdfName("XYZ")); ++ dest_array.Add(left); ++ dest_array.Add(top); ++ dest_array.Add(zoom); ++ child->GetDictionary().AddKey("Dest", dest_array); ++ ans->item = child; ++#else + auto dest = std::make_shared(*page, left, top, zoom); + if (PyObject_IsTrue(as_child)) { + ans->item = self->item->CreateChild(title, dest); + } else + ans->item = self->item->CreateNext(title, dest); ++#endif + } catch (const PdfError &err) { + podofo_set_exception(err); return NULL; + } catch(const std::exception & err) { +diff --git a/src/calibre/utils/podofo/outlines.cpp b/src/calibre/utils/podofo/outlines.cpp +index 4f80d25801..c6920cd2f8 100644 +--- a/src/calibre/utils/podofo/outlines.cpp ++++ b/src/calibre/utils/podofo/outlines.cpp +@@ -25,6 +25,22 @@ create_outline(PDFDoc *self, PyObject *args) { + try { + PdfString title = podofo_convert_pystring(title_buf); + PdfOutlines &outlines = self->doc->GetOrCreateOutlines(); ++#if PODOFO_1_0_OR_LATER ++ PdfOutlineItem& root_item = outlines.CreateRoot(title); ++ ans->item = &root_item; ++ ans->doc = self->doc; ++ auto page = get_page(self->doc, pagenum -1); ++ if (!page) { ++ PyErr_Format(PyExc_ValueError, "Invalid page number: %u", pagenum - 1); return NULL; ++ } ++ PdfArray dest_array; ++ dest_array.Add(page->GetObject().GetIndirectReference()); ++ dest_array.Add(PdfName("XYZ")); ++ dest_array.Add(left); ++ dest_array.Add(top); ++ dest_array.Add(zoom); ++ ans->item->GetDictionary().AddKey("Dest", dest_array); ++#else + ans->item = outlines.CreateRoot(title); + if (ans->item == NULL) {PyErr_NoMemory(); return NULL;} + ans->doc = self->doc; +@@ -34,6 +50,7 @@ create_outline(PDFDoc *self, PyObject *args) { + } + auto dest = std::make_shared(*page, left, top, zoom); + ans->item->SetDestination(dest); ++#endif + } catch(const PdfError & err) { + podofo_set_exception(err); return NULL; + } catch(const std::exception & err) { +@@ -65,7 +82,7 @@ convert_outline(PDFDoc *self, PyObject *parent, PdfOutlineItem *item) { + if (!node) return; + if (PyDict_SetItemString(node.get(), "title", title.get()) != 0) return; + auto dest = item->GetDestination(); +- if (dest) { ++ if (dest.has_value()) { + PdfPage *page = dest->GetPage(); + long pnum = page ? page->GetPageNumber() : -1; + pyunique_ptr d(Py_BuildValue("{sl sd sd sd}", "page", pnum, "top", dest->GetTop(), "left", dest->GetLeft(), "zoom", dest->GetZoom())); +diff --git a/src/calibre/utils/podofo/utils.cpp b/src/calibre/utils/podofo/utils.cpp +index fb1fb01955..a884f4fff8 100644 +--- a/src/calibre/utils/podofo/utils.cpp ++++ b/src/calibre/utils/podofo/utils.cpp +@@ -26,7 +26,11 @@ pdf::podofo_set_exception(const PdfError &err) { + + PyObject * + pdf::podofo_convert_pdfstring(const PdfString &s) { ++#if PODOFO_1_0_OR_LATER ++ return PyUnicode_FromString(std::string(s.GetString()).c_str()); ++#else + return PyUnicode_FromString(s.GetString().c_str()); ++#endif + } + + const PdfString +-- +2.53.0 + diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 4141c43bdd631b..735040da7f603d 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre version=9.6.0 -revision=1 +revision=2 build_helper=python3 pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow From 9fbb9958948a5a7a3095374d4c23a30414a6757e Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 09:37:37 +0200 Subject: [PATCH 07/31] horizon: patch for podofo 1.0.x --- .../patches/port-to-podofo-1.0.x.patch | 159 ++++++++++++++++++ srcpkgs/horizon/template | 2 +- 2 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/horizon/patches/port-to-podofo-1.0.x.patch diff --git a/srcpkgs/horizon/patches/port-to-podofo-1.0.x.patch b/srcpkgs/horizon/patches/port-to-podofo-1.0.x.patch new file mode 100644 index 00000000000000..0e1c97cdeb86f7 --- /dev/null +++ b/srcpkgs/horizon/patches/port-to-podofo-1.0.x.patch @@ -0,0 +1,159 @@ +Port to PoDoFo 1.0.x API changes. + +diff --git a/src/export_pdf/canvas_pdf.cpp b/src/export_pdf/canvas_pdf.cpp +index 413b07fe..d3fbe6a0 100644 +--- a/src/export_pdf/canvas_pdf.cpp ++++ b/src/export_pdf/canvas_pdf.cpp +@@ -62,7 +62,7 @@ void CanvasPDF::img_line(const Coordi &p0, const Coordi &p1, const uint64_t widt + rp1 = transform.transform(p1); + } + auto color = get_pdf_layer_color(layer); +- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b)); ++ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b)); + painter.DrawLine(to_pt(rp0.x), to_pt(rp0.y), to_pt(rp1.x), to_pt(rp1.y)); + } + +@@ -138,7 +138,7 @@ void CanvasPDF::img_draw_text(const Coordf &p, float size, const std::string &rt + Coordi p0(xshift, yshift); + Coordi pt = tf.transform(p0); + +- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients(cos(fangle), sin(fangle), -sin(fangle), ++ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix(cos(fangle), sin(fangle), -sin(fangle), + cos(fangle), to_pt(pt.x), to_pt(pt.y))); + painter.DrawText(line.c_str(), 0, to_pt(size) / -2); + painter.Restore(); +@@ -154,8 +154,8 @@ void CanvasPDF::img_polygon(const Polygon &ipoly, bool tr) + return; + + auto color = get_pdf_layer_color(ipoly.layer); +- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(color.r, color.g, color.b)); +- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b)); ++ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b)); ++ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b)); + painter.GraphicsState.SetLineWidth(to_pt(settings.min_line_width)); + if (ipoly.usage == nullptr) { // regular patch + draw_polygon(ipoly, tr); +@@ -195,8 +195,8 @@ void CanvasPDF::img_hole(const Hole &hole) + return; + + auto color = get_pdf_layer_color(PDFExportSettings::HOLES_LAYER); +- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(color.r, color.g, color.b)); +- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b)); ++ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b)); ++ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b)); + painter.GraphicsState.SetLineWidth(to_pt(settings.min_line_width)); + + auto hole2 = hole; +diff --git a/src/export_pdf/export_pdf.cpp b/src/export_pdf/export_pdf.cpp +index 71142919..ab2e8272 100644 +--- a/src/export_pdf/export_pdf.cpp ++++ b/src/export_pdf/export_pdf.cpp +@@ -88,17 +88,16 @@ public: + auto &page = document.GetPages().GetPageAt(number); + auto &annot = page.GetAnnotations().CreateAnnot(rect); + annot.SetBorderStyle(0, 0, 0); +- annot.SetDestination(first_pages.at(path)); ++ annot.SetDestination(*first_pages.at(path)); + } + for (auto &[url, number, rect] : datasheet_annotations) { + auto &page = document.GetPages().GetPageAt(number); + auto &annot = page.GetAnnotations().CreateAnnot(rect); + annot.SetBorderStyle(0, 0, 0); + +- auto action = std::make_shared(document, PoDoFo::PdfActionType::URI); +- ++ auto action = document.CreateAction(); + action->SetURI(PoDoFo::PdfString(url)); +- annot.SetAction(action); ++ annot.SetAction(*action); + } + + document.Save(filename); +@@ -109,7 +108,7 @@ private: + PoDoFo::PdfPainter painter; + PoDoFo::PdfFont &font; + PoDoFo::PdfOutlines *outlines = nullptr; +- std::map> first_pages; ++ std::map> first_pages; + std::vector> annotations; + std::vector> datasheet_annotations; + +@@ -138,7 +137,7 @@ private: + painter.SetCanvas(page); + + painter.GraphicsState.SetLineCapStyle(PoDoFo::PdfLineCapStyle::Round); +- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(0, 0, 0)); ++ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(0, 0, 0)); + painter.TextState.SetFont(font, 10); + painter.TextState.SetRenderingMode(PoDoFo::PdfTextRenderingMode::Invisible); + +@@ -167,9 +166,10 @@ private: + } + } + +- auto dest = std::make_shared(page); ++ auto dest = document.CreateDestination(); ++ dest->SetDestination(page); + if (first) { +- first_pages.emplace(path, dest); ++ first_pages.emplace(path, std::move(dest)); + first = false; + } + +@@ -216,15 +216,16 @@ private: + + PoDoFo::PdfOutlineItem *sheet_node; + if (parent) { +- sheet_node = parent->CreateChild(PoDoFo::PdfString(sheet->name), dest); ++ sheet_node = &parent->CreateChild(PoDoFo::PdfString(sheet->name)); ++ sheet_node->SetDestination(*dest); + } + else { +- sheet_node = outlines->CreateRoot(PoDoFo::PdfString(sheet->name)); +- sheet_node->SetDestination(dest); ++ sheet_node = &outlines->CreateRoot(PoDoFo::PdfString(sheet->name)); ++ sheet_node->SetDestination(*dest); + } + + for (auto sym : sheet->get_block_symbols_sorted()) { +- auto sym_node = sheet_node->CreateChild(PoDoFo::PdfString(sym->block_instance->refdes), dest); ++ auto sym_node = &sheet_node->CreateChild(PoDoFo::PdfString(sym->block_instance->refdes)); + sym_node->SetTextFormat(PoDoFo::PdfOutlineFormat::Italic); + export_schematic(*sym->schematic, uuid_vec_append(path, sym->block_instance->uuid), prv, sym_node); + } +diff --git a/src/export_pdf/export_pdf_board.cpp b/src/export_pdf/export_pdf_board.cpp +index 717c3524..b30e23ae 100644 +--- a/src/export_pdf/export_pdf_board.cpp ++++ b/src/export_pdf/export_pdf_board.cpp +@@ -39,15 +39,15 @@ void export_pdf(const class Board &brd, const class PDFExportSettings &settings, + auto &page = document.GetPages().CreatePage(PoDoFo::Rect(0, 0, to_pt(width), to_pt(height))); + painter.SetCanvas(page); + painter.GraphicsState.SetLineCapStyle(PoDoFo::PdfLineCapStyle::Round); +- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(0, 0, 0)); ++ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(0, 0, 0)); + painter.TextState.SetFont(font, 10); + painter.TextState.SetRenderingMode(PoDoFo::PdfTextRenderingMode::Invisible); + if (settings.mirror) { +- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients( ++ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix( + -1, 0, 0, 1, to_pt(bbox.second.x + border_width), to_pt(-bbox.first.y + border_width))); + } + else { +- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients( ++ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix( + 1, 0, 0, 1, to_pt(-bbox.first.x + border_width), to_pt(-bbox.first.y + border_width))); + } + ca.layer_filter = true; +diff --git a/src/export_pdf/export_pdf_util.cpp b/src/export_pdf/export_pdf_util.cpp +index b3c4834f..b1ab924a 100644 +--- a/src/export_pdf/export_pdf_util.cpp ++++ b/src/export_pdf/export_pdf_util.cpp +@@ -13,7 +13,7 @@ void render_picture(PoDoFo::PdfDocument &doc, PoDoFo::PdfPainter &painter, const + + painter.Save(); + const auto fangle = pl.get_angle_rad(); +- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients( ++ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix( + cos(fangle), sin(fangle), -sin(fangle), cos(fangle), to_pt((double)pl.shift.x), to_pt((double)pl.shift.y))); + const int64_t w = pic.data->width * pic.px_size; + const int64_t h = pic.data->height * pic.px_size; diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template index 3c80bf6606c100..27716312db8c00 100644 --- a/srcpkgs/horizon/template +++ b/srcpkgs/horizon/template @@ -1,7 +1,7 @@ # Template file for 'horizon' pkgname=horizon version=2.7.2 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config cmake glib-devel" makedepends="cairomm-devel librsvg-devel sqlite-devel From f81d8ade3088b7a0f94dd5af72bc97652bfeeed5 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 10:14:33 +0200 Subject: [PATCH 08/31] krename: patch for podofo 1.0.x --- .../patches/port-to-podofo-1.0.x.patch | 99 +++++++++++++++++++ srcpkgs/krename/template | 2 +- 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/krename/patches/port-to-podofo-1.0.x.patch diff --git a/srcpkgs/krename/patches/port-to-podofo-1.0.x.patch b/srcpkgs/krename/patches/port-to-podofo-1.0.x.patch new file mode 100644 index 00000000000000..5153296eb3d9f3 --- /dev/null +++ b/srcpkgs/krename/patches/port-to-podofo-1.0.x.patch @@ -0,0 +1,99 @@ +From bc044f1fddab6409f8b78d4bb7a71553c03131d8 Mon Sep 17 00:00:00 2001 +From: Andrea Brancaleoni +Date: Sat, 11 Apr 2026 10:11:59 +0200 +Subject: [PATCH] Port to podofo 1.0.x + +--- + cmake/modules/FindPoDoFo.cmake | 30 +++++++++++++++++++++--------- + src/podofoplugin.cpp | 16 ++++++++-------- + 2 files changed, 29 insertions(+), 17 deletions(-) + +diff --git a/cmake/modules/FindPoDoFo.cmake b/cmake/modules/FindPoDoFo.cmake +index 7a8434c..5845115 100644 +--- a/cmake/modules/FindPoDoFo.cmake ++++ b/cmake/modules/FindPoDoFo.cmake +@@ -87,6 +87,10 @@ if(PoDoFo_INCLUDE_DIRS) + endif() + endif() + ++if(NOT PoDoFo_FOUND) ++ find_package(PoDoFo QUIET CONFIG) ++endif() ++ + if(PoDoFo_VERSION VERSION_GREATER_EQUAL 0.10.0) + set(CMAKE_CXX_STANDARD 17) + endif() +@@ -103,14 +107,23 @@ find_package_handle_standard_args(PoDoFo + ) + + if(PoDoFo_FOUND AND NOT TARGET PoDoFo::PoDoFo) +- add_library(PoDoFo::PoDoFo UNKNOWN IMPORTED) +- set_target_properties(PoDoFo::PoDoFo PROPERTIES +- IMPORTED_LOCATION "${PoDoFo_LIBRARIES}" +- INTERFACE_COMPILE_OPTIONS "${PC_PoDoFo_CFLAGS}" +- INTERFACE_INCLUDE_DIRECTORIES "${PoDoFo_INCLUDE_DIRS}" +- ) +- if(TARGET PkgConfig::PC_PoDoFo) +- target_link_libraries(PoDoFo::PoDoFo INTERFACE PkgConfig::PC_PoDoFo) ++ if(TARGET podofo::podofo_shared) ++ get_target_property(_podofo_loc podofo::podofo_shared IMPORTED_LOCATION_NONE) ++ add_library(PoDoFo::PoDoFo UNKNOWN IMPORTED) ++ set_target_properties(PoDoFo::PoDoFo PROPERTIES ++ IMPORTED_LOCATION "${_podofo_loc}" ++ INTERFACE_LINK_LIBRARIES "podofo::podofo_shared" ++ ) ++ else() ++ add_library(PoDoFo::PoDoFo UNKNOWN IMPORTED) ++ set_target_properties(PoDoFo::PoDoFo PROPERTIES ++ IMPORTED_LOCATION "${PoDoFo_LIBRARIES}" ++ INTERFACE_COMPILE_OPTIONS "${PC_PoDoFo_CFLAGS}" ++ INTERFACE_INCLUDE_DIRECTORIES "${PoDoFo_INCLUDE_DIRS}" ++ ) ++ if(TARGET PkgConfig::PC_PoDoFo) ++ target_link_libraries(PoDoFo::PoDoFo INTERFACE PkgConfig::PC_PoDoFo) ++ endif() + endif() + endif() + +@@ -121,4 +134,3 @@ set_package_properties(PoDoFo PROPERTIES + DESCRIPTION "A C++ libary to work with the PDF file format" + URL "https://github.com/podofo/podofo" + ) +- +diff --git a/src/podofoplugin.cpp b/src/podofoplugin.cpp +index b74e65c..667670a 100644 +--- a/src/podofoplugin.cpp ++++ b/src/podofoplugin.cpp +@@ -47,21 +47,21 @@ QString PodofoPlugin::processFile(BatchRenamer *b, int index, const QString &fil + try { + PdfMemDocument doc; + doc.Load(filename.toUtf8().data()); +-#if (PODOFO_VERSION_MINOR>=10 || PODOFO_VERSION_MAJOR>=1) +- const PdfInfo *info = doc.GetInfo(); ++#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0)) ++ const PdfInfo* info = doc.GetInfo(); + + if (token == "pdfauthor") { +- return info->GetAuthor().has_value() ? QString::fromUtf8(info->GetAuthor()->GetString().c_str()) : QString(); ++ return info->GetAuthor().has_value() ? QString::fromUtf8(info->GetAuthor()->GetString().data()) : QString(); + } else if (token == "pdfcreator") { +- return info->GetCreator().has_value() ? QString::fromUtf8(info->GetCreator()->GetString().c_str()) : QString(); ++ return info->GetCreator().has_value() ? QString::fromUtf8(info->GetCreator()->GetString().data()) : QString(); + } else if (token == "pdfkeywords") { +- return info->GetKeywords().has_value() ? QString::fromUtf8(info->GetKeywords()->GetString().c_str()) : QString(); ++ return info->GetKeywords().has_value() ? QString::fromUtf8(info->GetKeywords()->GetString().data()) : QString(); + } else if (token == "pdfsubject") { +- return info->GetSubject().has_value() ? QString::fromUtf8(info->GetSubject()->GetString().c_str()) : QString(); ++ return info->GetSubject().has_value() ? QString::fromUtf8(info->GetSubject()->GetString().data()) : QString(); + } else if (token == "pdftitle") { +- return info->GetTitle().has_value() ? QString::fromUtf8(info->GetTitle()->GetString().c_str()) : QString(); ++ return info->GetTitle().has_value() ? QString::fromUtf8(info->GetTitle()->GetString().data()) : QString(); + } else if (token == "pdfproducer") { +- return info->GetProducer().has_value() ? QString::fromUtf8(info->GetProducer()->GetString().c_str()) : QString(); ++ return info->GetProducer().has_value() ? QString::fromUtf8(info->GetProducer()->GetString().data()) : QString(); + } else if (token == "pdfpages") { + return QString::number(doc.GetPages().GetCount()); + } +-- +2.53.0 + diff --git a/srcpkgs/krename/template b/srcpkgs/krename/template index a108bfc1738909..36f1f5937af84a 100644 --- a/srcpkgs/krename/template +++ b/srcpkgs/krename/template @@ -1,7 +1,7 @@ # Template file for 'krename' pkgname=krename version=5.0.60 -revision=1 +revision=2 wrksrc="krename-8a0fe463fc35ca176cc5743ba3fecdef4c23d306" build_style=cmake hostmakedepends="extra-cmake-modules gettext kcoreaddons pkg-config qt6-base" From 9bd6e1d7d73e812c72b6dd6e015fb6cf0db27361 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 10:15:06 +0200 Subject: [PATCH 09/31] scribus: patch for podofo 1.0.x --- srcpkgs/scribus/patches/podofo-1.0.x.patch | 33 ++++++++++++++++++++++ srcpkgs/scribus/template | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/scribus/patches/podofo-1.0.x.patch diff --git a/srcpkgs/scribus/patches/podofo-1.0.x.patch b/srcpkgs/scribus/patches/podofo-1.0.x.patch new file mode 100644 index 00000000000000..45d7d7faf78810 --- /dev/null +++ b/srcpkgs/scribus/patches/podofo-1.0.x.patch @@ -0,0 +1,33 @@ +--- a/scribus/plugins/import/ps/importps.cpp ++++ b/scribus/plugins/import/ps/importps.cpp +@@ -157,10 +157,19 @@ + { + try + { ++#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(0, 10, 0)) ++ PoDoFo::PdfMemDocument doc; ++ if constexpr (os_is_win_constexpr()) ++ doc.Load(fName.toUtf8().data()); ++ else ++ doc.Load(fName.toLocal8Bit().data()); ++ PoDoFo::PdfPage& curPage = doc.GetPages().GetPageAt(0); ++ PoDoFo::PdfRect rect = curPage.GetMediaBox(); ++ b = rect.GetWidth() - rect.GetLeft(); ++ h = rect.GetHeight() - rect.GetBottom(); ++#else + PoDoFo::PdfError::EnableDebug( false ); +-#if (PODOFO_VERSION == 0 && PODOFO_MINOR > 6) +- PoDoFo::PdfError::EnableLogging( false ); +-#endif ++ PoDoFo::PdfError::EnableLogging( false ); + #if (PODOFO_VERSION == 0 && PODOFO_MINOR == 5 && PODOFO_REVISION == 99) || PODOFO_MINOR > 5 + PoDoFo::PdfMemDocument doc( fName.toLocal8Bit().data() ); + #else +@@ -173,6 +182,7 @@ + b = rect.GetWidth() - rect.GetLeft(); + h = rect.GetHeight() - rect.GetBottom(); + } ++#endif + } + catch(PoDoFo::PdfError& e) + { diff --git a/srcpkgs/scribus/template b/srcpkgs/scribus/template index 400e597a4ddb40..27ed9ab0402b34 100644 --- a/srcpkgs/scribus/template +++ b/srcpkgs/scribus/template @@ -1,7 +1,7 @@ # Template file for 'scribus' pkgname=scribus version=1.6.5 -revision=1 +revision=2 build_style=cmake configure_args="-DWANT_DISTROBUILD=ON -DQT_PREFIX=${XBPS_CROSS_BASE}/usr -DWANT_GRAPHICSMAGICK=1 -DWANT_CPP20=ON" From 043089d8c28d92382e12bcd7b6dd0312630d1ef7 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:28:33 +0200 Subject: [PATCH 10/31] abseil-cpp: update to 20250814.0. --- common/shlibs | 186 ++++++++++++++++++------------------ srcpkgs/abseil-cpp/template | 4 +- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/common/shlibs b/common/shlibs index 3547a12630fc22..a1078c8f1a33da 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4340,99 +4340,99 @@ libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1 libmujs.so.1.2.0 mujs-1.2.0_2 libiir.so.1 libiir1-1.9.3_1 -libabsl_bad_any_cast_impl.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_bad_optional_access.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_bad_variant_access.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_base.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_city.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_civil_time.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cord.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cord_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cordz_functions.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cordz_handle.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cordz_info.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_cordz_sample_token.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_crc32c.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_crc_cord_state.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_crc_cpu_detect.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_crc_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_debugging_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_decode_rust_punycode.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_demangle_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_demangle_rust.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_die_if_null.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_examine_stack.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_exponential_biased.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_failure_signal_handler.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_commandlineflag.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_commandlineflag_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_config.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_marshalling.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_parse.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_private_handle_accessor.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_program_name.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_reflection.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_usage.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_flags_usage_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_graphcycles_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_hash.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_hashtablez_sampler.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_int128.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_kernel_timeout_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_leak_check.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_entry.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_flags.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_globals.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_initialize.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_check_op.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_conditions.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_fnmatch.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_format.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_globals.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_log_sink_set.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_message.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_nullguard.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_proto.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_internal_structured_proto.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_severity.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_log_sink.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_low_level_hash.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_malloc_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_periodic_sampler.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_poison.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_distributions.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_distribution_test_util.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_entropy_pool.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_platform.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_pool_urbg.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_randen.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_randen_hwaes.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_randen_hwaes_impl.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_randen_slow.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_internal_seed_material.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_seed_gen_exception.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_random_seed_sequences.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_raw_hash_set.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_raw_logging_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_scoped_set_env.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_spinlock_wait.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_stacktrace.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_status.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_statusor.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_str_format_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_strerror.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_string_view.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_strings.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_strings_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_symbolize.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_synchronization.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_throw_delegate.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_time.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_time_zone.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_tracing_internal.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_utf8_for_code_point.so.2505.0.0 abseil-cpp-20250512.1_1 -libabsl_vlog_config_internal.so.2505.0.0 abseil-cpp-20250512.1_1 +libabsl_bad_any_cast_impl.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_bad_optional_access.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_bad_variant_access.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_base.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_city.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_civil_time.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cord.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cord_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cordz_functions.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cordz_handle.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cordz_info.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_cordz_sample_token.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_crc32c.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_crc_cord_state.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_crc_cpu_detect.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_crc_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_debugging_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_decode_rust_punycode.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_demangle_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_demangle_rust.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_die_if_null.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_examine_stack.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_exponential_biased.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_failure_signal_handler.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_commandlineflag.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_commandlineflag_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_config.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_marshalling.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_parse.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_private_handle_accessor.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_program_name.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_reflection.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_usage.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_flags_usage_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_graphcycles_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_hash.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_hashtablez_sampler.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_int128.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_kernel_timeout_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_leak_check.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_entry.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_flags.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_globals.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_initialize.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_check_op.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_conditions.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_fnmatch.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_format.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_globals.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_log_sink_set.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_message.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_nullguard.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_proto.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_internal_structured_proto.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_severity.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_log_sink.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_low_level_hash.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_malloc_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_periodic_sampler.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_poison.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_distributions.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_distribution_test_util.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_entropy_pool.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_platform.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_pool_urbg.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_randen.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_randen_hwaes.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_randen_hwaes_impl.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_randen_slow.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_internal_seed_material.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_seed_gen_exception.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_random_seed_sequences.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_raw_hash_set.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_raw_logging_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_scoped_set_env.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_spinlock_wait.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_stacktrace.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_status.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_statusor.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_str_format_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_strerror.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_string_view.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_strings.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_strings_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_symbolize.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_synchronization.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_throw_delegate.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_time.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_time_zone.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_tracing_internal.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_utf8_for_code_point.so.2508.0.0 abseil-cpp-20250814.0_1 +libabsl_vlog_config_internal.so.2508.0.0 abseil-cpp-20250814.0_1 libzint.so.2.16 libzint-2.16.0_1 libairspyhf.so.0 libairspyhf-1.6.8_1 libtraceevent.so.1 libtraceevent-1.6.2_1 diff --git a/srcpkgs/abseil-cpp/template b/srcpkgs/abseil-cpp/template index b533d60b4d13c8..0ec943180a12ee 100644 --- a/srcpkgs/abseil-cpp/template +++ b/srcpkgs/abseil-cpp/template @@ -1,6 +1,6 @@ # Template file for 'abseil-cpp' pkgname=abseil-cpp -version=20250512.1 +version=20250814.0 revision=1 build_style=cmake configure_args="-DBUILD_SHARED_LIBS=ON -DABSL_PROPAGATE_CXX_STD=ON @@ -12,7 +12,7 @@ license="Apache-2.0" homepage="https://abseil.io" changelog="https://github.com/abseil/abseil-cpp/releases" distfiles="https://github.com/abseil/abseil-cpp/archive/${version}.tar.gz" -checksum=9b7a064305e9fd94d124ffa6cc358592eb42b5da588fb4e07d09254aa40086db +checksum=9b2b72d4e8367c0b843fa2bcfa2b08debbe3cee34f7aaa27de55a6cbb3e843db abseil-cpp-devel_package() { short_desc+=" (development files)" From f91033431bae34c1f8c8d72db61387a157516f0b Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:29:04 +0200 Subject: [PATCH 11/31] flatbuffers: update to 24.12.23. --- common/shlibs | 1 + srcpkgs/flatbuffers/patches/init-var.patch | 13 ------------- srcpkgs/flatbuffers/template | 16 ++++++++-------- 3 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 srcpkgs/flatbuffers/patches/init-var.patch diff --git a/common/shlibs b/common/shlibs index a1078c8f1a33da..30bfc29291423c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -703,6 +703,7 @@ libxfce4windowing-0.so.0 libxfce4windowing-4.19.10_1 libxml++-2.6.so.2 libxml++-2.32.0_1 libxml++-3.0.so.1 libxml++3.0-3.0.1_1 libftgl.so.2 ftgl-2.1.2_1 +libflatbuffers.so.24.12.23 flatbuffers-24.12.23_1 libGLEW.so.2.2 glew-2.2.0_1 libsndfile.so.1 libsndfile-1.0.20_1 libspeex.so.1 libspeex-1.1_1 diff --git a/srcpkgs/flatbuffers/patches/init-var.patch b/srcpkgs/flatbuffers/patches/init-var.patch deleted file mode 100644 index eb7de9655a256f..00000000000000 --- a/srcpkgs/flatbuffers/patches/init-var.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: flatbuffers-1.12.0/tests/test_builder.h -=================================================================== ---- flatbuffers-1.12.0.orig/tests/test_builder.h -+++ flatbuffers-1.12.0/tests/test_builder.h -@@ -63,7 +63,7 @@ template - void builder_move_assign_after_releaseraw_test(Builder b1) { - auto root_offset1 = populate1(b1); - b1.Finish(root_offset1); -- size_t size, offset; -+ size_t size = 0, offset; - std::shared_ptr raw( - b1.ReleaseRaw(size, offset), [size](uint8_t *ptr) { - flatbuffers::DefaultAllocator::dealloc(ptr, size); diff --git a/srcpkgs/flatbuffers/template b/srcpkgs/flatbuffers/template index 759e913d2edbd9..14aed6858c76c8 100644 --- a/srcpkgs/flatbuffers/template +++ b/srcpkgs/flatbuffers/template @@ -1,32 +1,32 @@ # Template file for 'flatbuffers' pkgname=flatbuffers -version=1.12.0 +version=24.12.23 revision=1 build_style=cmake +configure_args="-DFLATBUFFERS_BUILD_SHAREDLIB=ON -DFLATBUFFERS_BUILD_TESTS=OFF + -DFLATBUFFERS_BUILD_FLATHASH=OFF -DFLATBUFFERS_BUILD_BENCHMARKS=OFF" short_desc="Memory efficient serialization library" maintainer="Orphaned " license="Apache-2.0" homepage="https://google.github.io/flatbuffers/" distfiles="https://github.com/google/${pkgname}/archive/v${version}.tar.gz" -checksum=62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45 +checksum=7e2ef35f1af9e2aa0c6a7d0a09298c2cb86caf3d4f58c0658b306256e5bcab10 if [ "$CROSS_BUILD" ]; then - # Disable tests to prevent executing target binaries on host - configure_args+=" -DFLATBUFFERS_BUILD_TESTS=OFF" + configure_args+=" -DFLATBUFFERS_BUILD_FLATC=OFF" fi case "$XBPS_TARGET_MACHINE" in *-musl) configure_args+=" -DFLATBUFFERS_LOCALE_INDEPENDENT=0";; esac -CXXFLAGS="-Wno-class-memaccess -Wno-stringop-overflow" - flatbuffers-devel_package() { short_desc+=" - development files" depends="${sourcepkg}>=${version}_${revision}" pkg_install() { vmove usr/include vmove usr/lib/cmake - vmove usr/lib/libflatbuffers.a + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig } -} +} \ No newline at end of file From 68b65f4c685ed7ce5d8f76a1168aec43159a4282 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:29:50 +0200 Subject: [PATCH 12/31] New package: onnxruntime-1.24.4 --- common/shlibs | 2 + srcpkgs/onnxruntime-devel | 1 + .../patches/fix-boost-mp11-system.patch | 35 ++++++ .../patches/install-orttraining-files.patch | 21 ++++ .../patches/remove-pkg_resources.patch | 61 ++++++++++ srcpkgs/onnxruntime/template | 105 ++++++++++++++++++ srcpkgs/python3-onnxruntime | 1 + 7 files changed, 226 insertions(+) create mode 120000 srcpkgs/onnxruntime-devel create mode 100644 srcpkgs/onnxruntime/patches/fix-boost-mp11-system.patch create mode 100644 srcpkgs/onnxruntime/patches/install-orttraining-files.patch create mode 100644 srcpkgs/onnxruntime/patches/remove-pkg_resources.patch create mode 100644 srcpkgs/onnxruntime/template create mode 120000 srcpkgs/python3-onnxruntime diff --git a/common/shlibs b/common/shlibs index 30bfc29291423c..d1eced3ba6461d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4571,3 +4571,5 @@ libresvg.so.0.46 libresvg0-0.46.0_1 libgpiod.so.3 libgpiod-2.2_4 libgpiodcxx.so.2 libgpiod-2.2_4 libigloo.so.0 libigloo-0.9.5_1 +libonnxruntime.so.1 onnxruntime-1.24.4_1 +libonnxruntime_providers_shared.so onnxruntime-1.24.4_1 diff --git a/srcpkgs/onnxruntime-devel b/srcpkgs/onnxruntime-devel new file mode 120000 index 00000000000000..51decf87adad3e --- /dev/null +++ b/srcpkgs/onnxruntime-devel @@ -0,0 +1 @@ +onnxruntime \ No newline at end of file diff --git a/srcpkgs/onnxruntime/patches/fix-boost-mp11-system.patch b/srcpkgs/onnxruntime/patches/fix-boost-mp11-system.patch new file mode 100644 index 00000000000000..784b83c97538f4 --- /dev/null +++ b/srcpkgs/onnxruntime/patches/fix-boost-mp11-system.patch @@ -0,0 +1,35 @@ +--- a/cmake/external/onnxruntime_external_deps.cmake ++++ b/cmake/external/onnxruntime_external_deps.cmake +@@ -284,16 +284,22 @@ + message(STATUS "Aliasing Boost::headers to Boost::mp11") + add_library(Boost::mp11 ALIAS Boost::headers) + else() +- onnxruntime_fetchcontent_declare( +- mp11 +- URL ${DEP_URL_mp11} +- EXCLUDE_FROM_ALL +- FIND_PACKAGE_ARGS NAMES Boost +- ) +- FetchContent_Populate(mp11) +- if(NOT TARGET Boost::mp11) +- add_library(Boost::mp11 IMPORTED INTERFACE) +- target_include_directories(Boost::mp11 INTERFACE $) ++ find_package(Boost QUIET COMPONENTS headers) ++ if(TARGET Boost::headers) ++ message(STATUS "Aliasing Boost::headers to Boost::mp11") ++ add_library(Boost::mp11 ALIAS Boost::headers) ++ else() ++ onnxruntime_fetchcontent_declare( ++ mp11 ++ URL ${DEP_URL_mp11} ++ EXCLUDE_FROM_ALL ++ FIND_PACKAGE_ARGS NAMES Boost ++ ) ++ FetchContent_Populate(mp11) ++ if(NOT TARGET Boost::mp11) ++ add_library(Boost::mp11 IMPORTED INTERFACE) ++ target_include_directories(Boost::mp11 INTERFACE $) ++ endif() + endif() + endif() + endif() diff --git a/srcpkgs/onnxruntime/patches/install-orttraining-files.patch b/srcpkgs/onnxruntime/patches/install-orttraining-files.patch new file mode 100644 index 00000000000000..8da1337458df3c --- /dev/null +++ b/srcpkgs/onnxruntime/patches/install-orttraining-files.patch @@ -0,0 +1,21 @@ +diff --git a/setup.py b/setup.py +index 294b975a56..1612a4419c 100644 +--- a/setup.py ++++ b/setup.py +@@ -523,7 +523,7 @@ classifiers = [ + if not enable_training: + classifiers.extend(["Operating System :: Microsoft :: Windows", "Operating System :: MacOS"]) + +-if enable_training or enable_training_apis: ++if True: + packages.append("onnxruntime.training") + if enable_training: + packages.extend( +@@ -565,6 +565,7 @@ if enable_training or enable_training_apis: + ] + ) + ++if enable_training: + requirements_file = "requirements-training.txt" + # with training, we want to follow this naming convention: + # stable: diff --git a/srcpkgs/onnxruntime/patches/remove-pkg_resources.patch b/srcpkgs/onnxruntime/patches/remove-pkg_resources.patch new file mode 100644 index 00000000000000..49ab5712c064b9 --- /dev/null +++ b/srcpkgs/onnxruntime/patches/remove-pkg_resources.patch @@ -0,0 +1,61 @@ +diff --git a/onnxruntime/python/tools/transformers/models/llama/benchmark_all.py b/onnxruntime/python/tools/transformers/models/llama/benchmark_all.py +index 059a69e..5f19c39 100644 +--- a/onnxruntime/python/tools/transformers/models/llama/benchmark_all.py ++++ b/onnxruntime/python/tools/transformers/models/llama/benchmark_all.py +@@ -245,18 +245,15 @@ def save_results(results, filename): + df["Memory (GB)"] = df["Memory (GB)"].astype("float") + + # get package name and version +- import pkg_resources # noqa: PLC0415 ++ from importlib.metadata import version, PackageNotFoundError # noqa: PLC0415 + +- installed_packages = pkg_resources.working_set +- installed_packages_list = sorted( +- [f"{i.key}=={i.version}" for i in installed_packages if i.key in ["onnxruntime", "onnxruntime-gpu"]] +- ) +- +- ort_pkg_name = "" +- ort_pkg_version = "" +- if installed_packages_list: +- ort_pkg_name = installed_packages_list[0].split("==")[0] +- ort_pkg_version = installed_packages_list[0].split("==")[1] ++ for name in ["onnxruntime", "onnxruntime-gpu"]: ++ try: ++ ort_pkg_version = version(name) ++ ort_pkg_name = name ++ break ++ except PackageNotFoundError: ++ continue + + # Save results to csv with standard format + records = [] +diff --git a/onnxruntime/python/tools/transformers/models/whisper/benchmark_all.py b/onnxruntime/python/tools/transformers/models/whisper/benchmark_all.py +index a5679fb..b1e32ae 100644 +--- a/onnxruntime/python/tools/transformers/models/whisper/benchmark_all.py ++++ b/onnxruntime/python/tools/transformers/models/whisper/benchmark_all.py +@@ -287,17 +287,15 @@ def save_results(results, filename): + df["Real Time Factor (RTF)"] = df["Real Time Factor (RTF)"].astype("float") + + # get package name and version +- import pkg_resources # noqa: PLC0415 ++ from importlib.metadata import version, PackageNotFoundError # noqa: PLC0415 + +- installed_packages = pkg_resources.working_set +- installed_packages_list = sorted( +- [f"{i.key}=={i.version}" for i in installed_packages if i.key in ["onnxruntime", "onnxruntime-gpu"]] +- ) +- ort_pkg_name = "" +- ort_pkg_version = "" +- if installed_packages_list: +- ort_pkg_name = installed_packages_list[0].split("==")[0] +- ort_pkg_version = installed_packages_list[0].split("==")[1] ++ for name in ["onnxruntime", "onnxruntime-gpu"]: ++ try: ++ ort_pkg_version = version(name) ++ ort_pkg_name = name ++ break ++ except PackageNotFoundError: ++ continue + + # Save results to csv with standard format + records = [] diff --git a/srcpkgs/onnxruntime/template b/srcpkgs/onnxruntime/template new file mode 100644 index 00000000000000..9287bfe48ad086 --- /dev/null +++ b/srcpkgs/onnxruntime/template @@ -0,0 +1,105 @@ +# Template file for 'onnxruntime' +pkgname=onnxruntime +version=1.24.4 +revision=1 +build_style=cmake +build_wrksrc=cmake + +_onnx_ver=1.20.1 +_eigen_commit=1d8b82b0740839c0de7f1242a3585e3390ff5f33 +_flatbuffers_ver=23.5.26 + +configure_args="-Donnxruntime_BUILD_SHARED_LIB=ON + -Donnxruntime_BUILD_UNIT_TESTS=OFF -DBUILD_TESTING=OFF + -Donnxruntime_ENABLE_TRAINING=OFF -Donnxruntime_ENABLE_PYTHON=ON + -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF + -Donnxruntime_USE_FULL_PROTOBUF=OFF + -Donnxruntime_USE_CUDA=OFF -Donnxruntime_USE_ROCM=OFF + -Donnxruntime_USE_DNNL=OFF -Donnxruntime_USE_OPENMP=ON + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_FLAGS=-Wno-error=maybe-uninitialized + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_ONNX=${XBPS_BUILDDIR}/onnx-${_onnx_ver} + -DFETCHCONTENT_SOURCE_DIR_EIGEN3=${XBPS_BUILDDIR}/eigen-${_eigen_commit} + -DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${XBPS_BUILDDIR}/flatbuffers-${_flatbuffers_ver}" + +hostmakedepends="pkg-config cmake git ninja protobuf + python3-setuptools python3-build python3-installer + python3-wheel python3-pybind11 python3-numpy" + +makedepends="boost-devel python3-pybind11 python3-devel + abseil-cpp-devel protobuf-devel re2-devel + json-c++ chrono-date-devel + microsoft-gsl pytorch-cpuinfo-devel safeint dlpack" + +short_desc="Cross-platform, high performance scoring engine for ML models" +maintainer="Orphaned " +license="MIT" +homepage="https://onnxruntime.ai" +distfiles="https://github.com/microsoft/onnxruntime/archive/refs/tags/v${version}.tar.gz + https://github.com/onnx/onnx/archive/refs/tags/v${_onnx_ver}.zip>onnx-${_onnx_ver}.zip + https://github.com/eigen-mirror/eigen/archive/${_eigen_commit}.zip>eigen-${_eigen_commit}.zip + https://github.com/google/flatbuffers/archive/refs/tags/v${_flatbuffers_ver}.zip>flatbuffers-${_flatbuffers_ver}.zip" +checksum="0cf4d2ee4392fbb8aedaabc6b2ba11b4a680d1071fa4f75546c2289ca5b404cf + a003e1f628406382c61900db668aa86c27afa8570dde7b9aced159579a443ab7 + 6a60d76351f97132669daeeb721d6bf14b008101883ad2d687a3201c5c461eb0 + 57bd580c0772fd1a726c34ab8bf05325293bc5f9c165060a898afa1feeeb95e1" + +skip_extraction="onnx-${_onnx_ver}.zip + eigen-${_eigen_commit}.zip + flatbuffers-${_flatbuffers_ver}.zip" + +nocross="FetchContent and Python wheel build not set up for cross compilation" + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" protobuf" +fi + +post_extract() { + vsrcextract -C "${XBPS_BUILDDIR}/onnx-${_onnx_ver}" "onnx-${_onnx_ver}.zip" + patch -d "${XBPS_BUILDDIR}/onnx-${_onnx_ver}" -Np1 < "${wrksrc}/cmake/patches/onnx/onnx.patch" + + vsrcextract -C "${XBPS_BUILDDIR}/eigen-${_eigen_commit}" "eigen-${_eigen_commit}.zip" + patch -d "${XBPS_BUILDDIR}/eigen-${_eigen_commit}" -Np1 < "${wrksrc}/cmake/patches/eigen/s390x-build.patch" + patch -d "${XBPS_BUILDDIR}/eigen-${_eigen_commit}" -Np1 < "${wrksrc}/cmake/patches/eigen/s390x-build-werror.patch" + + vsrcextract -C "${XBPS_BUILDDIR}/flatbuffers-${_flatbuffers_ver}" "flatbuffers-${_flatbuffers_ver}.zip" + patch -d "${XBPS_BUILDDIR}/flatbuffers-${_flatbuffers_ver}" -Np1 < "${wrksrc}/cmake/patches/flatbuffers/flatbuffers.patch" +} + +post_build() { + cd "${wrksrc}" + mkdir -p onnxruntime/capi + python3 setup.py --help + cp -r cmake/build/onnxruntime/* onnxruntime/ + mkdir -p onnxruntime/training + cp onnxruntime/python/training/__init__.py onnxruntime/training/ + python3 -m build --wheel --no-isolation +} + +post_install() { + vlicense "${wrksrc}/LICENSE" + + cd "${wrksrc}" + python3 -m installer --overwrite-existing --destdir="${DESTDIR}" dist/*.whl +} + +onnxruntime-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + vmove usr/lib/cmake + } +} + +python3-onnxruntime_package() { + short_desc+=" - Python3 bindings" + depends="${sourcepkg}>=${version}_${revision} + python3-numpy python3-protobuf python3-packaging" + pkg_install() { + vmove "${py3_sitelib}" + } +} \ No newline at end of file diff --git a/srcpkgs/python3-onnxruntime b/srcpkgs/python3-onnxruntime new file mode 120000 index 00000000000000..51decf87adad3e --- /dev/null +++ b/srcpkgs/python3-onnxruntime @@ -0,0 +1 @@ +onnxruntime \ No newline at end of file From 824188f040f46d7e7d63e85b56e91d66a6af0b9f Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:30:14 +0200 Subject: [PATCH 13/31] New package: pytorch-cpuinfo-2025.11.18 --- common/shlibs | 1 + srcpkgs/pytorch-cpuinfo-devel | 1 + srcpkgs/pytorch-cpuinfo/template | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 120000 srcpkgs/pytorch-cpuinfo-devel create mode 100644 srcpkgs/pytorch-cpuinfo/template diff --git a/common/shlibs b/common/shlibs index d1eced3ba6461d..d24fe090c326c9 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4573,3 +4573,4 @@ libgpiodcxx.so.2 libgpiod-2.2_4 libigloo.so.0 libigloo-0.9.5_1 libonnxruntime.so.1 onnxruntime-1.24.4_1 libonnxruntime_providers_shared.so onnxruntime-1.24.4_1 +libcpuinfo.so pytorch-cpuinfo-2025.11.18_1 diff --git a/srcpkgs/pytorch-cpuinfo-devel b/srcpkgs/pytorch-cpuinfo-devel new file mode 120000 index 00000000000000..b3934a5e6ab4a6 --- /dev/null +++ b/srcpkgs/pytorch-cpuinfo-devel @@ -0,0 +1 @@ +pytorch-cpuinfo \ No newline at end of file diff --git a/srcpkgs/pytorch-cpuinfo/template b/srcpkgs/pytorch-cpuinfo/template new file mode 100644 index 00000000000000..b9805192f32af7 --- /dev/null +++ b/srcpkgs/pytorch-cpuinfo/template @@ -0,0 +1,30 @@ +# Template file for 'pytorch-cpuinfo' +pkgname=pytorch-cpuinfo +version=2025.11.18 +revision=1 +build_style=cmake +configure_args="-DCPUINFO_BUILD_TOOLS=OFF -DCPUINFO_BUILD_UNIT_TESTS=OFF + -DCPUINFO_BUILD_MOCK_TESTS=OFF -DCPUINFO_BUILD_BENCHMARKS=OFF + -DCPUINFO_BUILD_PKG_CONFIG=ON -DBUILD_SHARED_LIBS=ON" +short_desc="CPU INFOrmation library" +maintainer="Orphaned " +license="BSD-2-Clause" +homepage="https://github.com/pytorch/cpuinfo" +distfiles="https://github.com/pytorch/cpuinfo/archive/403d652dca4c1046e8145950b1c0997a9f748b57.tar.gz" +checksum=c33bcad94ccbdd4966cc21291f0dcacd40d1dd04eb4c2a6ef1c8da669c01e024 +wrksrc=cpuinfo-403d652dca4c1046e8145950b1c0997a9f748b57 +shlib_provides="libcpuinfo.so" + +post_install() { + vlicense LICENSE +} + +pytorch-cpuinfo-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/share/cpuinfo + vmove usr/lib/pkgconfig + } +} \ No newline at end of file From cfc1d51cb4a8bdcb78a58946c5c9be0fd8c45b55 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:30:26 +0200 Subject: [PATCH 14/31] New package: safeint-3.0.28 --- srcpkgs/safeint/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/safeint/template diff --git a/srcpkgs/safeint/template b/srcpkgs/safeint/template new file mode 100644 index 00000000000000..fe98906d594e68 --- /dev/null +++ b/srcpkgs/safeint/template @@ -0,0 +1,21 @@ +# Template file for 'safeint' +pkgname=safeint +version=3.0.28 +revision=1 +short_desc="SafeInt - safe integer arithmetic library for C++" +maintainer="Orphaned " +license="MIT" +homepage="https://github.com/dcleblanc/SafeInt" +distfiles="https://github.com/dcleblanc/SafeInt/archive/refs/tags/${version}.tar.gz" +checksum=d6b164bcea92a746e4d44132e505c7ab1816d1089ba99ebc674ccd4b70262ed5 +wrksrc=SafeInt-${version} + +do_build() { + : +} + +do_install() { + vmkdir usr/include + vinstall SafeInt.hpp 644 usr/include + vlicense LICENSE +} \ No newline at end of file From 752544e8007ce7b5e1a2e5174d5992ca42390bc6 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:30:38 +0200 Subject: [PATCH 15/31] New package: dlpack-1.1 --- srcpkgs/dlpack/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/dlpack/template diff --git a/srcpkgs/dlpack/template b/srcpkgs/dlpack/template new file mode 100644 index 00000000000000..01eab64c5412be --- /dev/null +++ b/srcpkgs/dlpack/template @@ -0,0 +1,21 @@ +# Template file for 'dlpack' +pkgname=dlpack +version=1.1 +revision=1 +build_style=cmake +configure_args="-DBUILD_MOCK=OFF" +short_desc="Open in-memory tensor structure standard for deep learning" +maintainer="Orphaned " +license="Apache-2.0" +homepage="https://github.com/dmlc/dlpack" +distfiles="https://github.com/dmlc/dlpack/archive/refs/tags/v${version}.tar.gz" +checksum=2e3b94b55825c240cc58e6721e15b449978cbae21a2a4caa23058b0157ee2fb3 +wrksrc=dlpack-${version} + +do_build() { + : +} + +post_install() { + vlicense LICENSE +} \ No newline at end of file From 13674fec29b9b029bfa42473987977551d5a10da Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:30:49 +0200 Subject: [PATCH 16/31] New package: microsoft-gsl-4.0.0 --- srcpkgs/microsoft-gsl/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/microsoft-gsl/template diff --git a/srcpkgs/microsoft-gsl/template b/srcpkgs/microsoft-gsl/template new file mode 100644 index 00000000000000..b481fe92b96621 --- /dev/null +++ b/srcpkgs/microsoft-gsl/template @@ -0,0 +1,16 @@ +# Template file for 'microsoft-gsl' +pkgname=microsoft-gsl +version=4.0.0 +revision=1 +build_style=cmake +configure_args="-DGSL_TEST=OFF" +short_desc="Microsoft Guidelines Support Library for C++" +maintainer="Orphaned " +license="MIT" +homepage="https://github.com/microsoft/GSL" +distfiles="https://github.com/microsoft/GSL/archive/refs/tags/v${version}.tar.gz" +checksum=f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9 + +post_install() { + vlicense LICENSE +} \ No newline at end of file From adfec2c5b36f3d4e3c0a2bb905cf22ac71a62a45 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:11 +0200 Subject: [PATCH 17/31] Cockatrice: abseil-cpp SONAME bump --- srcpkgs/Cockatrice/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/Cockatrice/template b/srcpkgs/Cockatrice/template index afdf91507b7f01..b2496a2efb6519 100644 --- a/srcpkgs/Cockatrice/template +++ b/srcpkgs/Cockatrice/template @@ -1,7 +1,7 @@ # Template file for 'Cockatrice' pkgname=Cockatrice version=2.10.3 -revision=1 +revision=2 build_style=cmake configure_args="-DWITH_SERVER=1 -DWITH_CLIENT=1 -DWITH_ORACLE=1 -DTEST=1" hostmakedepends="qt6-tools qt6-base pkg-config extra-cmake-modules protobuf zlib" From 79df793f28f35c9ea864e41ba0cdb4f4a10c5a85 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:11 +0200 Subject: [PATCH 18/31] gfan: abseil-cpp SONAME bump --- srcpkgs/gfan/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gfan/template b/srcpkgs/gfan/template index 8271f4ee5ae0cf..3b97bee6de1790 100644 --- a/srcpkgs/gfan/template +++ b/srcpkgs/gfan/template @@ -1,7 +1,7 @@ # Template file for 'gfan' pkgname=gfan version=0.7 -revision=1 +revision=2 build_style=gnu-makefile makedepends="gmp-devel cddlib-devel abseil-cpp-devel" short_desc="Package for computing Groebner fans and tropical varieties" From 530858c981ae217caf66ce409608e2fcd28dbd93 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:12 +0200 Subject: [PATCH 19/31] grpc: abseil-cpp SONAME bump --- srcpkgs/grpc/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/grpc/template b/srcpkgs/grpc/template index ed3b6319fa57af..c0cde5de0c51fd 100644 --- a/srcpkgs/grpc/template +++ b/srcpkgs/grpc/template @@ -1,7 +1,7 @@ # Template file for 'grpc' pkgname=grpc version=1.61.1 -revision=4 +revision=5 build_style=cmake configure_args="-DBUILD_SHARED_LIBS=ON -DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package From bdb5902f19cd690d431ec967209880303de2ae13 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:12 +0200 Subject: [PATCH 20/31] justbuild: abseil-cpp SONAME bump --- srcpkgs/justbuild/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/justbuild/template b/srcpkgs/justbuild/template index 3f7c2497b83d7f..6764b09202e3ea 100644 --- a/srcpkgs/justbuild/template +++ b/srcpkgs/justbuild/template @@ -1,7 +1,7 @@ # Template file for 'justbuild' pkgname=justbuild version=1.6.5 -revision=1 +revision=2 create_wrksrc=yes hostmakedepends="jo pandoc pkg-config python3 tar unzip wget grpc protobuf" makedepends="abseil-cpp-devel c-ares-devel catch2 fmt-devel grpc-devel json-c++ From 97b9bc70bb08a9f79125fee8c603ceef1f4a1397 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:12 +0200 Subject: [PATCH 21/31] kodi: abseil-cpp SONAME bump --- srcpkgs/kodi/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 422ba2bc5b8230..57572a0faa1625 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -1,7 +1,7 @@ # Template file for 'kodi' pkgname=kodi version=21.2 -revision=5 +revision=6 _codename="Omega" _crossguid_ver="ca1bf4b810e2d188d04cb6286f957008ee1b7681" _dvdcss_ver="1.4.3-Next-Nexus-Alpha2-2" From 9808a5126bc415642252d4bc19d3f8b013379c8c Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:12 +0200 Subject: [PATCH 22/31] libreoffice: abseil-cpp SONAME bump --- srcpkgs/libreoffice/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libreoffice/template b/srcpkgs/libreoffice/template index 7201565f6ee4a5..3d1fc547e40e99 100644 --- a/srcpkgs/libreoffice/template +++ b/srcpkgs/libreoffice/template @@ -1,7 +1,7 @@ # Template file for 'libreoffice' pkgname=libreoffice version=26.2.2.2 -revision=1 +revision=2 build_helper="gir" build_style=configure # hack, avoid sourcing common/.../gnu-configure-args.sh metapackage=yes From f86aac44159675eb03e733a9f3fe4cf88355e824 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:13 +0200 Subject: [PATCH 23/31] marble: abseil-cpp SONAME bump --- srcpkgs/marble/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/marble/template b/srcpkgs/marble/template index 2cd1ae6a831beb..940c07c68233c9 100644 --- a/srcpkgs/marble/template +++ b/srcpkgs/marble/template @@ -1,7 +1,7 @@ # Template file for 'marble' pkgname=marble version=25.12.2 -revision=1 +revision=2 build_style=cmake configure_args="-DMARBLE_PRI_INSTALL_DIR=/usr/lib/qt6/mkspecs/modules -DKDE_INSTALL_QMLDIR=lib/qt6/qml From 8b3acf80604613aa91cc9cc48e939f10572144ed Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:13 +0200 Subject: [PATCH 24/31] protobuf: abseil-cpp SONAME bump --- srcpkgs/protobuf/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/protobuf/template b/srcpkgs/protobuf/template index 39d9441b532414..c9c9ee419113fc 100644 --- a/srcpkgs/protobuf/template +++ b/srcpkgs/protobuf/template @@ -1,7 +1,7 @@ # Template file for 'protobuf' pkgname=protobuf version=25.2 -revision=5 +revision=6 build_style=cmake configure_args="-Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ABSL_PROVIDER=package From e09523eaa893574641c07c294a885b733ad094a1 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:13 +0200 Subject: [PATCH 25/31] python3-grpcio: abseil-cpp SONAME bump --- srcpkgs/python3-grpcio/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/python3-grpcio/template b/srcpkgs/python3-grpcio/template index 0787f3e81bce67..5b937cc4df18b8 100644 --- a/srcpkgs/python3-grpcio/template +++ b/srcpkgs/python3-grpcio/template @@ -1,7 +1,7 @@ # Template file for 'python3-grpcio' pkgname=python3-grpcio version=1.67.1 -revision=3 +revision=4 build_style=python3-module hostmakedepends="python3-setuptools python3-six python3-Cython" makedepends="python3-devel zlib-devel c-ares-devel re2-devel openssl-devel From a9390679eb4ef95b760bd960910c36ac01b90c0e Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:13 +0200 Subject: [PATCH 26/31] re2: abseil-cpp SONAME bump --- srcpkgs/re2/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/re2/template b/srcpkgs/re2/template index 8b4e00b77959fa..b68fb86140f6ef 100644 --- a/srcpkgs/re2/template +++ b/srcpkgs/re2/template @@ -1,7 +1,7 @@ # Template file for 're2' pkgname=re2 version=2025.11.05 -revision=2 +revision=3 build_style=cmake configure_args="-DBUILD_SHARED_LIBS=ON -DRE2_USE_ICU=ON" hostmakedepends="pkg-config" From e7c07f15faa40102e2f287dddea2395e8d32785a Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:13 +0200 Subject: [PATCH 27/31] tg_owt: abseil-cpp SONAME bump --- srcpkgs/tg_owt/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template index cde0588d9cd05c..906fed47eb2a64 100644 --- a/srcpkgs/tg_owt/template +++ b/srcpkgs/tg_owt/template @@ -1,7 +1,7 @@ # Template file for 'tg_owt' pkgname=tg_owt version=0.0.0.20260102 -revision=2 +revision=3 _commit=d888bc3f79b4aa80333d8903410fa439db5f6696 _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406 _crc32c_commit=21fc8ef30415a635e7351ffa0e5d5367943d4a94 From 8673ad8bf96908edb6432b29c48c2d12f81aeae9 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:14 +0200 Subject: [PATCH 28/31] webrtc-audio-processing-2: abseil-cpp SONAME bump --- srcpkgs/webrtc-audio-processing-2/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/webrtc-audio-processing-2/template b/srcpkgs/webrtc-audio-processing-2/template index 33ac022b476de0..0ea1a6c3f8548a 100644 --- a/srcpkgs/webrtc-audio-processing-2/template +++ b/srcpkgs/webrtc-audio-processing-2/template @@ -1,7 +1,7 @@ # Template file for 'webrtc-audio-processing-2' pkgname=webrtc-audio-processing-2 version=2.1 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config" makedepends="abseil-cpp-devel" From c29395a0c7d73affe21d8b52626b848f4c73d778 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:31:14 +0200 Subject: [PATCH 29/31] webrtc-audio-processing: abseil-cpp SONAME bump --- srcpkgs/webrtc-audio-processing/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/webrtc-audio-processing/template b/srcpkgs/webrtc-audio-processing/template index e8d6f805c35840..48f2f0477a438b 100644 --- a/srcpkgs/webrtc-audio-processing/template +++ b/srcpkgs/webrtc-audio-processing/template @@ -1,7 +1,7 @@ # Template file for 'webrtc-audio-processing' pkgname=webrtc-audio-processing version=1.3 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config" makedepends="abseil-cpp-devel" From 6fd65045e269e665e3da22a6d85163ee05a9f2c9 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:43:14 +0200 Subject: [PATCH 30/31] android-tools: abseil-cpp SONAME bump --- srcpkgs/android-tools/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/android-tools/template b/srcpkgs/android-tools/template index df0f7bde339815..c0d4ed40016cea 100644 --- a/srcpkgs/android-tools/template +++ b/srcpkgs/android-tools/template @@ -1,7 +1,7 @@ # Template file for 'android-tools' pkgname=android-tools version=35.0.2 -revision=2 +revision=3 archs="armv* aarch64* x86_64* i686* ppc64le* riscv64*" build_style=cmake # requires new changes in libusb that have not been released yet From 13df2e654351592538ad05f950531b8ffba0ca73 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 11 Apr 2026 22:43:32 +0200 Subject: [PATCH 31/31] calibre: enable piper TTS with onnxruntime and espeak-ng - Add espeak-ng-compat.patch providing espeak_TextToPhonemesWithTerminator() shim - Remove disable-piper.patch and disable-piper-env.patch - Add libespeak-ng-devel and onnxruntime-devel to makedepends - Add espeak-ng and python3-onnxruntime to depends --- .../calibre/patches/disable-piper-env.patch | 17 -------------- srcpkgs/calibre/patches/disable-piper.patch | 17 -------------- .../calibre/patches/espeak-ng-compat.patch | 23 +++++++++++++++++++ srcpkgs/calibre/template | 8 +++---- 4 files changed, 27 insertions(+), 38 deletions(-) delete mode 100644 srcpkgs/calibre/patches/disable-piper-env.patch delete mode 100644 srcpkgs/calibre/patches/disable-piper.patch create mode 100644 srcpkgs/calibre/patches/espeak-ng-compat.patch diff --git a/srcpkgs/calibre/patches/disable-piper-env.patch b/srcpkgs/calibre/patches/disable-piper-env.patch deleted file mode 100644 index 7995ecde5ea11b..00000000000000 --- a/srcpkgs/calibre/patches/disable-piper-env.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/setup/build_environment.py -+++ b/setup/build_environment.py -@@ -220,10 +220,10 @@ elif ismacos: - uchardet_inc_dirs = pkgconfig_include_dirs('uchardet', '', '/usr/include/uchardet') - uchardet_lib_dirs = pkgconfig_lib_dirs('uchardet', '', '/usr/lib') - uchardet_libs = pkgconfig_libs('uchardet', '', '') -- piper_inc_dirs = pkgconfig_include_dirs('espeak-ng', '', '/usr/include') + pkgconfig_include_dirs( -- 'libonnxruntime', '', '/usr/include/onnxruntime') -- piper_lib_dirs = pkgconfig_lib_dirs('espeak-ng', '', '/usr/lib') + pkgconfig_lib_dirs('libonnxruntime', '', '/usr/lib') -- piper_libs = pkgconfig_libs('espeak-ng', '', 'espeak-ng') + pkgconfig_libs('libonnxruntime', '', 'onnxruntime') -+ # Piper disabled - requires onnxruntime which is not packaged -+ piper_inc_dirs = [] -+ piper_lib_dirs = [] -+ piper_libs = [] - for x in ('libavcodec', 'libavformat', 'libavdevice', 'libavfilter', 'libavutil', 'libpostproc', 'libswresample', 'libswscale'): - for inc in pkgconfig_include_dirs(x, '', '/usr/include'): - if inc and inc not in ffmpeg_inc_dirs: \ No newline at end of file diff --git a/srcpkgs/calibre/patches/disable-piper.patch b/srcpkgs/calibre/patches/disable-piper.patch deleted file mode 100644 index b0e3093b751dfb..00000000000000 --- a/srcpkgs/calibre/patches/disable-piper.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/setup/extensions.json -+++ b/setup/extensions.json -@@ -135,14 +135,6 @@ - "needs_c++": "17" - }, -- { -- "name": "piper", -- "sources": "calibre/utils/tts/piper.cpp", -- "needs_c++": "17", -- "libraries": "!piper_libs", -- "lib_dirs": "!piper_lib_dirs", -- "inc_dirs": "!piper_inc_dirs" -- }, - { - "name": "html_as_json", - "sources": "calibre/srv/html_as_json.cpp", - "needs_c++": "11" diff --git a/srcpkgs/calibre/patches/espeak-ng-compat.patch b/srcpkgs/calibre/patches/espeak-ng-compat.patch new file mode 100644 index 00000000000000..7654e650560d90 --- /dev/null +++ b/srcpkgs/calibre/patches/espeak-ng-compat.patch @@ -0,0 +1,23 @@ +--- a/src/calibre/utils/tts/piper.cpp ++++ b/src/calibre/utils/tts/piper.cpp +@@ -36,6 +36,21 @@ + (45 | CLAUSE_INTONATION_EXCLAMATION | CLAUSE_TYPE_SENTENCE) + #define CLAUSE_COLON (30 | CLAUSE_INTONATION_FULL_STOP | CLAUSE_TYPE_CLAUSE) + #define CLAUSE_SEMICOLON (30 | CLAUSE_INTONATION_COMMA | CLAUSE_TYPE_CLAUSE) ++ ++// espeak_TextToPhonemesWithTerminator was added after espeak-ng 1.52.0. ++// Provide a compatibility shim using the older espeak_TextToPhonemes API. ++static inline const char * ++espeak_TextToPhonemesWithTerminator(const void **textptr, int textmode, ++ int phonememode, int *terminator) ++{ ++ const char *result = espeak_TextToPhonemes(textptr, textmode, phonememode); ++ if (terminator) { ++ // No terminator info available; use sentence boundary at end-of-text, ++ // clause boundary otherwise. ++ *terminator = (*textptr == NULL) ? CLAUSE_PERIOD : CLAUSE_COMMA; ++ } ++ return result; ++} + static const bool USE_GPU = false; + static const bool PRINT_TIMING_INFORMATION = false; \ No newline at end of file diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 735040da7f603d..0b9ab685bc923e 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre version=9.6.0 -revision=2 +revision=3 build_helper=python3 pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow @@ -17,7 +17,7 @@ makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel - ffmpeg6-devel" + ffmpeg6-devel libespeak-ng-devel onnxruntime-devel" depends="desktop-file-utils optipng poppler python3-BeautifulSoup4 qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw @@ -31,7 +31,7 @@ depends="desktop-file-utils optipng poppler python3-BeautifulSoup4 python3-pyqt6-printsupport python3-pyqt6-webchannel python3-pyqt6-svg python3-pyqt6-pdf python3-pyqt6-webengine python3-fonttools python3-pyqt6-speech python3-pyqt6-multimedia python3-pykakasi - python3-lxml_html_clean" + python3-lxml_html_clean espeak-ng python3-onnxruntime" checkdepends="${depends} libjpeg-turbo-tools jxrlib" short_desc="Ebook management application" maintainer="Orphaned " @@ -184,7 +184,7 @@ do_check() { # searching test case fails (non-deterministic) # test_dom_load case fails # test_recipe_browser_webengine case fails on ci - # test_piper not packaged + # test_piper needs working audio # test_websocket_basic fails python3 setup.py test \ --exclude-test-name unrar \