Make weasyprint load dynamic libraries from hard-coded path. From NixOS pkgs/development/python-modules/weasyprint/library-paths.patch diff --git a/weasyprint/fonts.py b/weasyprint/fonts.py index 377716c1..2016e01c 100644 --- a/weasyprint/fonts.py +++ b/weasyprint/fonts.py @@ -48,11 +48,8 @@ else: # with OSError: dlopen() failed to load a library: cairo / cairo-2 # So let's hope we find the same file as cairo already did ;) # Same applies to pangocairo requiring pangoft2 - fontconfig = dlopen(ffi, 'fontconfig', 'libfontconfig', - 'libfontconfig-1.dll', - 'libfontconfig.so.1', 'libfontconfig-1.dylib') - pangoft2 = dlopen(ffi, 'pangoft2-1.0', 'libpangoft2-1.0-0', - 'libpangoft2-1.0.so', 'libpangoft2-1.0.dylib') + fontconfig = dlopen(ffi, '@fontconfig@') + pangoft2 = dlopen(ffi, '@pangoft2@') ffi.cdef(''' // FontConfig diff --git a/weasyprint/text.py b/weasyprint/text.py index 035074e9..08e40395 100644 --- a/weasyprint/text.py +++ b/weasyprint/text.py @@ -243,12 +243,9 @@ def dlopen(ffi, *names): return ffi.dlopen(names[0]) # pragma: no cover -gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so', - 'libgobject-2.0.dylib') -pango = dlopen(ffi, 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so', - 'libpango-1.0.dylib') -pangocairo = dlopen(ffi, 'pangocairo-1.0', 'libpangocairo-1.0-0', - 'libpangocairo-1.0.so', 'libpangocairo-1.0.dylib') +gobject = dlopen(ffi, '@gobject@') +pango = dlopen(ffi, '@pango@') +pangocairo = dlopen(ffi, '@pangocairo@') gobject.g_type_init() ion>
path: root/.mailmap
AgeCommit message (Expand)Author
2020-05-15mailmap: Update for self....Mathieu Othacehe
2020-05-13mailmap: Update entries for Nikita....nikita
2020-03-28Update email address and Savannah handle for Amin Bandali....Amin Bandali
2020-02-09Update e-mail address for Jakob L. Kreuze....Tobias Geerinckx-Rice
2020-01-17Update email address for Amin Bandali....Amin Bandali
2019-12-19Update email for Brett Gilio....Brett Gilio
2019-12-18gnu: leocad: Update to 19.07.1....Eric Bavier
2019-05-03Correct email address for ison....ison
2019-03-18Correct name and email address for ng0....ng0
2019-01-21Update .mailmap....Mathieu Othacehe
2018-08-27Update email for Pierre Neidhardt....Pierre Neidhardt
2018-07-16mailmap: Add a line for Pierre-Antoine....Ludovic Courtès
2018-07-16mailmap: Add another line for myself....Nils Gillmann
2018-03-20Correct name and Email for ng0....ng0
2018-02-11mailmap: Adjust entries for ng0....ng0
2017-11-26Update e-mail for ng0....ng0
2017-10-03Update e-mail for Theodoros Foradis....Theodoros Foradis
2017-08-29Update e-mail for Kei Kebreau....Kei Kebreau
2017-08-13mailmap: fix entries for ng0....ng0
2017-06-16mailmap: Adjust entries for ng0....ng0