From 53dd8a2211445929bd38e98ec6745d6997342ea5 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Fri, 23 Jan 2026 17:45:02 +0100 Subject: [PATCH 1/7] python3-ocrmypdf: update to 17.4.0 --- srcpkgs/python3-ocrmypdf/template | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template index 0ebcadb0bdcb87..8dbd8c710bab23 100644 --- a/srcpkgs/python3-ocrmypdf/template +++ b/srcpkgs/python3-ocrmypdf/template @@ -1,15 +1,22 @@ # Template file for 'python3-ocrmypdf' pkgname=python3-ocrmypdf -version=16.13.0 +version=17.4.0 revision=1 build_style=python3-pep517 hostmakedepends="hatchling hatch-vcs" depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich - python3-pillow_heif tesseract-ocr ghostscript unpaper pngquant jbig2enc qpdf" + python3-pillow_heif tesseract-ocr ghostscript unpaper pngquant jbig2enc qpdf + python3-fpdf2 python3-pydantic python3-pypdfium2 python3-uharfbuzz" short_desc="Add OCR text layer to scanned PDF files" maintainer="Mateusz Sylwestrzak " license="MPL-2.0" homepage="https://github.com/ocrmypdf/OCRmyPDF" +changelog="https://raw.githubusercontent.com/ocrmypdf/OCRmyPDF/main/docs/release_notes.md" distfiles="${PYPI_SITE}/o/ocrmypdf/ocrmypdf-${version}.tar.gz" -checksum=29d37e915234ce717374863a9cc5dd32d29e063dfe60c51380dda71254c88248 +checksum=4bbc53249f3981599565f670c5de774d6440832eede87c515e6608880fa02a34 + +post_install() { + vcompletion misc/completion/ocrmypdf.bash bash ocrmypdf + vcompletion misc/completion/ocrmypdf.fish fish ocrmypdf +} From e3be27bb8da3fd8a9f3ae9a20ec2c6577cfd9830 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Fri, 23 Jan 2026 17:45:58 +0100 Subject: [PATCH 2/7] New package: python3-fpdf2-2.8.7 --- srcpkgs/python3-fpdf2/template | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 srcpkgs/python3-fpdf2/template diff --git a/srcpkgs/python3-fpdf2/template b/srcpkgs/python3-fpdf2/template new file mode 100644 index 00000000000000..c9a60b2929c9b4 --- /dev/null +++ b/srcpkgs/python3-fpdf2/template @@ -0,0 +1,13 @@ +# Template file for 'python3-fpdf2' +pkgname=python3-fpdf2 +version=2.8.7 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools_scm python3-wheel fonttools" +depends="python3-defusedxml python3-Pillow fonttools" +short_desc="Simple PDF generation for Python" +maintainer="Mateusz Sylwestrzak " +license="LGPL-3.0-only" +homepage="https://github.com/py-pdf/fpdf2" +distfiles="${PYPI_SITE}/f/fpdf2/fpdf2-${version}.tar.gz" +checksum=7060ccee5a9c7ab0a271fb765a36a23639f83ef8996c34e3d46af0a17ede57f9 From 29e0e2414585d6c63fd1d80a18d3cda81ee1ae93 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Fri, 23 Jan 2026 17:47:10 +0100 Subject: [PATCH 3/7] New package: python3-uharfbuzz-0.53.3 --- srcpkgs/python3-uharfbuzz/template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 srcpkgs/python3-uharfbuzz/template diff --git a/srcpkgs/python3-uharfbuzz/template b/srcpkgs/python3-uharfbuzz/template new file mode 100644 index 00000000000000..27be5262c9fd8e --- /dev/null +++ b/srcpkgs/python3-uharfbuzz/template @@ -0,0 +1,14 @@ +# Template file for 'python3-uharfbuzz' +pkgname=python3-uharfbuzz +version=0.53.3 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools_scm python3-wheel python3-Cython python3-pkgconfig" +makedepends="python3-devel" +depends="python3" +short_desc="Streamlined Cython bindings for the harfbuzz shaping engine" +maintainer="Mateusz Sylwestrzak " +license="Apache-2.0" +homepage="https://github.com/harfbuzz/uharfbuzz" +distfiles="${PYPI_SITE}/u/uharfbuzz/uharfbuzz-${version}.tar.gz" +checksum=9a87175c14d1361322ce2a3504e63c6b66062934a5edf47266aed5b33416806c From e2398a2046d917a9db791824303ed1d1d4369cfa Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Fri, 23 Jan 2026 17:48:22 +0100 Subject: [PATCH 4/7] New package: python3-pypdfium2-5.6.0 --- srcpkgs/python3-pypdfium2/template | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 srcpkgs/python3-pypdfium2/template diff --git a/srcpkgs/python3-pypdfium2/template b/srcpkgs/python3-pypdfium2/template new file mode 100644 index 00000000000000..f25424cb4e82f8 --- /dev/null +++ b/srcpkgs/python3-pypdfium2/template @@ -0,0 +1,69 @@ +# Template file for 'python3-pypdfium2' +pkgname=python3-pypdfium2 +version=5.6.0 +revision=1 +build_style=python3-pep517 +build_wrksrc="pypdfium2-${version}" +hostmakedepends="python3-setuptools_scm python3-wheel python3-packaging tar pkg-config gcc" +makedepends="python3-devel libpdfium-devel" +depends="python3 libpdfium" +checkdepends="python3-pytest python3-Pillow python3-numpy" +short_desc="Python bindings to PDFium" +maintainer="Mateusz Sylwestrzak " +license="Apache-2.0 OR BSD-3-Clause OR CC-BY-4.0 OR LGPL-3.0-or-later OR MIT OR MPL-2.0" +homepage="https://github.com/pypdfium2-team/pypdfium2" +_ctypesgen_commit="b561360fad763b4a64e2d8ef8f7ddf354670dbb7" # use pypdfium2's own fork of ctypesgen +distfiles="https://github.com/pypdfium2-team/pypdfium2/archive/refs/tags/${version}.tar.gz + https://github.com/pypdfium2-team/ctypesgen/archive/${_ctypesgen_commit}.tar.gz>ctypesgen-${_ctypesgen_commit}.tar.gz" +checksum="cd0b778b6a785e31f6c3b666b7e3d5a2f278d20247f1826379b1fc20ee14ff63 + 5ae14b36da396d3bea23e41f615c12349697be63144fc840f29336e50ab94406" +create_wrksrc=yes + +post_extract() { + mv "ctypesgen-${_ctypesgen_commit}" "ctypesgen_fork" +} + +pre_build() { + export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" + export PDFIUM_PLATFORM="sourcebuild" + + _data_dir="data/sourcebuild" + mkdir -p "${_data_dir}" + + _prefix="${XBPS_CROSS_BASE}/usr" + _header_dir="${_prefix}/include/pdfium" + + _headers=$(find "${_header_dir}" -maxdepth 1 -name "*.h" | sort) + + _pdfium_ver=$(pkg-config --modversion pdfium) + + cat > "${_data_dir}/version.json" <<-EOF + {"major":0,"minor":0,"build":${_pdfium_ver},"patch":0,"origin":"sourcebuild","flags":[],"n_commits":0,"hash":"","is_reproducible":true} + EOF + + PYTHONPATH="../ctypesgen_fork/src" python3 -m ctypesgen \ + --library pdfium --no-srcinfo \ + --headers ${_headers} \ + --cpp "${CC} -E ${CFLAGS} ${CPPFLAGS}" \ + -I "${_header_dir}" \ + -I "${_prefix}/include" \ + -I "$(${CC} -print-file-name=include)" \ + -D "FPDF_EXPORT=" -D "FPDF_CALLCONV=" -D "__linux__" \ + -o "${_data_dir}/bindings.py" + + # Resolve the path to libpdfium.so.VER + local _real_path=$(readlink -f "${XBPS_CROSS_BASE}/usr/lib/libpdfium.so") + local _real_name="${_real_path##*/}" + + # Runtime fix: ensure it loads the specific SO version + vsed -i "${_data_dir}/bindings.py" \ + -e "s|name = 'pdfium'|name = '${_real_name}'|g" + + vsed -i pyproject.toml \ + -e '/ctypesgen/d' +} + +post_install() { + vlicense LICENSES/BSD-3-Clause.txt + vlicense LICENSES/MIT.txt +} From cd4b10eeea3230f5158e3845742b66d30dc40d71 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Fri, 23 Jan 2026 17:50:08 +0100 Subject: [PATCH 5/7] New package: libpdfium-7734 --- common/shlibs | 1 + srcpkgs/libpdfium-devel | 1 + srcpkgs/libpdfium/template | 166 +++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) create mode 120000 srcpkgs/libpdfium-devel create mode 100644 srcpkgs/libpdfium/template diff --git a/common/shlibs b/common/shlibs index 0096e26b4cba0f..dfa21262c93e5b 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4535,6 +4535,7 @@ libclapper-0.0.so.0 clapper-libs-0.8.0_1 libopenxr_loader.so.1 openxr-1.1.47_1 libppsdocument-4.0.so.6 libpapers-50.0_1 libppsview-4.0.so.5 libpapers-50.0_1 +libpdfium.so.7734 libpdfium-7734_1 libngtcp2.so.16 ngtcp2-1.13.0_1 libngtcp2_crypto_ossl.so.0 ngtcp2-1.13.0_1 libprom.so prometheus-client-c-0.1.3_1 diff --git a/srcpkgs/libpdfium-devel b/srcpkgs/libpdfium-devel new file mode 120000 index 00000000000000..793badd0d9e2d3 --- /dev/null +++ b/srcpkgs/libpdfium-devel @@ -0,0 +1 @@ +libpdfium \ No newline at end of file diff --git a/srcpkgs/libpdfium/template b/srcpkgs/libpdfium/template new file mode 100644 index 00000000000000..e6d673ed0472a6 --- /dev/null +++ b/srcpkgs/libpdfium/template @@ -0,0 +1,166 @@ +# Template file for 'libpdfium' +# Updating libpdfium might break ABI, so make sure all dependents get rebuilt (e.g. pypdfium2) +# Also update common/shlibs as this package produces libpdfium.so.${version} +pkgname=libpdfium +version=7734 +revision=1 +_commit_pdfium="ab5a98e4b1d6885b896b12996bf2b37630505ad0" +_commit_build="f05f529c87391f7526e8d85305873c0b2aae9ffb" +_commit_buildtools="95ed44cf5f06dbb5861030b91c9db9ccb4316762" +_release_fast_float="8.2.2" +hostmakedepends="python3 ninja gn pkg-config tar" +makedepends="libjpeg-turbo-devel icu-devel libopenjpeg2-devel freetype-devel + glib-devel abseil-cpp-devel lcms2-devel libpng-devel zlib-devel harfbuzz-devel" +short_desc="Google PDF rendering library" +maintainer="Mateusz Sylwestrzak " +license="Apache-2.0" +homepage="https://pdfium.googlesource.com/pdfium" +distfiles=" + https://pdfium.googlesource.com/pdfium/+archive/${_commit_pdfium}.tar.gz>pdfium-${version}.tar.gz + https://chromium.googlesource.com/chromium/src/build/+archive/${_commit_build}.tar.gz>build-${version}.tar.gz + https://chromium.googlesource.com/chromium/src/buildtools/+archive/${_commit_buildtools}.tar.gz>buildtools-${version}.tar.gz + https://github.com/fastfloat/fast_float/archive/refs/tags/v${_release_fast_float}.tar.gz>fast_float.tar.gz" +checksum="@d69c60fc107741c425d1d9d7831cb78573b2abbe78c0fc6d99940d23f570b7ac + @0c2ebe340b699d9fda29a7e4be329466fdd4c71e5e0293bd3524877d3a88491d + @eb42a499f3e0b3fdcba491ede62772659b98ef518cb5f44a8925d8cce13ffe91 + e64b5fff88e04959154adbd5fb83331d91f2e04ac06454671cdfcbdff172b158" +skip_extraction="build-${version}.tar.gz buildtools-${version}.tar.gz fast_float.tar.gz" + +post_extract() { + mkdir -p build buildtools third_party/fast_float/src \ + third_party/icu third_party/abseil-cpp + + local _dist="${XBPS_SRCDISTDIR}/${pkgname}-${version}" + tar -xf "${_dist}/build-${version}.tar.gz" -C build + tar -xf "${_dist}/buildtools-${version}.tar.gz" -C buildtools + tar -xf "${_dist}/fast_float.tar.gz" -C third_party/fast_float/src --strip-components=1 + + # Mock testing targets to satisfy internal dependencies + rm -f testing/BUILD.gn + for g in pdfium_test path_service embedder_test_support unit_test_support test_support pixel_diff_utils; do + echo "group(\"$g\") {}" >> testing/BUILD.gn + done + + cat > build/config/gclient_args.gni <<-EOF + checkout_google_benchmark = false + checkout_nacl = false + EOF + + cat > build_overrides/build.gni <<-EOF + build_with_chromium = false + use_system_libcxx = true + EOF + + # System shim for ICU + cat > third_party/icu/BUILD.gn <<-EOF + import("//build/config/linux/pkg_config.gni") + pkg_config("icu_config") { packages = [ "icu-uc", "icu-i18n" ] } + group("icuuc") { public_configs = [ ":icu_config" ] } + group("icui18n") { public_configs = [ ":icu_config" ] } +EOF + + # System shim for Abseil + cat > third_party/abseil-cpp/BUILD.gn <<-EOF + import("//build/config/linux/pkg_config.gni") + pkg_config("absl_config") { + packages = [ + "absl_base", "absl_int128", "absl_strings", "absl_hash", + "absl_synchronization", "absl_raw_hash_set", + "absl_low_level_hash", "absl_raw_logging_internal" + ] + } + group("absl") { public_configs = [ ":absl_config" ] } +EOF +} + +post_patch() { + # Transform internal paths to system-wide include style + find core -type f \( -name "*.cpp" -o -name "*.h" \) -exec sed -i \ + -e 's|#include "third_party/abseil-cpp/\(.*\)"|#include <\1>|g' \ + -e 's|#include "third_party/icu/source/common/\(.*\)"|#include <\1>|g' \ + -e 's|#include "third_party/icu/source/i18n/\(.*\)"|#include <\1>|g' {} + + + # Strip ARM64-specific strictness that breaks build for this arch + vsed -i build/config/compiler/BUILD.gn \ + -e 's/-Wl,--fatal-warnings/-Wl,--no-fatal-warnings/g' + + # Map build-system toolchain to XBPS environment + vsed -i build/toolchain/linux/BUILD.gn \ + -e '/toolprefix =/d' \ + -e "s|cc = \".*gcc\"|cc = \"${CC}\"|g" \ + -e "s|cxx = \".*g++\"|cxx = \"${CXX}\"|g" \ + -e "s|ar = \".*ar\"|ar = \"${AR}\"|g" \ + -e "s|nm = \".*nm\"|nm = \"${NM}\"|g" \ + -e "s|readelf = \".*readelf\"|readelf = \"${READELF}\"|g" + + vsed -i build/config/compiler/BUILD.gn \ + -e '1i declare_args() { extra_cflags="" extra_cppflags="" extra_ldflags="" }' +} + +do_configure() { + case "$XBPS_TARGET_MACHINE" in + aarch64*) _cpu=arm64 ;; + arm*) _cpu=arm ;; + mips64*) _cpu=mips64 ;; + mips*) _cpu=mips ;; + ppc*) _cpu=ppc ;; + i686*) _cpu=x86 ;; + x86_64*) _cpu=x64 ;; + esac + + # Enforce global flags for all arches + local _extra_cflags="${CFLAGS} -Wno-free-nonheap-object" + local _extra_cppflags="${CXXFLAGS} -Wno-free-nonheap-object" + local _extra_ldflags="${LDFLAGS} -Wl,-soname,libpdfium.so.${version} -Wl,--no-fatal-warnings" + + gn gen out/Release --args=" + target_cpu=\"${_cpu}\" is_debug=false is_component_build=true + pdf_is_standalone=true pdf_enable_v8=false pdf_enable_xfa=false pdf_use_skia=false + use_custom_libcxx=false use_sysroot=false + is_clang=false treat_warnings_as_errors=false symbol_level=0 + use_system_zlib=true + use_system_libpng=true + use_system_libjpeg=true + use_system_libopenjpeg2=true + use_system_lcms2=true + use_system_freetype=true + pdf_bundle_freetype=false + use_system_harfbuzz=true + extra_cflags=\"${_extra_cflags}\" + extra_cppflags=\"${_extra_cppflags}\" + extra_ldflags=\"${_extra_ldflags}\"" +} + +do_build() { + ninja -C out/Release pdfium +} + +do_install() { + vinstall out/Release/libpdfium.so 755 usr/lib libpdfium.so.${version} + ln -sf libpdfium.so.${version} ${DESTDIR}/usr/lib/libpdfium.so + vmkdir usr/include/pdfium + vcopy "public/*.h" usr/include/pdfium + + vmkdir usr/lib/pkgconfig + cat > "${DESTDIR}/usr/lib/pkgconfig/pdfium.pc" <<-EOF + prefix=/usr + exec_prefix=\${prefix} + libdir=\${exec_prefix}/lib + includedir=\${prefix}/include/pdfium + Name: pdfium + Description: Google PDFium rendering library + Version: ${version} + Libs: -L\${libdir} -lpdfium + Cflags: -I\${includedir} +EOF +} + +libpdfium-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove "usr/lib/*.so" + vmove usr/include + vmove usr/lib/pkgconfig + } +} From 6c4f916e5faa689efeff3fa7254371aea490662b Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Thu, 26 Mar 2026 20:47:29 +0100 Subject: [PATCH 6/7] img2pdf: update to 0.6.3 --- srcpkgs/img2pdf/template | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template index d026e15adb85b9..77a12972e4d49e 100644 --- a/srcpkgs/img2pdf/template +++ b/srcpkgs/img2pdf/template @@ -1,14 +1,22 @@ # Template file for 'img2pdf' pkgname=img2pdf -version=0.6.1 -revision=2 -build_style=python3-module -hostmakedepends="python3-pikepdf python3-setuptools" -depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter" +version=0.6.3 +revision=1 +build_style=python3-pep517 +make_check_args="-k not(miff_cmyk)" +hostmakedepends="python3-flit_core" +depends="python3-pikepdf python3-Pillow" +checkdepends="python3-pytest python3-numpy python3-scipy ImageMagick poppler + ghostscript mupdf-tools netpbm exiftool colord ${depends}" short_desc="Lossless conversion of raster images to PDF" maintainer="Orphaned " -license="GPL-3.0-or-later" +license="LGPL-3.0-or-later" homepage="https://gitlab.mister-muffin.de/josch/img2pdf" distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz" -checksum=306e279eb832bc159d7d6294b697a9fbd11b4be1f799b14b3b2174fb506af289 -make_check=no # need to patch out some bitdepth checks +checksum=219518020f5bd242bdc46493941ea3f756f664c2e86f2454721e74353f58cd95 + +case "$XBPS_TARGET_MACHINE" in + i686) + make_check=no # 70 errors on this arch + ;; +esac From 21be1c04a223cf8c6cc61fef3f7d4db7c668c36b Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Thu, 26 Mar 2026 20:48:02 +0100 Subject: [PATCH 7/7] python3-pikepdf: update to 10.5.0 --- srcpkgs/python3-pikepdf/template | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template index 442b397035b7d6..88482f739d9fb7 100644 --- a/srcpkgs/python3-pikepdf/template +++ b/srcpkgs/python3-pikepdf/template @@ -1,6 +1,6 @@ # Template file for 'python3-pikepdf' pkgname=python3-pikepdf -version=10.1.0 +version=10.5.0 revision=1 build_style=python3-pep517 hostmakedepends="python3-pybind11 python3-wheel" @@ -16,4 +16,12 @@ license="MPL-2.0" homepage="https://github.com/pikepdf/pikepdf" changelog="https://raw.githubusercontent.com/pikepdf/pikepdf/master/docs/releasenotes/version${version%%.*}.rst" distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz" -checksum=d75778283c354580a462d31bd4334f6ba92225e41ccd8bb949ec6e98a23d4eb2 +checksum=62c66fb15174bf7c13029ae67b64e04f7c5c2f9af1bd9c9aecf08f808a02acab + +if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then + case "$XBPS_TARGET_MACHINE" in + x86_64*|i686) + make_check_args="-k not((test_save_to_dev_null)or(test_repr_stream))" + ;; + esac +fi