depot/third_party/nixpkgs/pkgs/development/python-modules/weasyprint/library-paths.patch
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

32 lines
1.3 KiB
Diff

diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py
index 3aba3e75..dde0e260 100644
--- a/weasyprint/text/ffi.py
+++ b/weasyprint/text/ffi.py
@@ -429,22 +429,11 @@ if hasattr(os, 'add_dll_directory'): # pragma: no cover
with suppress((OSError, FileNotFoundError)):
os.add_dll_directory(dll_directory)
-gobject = _dlopen(
- ffi, 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0',
- 'libgobject-2.0.so.0', 'libgobject-2.0.dylib', 'libgobject-2.0-0.dll')
-pango = _dlopen(
- ffi, 'pango-1.0-0', 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0',
- 'libpango-1.0.dylib', 'libpango-1.0-0.dll')
-harfbuzz = _dlopen(
- ffi, 'harfbuzz', 'harfbuzz-0.0', 'libharfbuzz-0',
- 'libharfbuzz.so.0', 'libharfbuzz.so.0', 'libharfbuzz.0.dylib',
- 'libharfbuzz-0.dll')
-fontconfig = _dlopen(
- ffi, 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig.so.1',
- 'libfontconfig.1.dylib', 'libfontconfig-1.dll')
-pangoft2 = _dlopen(
- ffi, 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0',
- 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib', 'libpangoft2-1.0-0.dll')
+gobject = _dlopen(ffi, '@gobject@')
+pango = _dlopen(ffi, '@pango@')
+harfbuzz = _dlopen(ffi, '@harfbuzz@')
+fontconfig = _dlopen(ffi, '@fontconfig@')
+pangoft2 = _dlopen(ffi, '@pangoft2@')
gobject.g_type_init()