Add test for poppler build and include lcms2 dll

This commit is contained in:
Kovid Goyal 2025-09-21 08:22:58 +05:30
parent f138d60a40
commit 95f9cd9584
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 11 additions and 2 deletions

View File

@ -42,7 +42,7 @@ def binary_includes():
' webp webpmux webpdemux sharpyuv exslt ncursesw readline chm hunspell-1.7 hyphen'
' icudata icui18n icuuc icuio stemmer gcrypt gpg-error uchardet graphite2 espeak-ng'
' brotlicommon brotlidec brotlienc zstd podofo ssl crypto deflate tiff onnxruntime'
' gobject-2.0 glib-2.0 gthread-2.0 gmodule-2.0 gio-2.0 dbus-glib-1').split()
' gobject-2.0 glib-2.0 gthread-2.0 gmodule-2.0 gio-2.0 dbus-glib-1 lcms2').split()
)) + [
# debian/ubuntu for for some typical stupid reason use libpcre.so.3
# instead of libpcre.so.0 like other distros. And Qt's idiotic build

View File

@ -484,7 +484,7 @@ class Freeze:
@flush
def add_poppler(self):
print('\nAdding poppler')
for x in ('libopenjp2.7.dylib', 'libpoppler.130.dylib',):
for x in ('libopenjp2.7.dylib', 'libpoppler.130.dylib', 'liblcms2.2.dylib',):
self.install_dylib(join(PREFIX, 'lib', x))
for x in ('pdftohtml', 'pdftoppm', 'pdfinfo', 'pdftotext'):
self.install_dylib(

View File

@ -24,6 +24,7 @@
# Copy opengl32sw.dll from
# https://download.qt.io/development_releases/prebuilt/llvmpipe/windows/
# to C:/mesa/64
# Install MESON and NINJA using the MSI from the meson github releases page
vm_name 'windows-calibre'
root 'C:/r'

View File

@ -113,6 +113,14 @@ class BuildTest(unittest.TestCase):
from html5_parser import parse
parse('<p>xxx')
def test_poppler(self):
import subprocess
from calibre.ebooks.pdf.pdftohtml import PDFTOHTML, popen
p = popen([PDFTOHTML, '--help'], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)
if p.wait() != 0:
raise RuntimeError(f'pdftohtml --help failed with return code: {p.returncode}')
def test_bs4(self):
import bs4
import soupsieve