depot/third_party/nixpkgs/pkgs/development/python-modules/weasyprint/library-paths.patch
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

31 lines
1.1 KiB
Diff

diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py
index 0734cbea..22e31a5e 100644
--- a/weasyprint/text/ffi.py
+++ b/weasyprint/text/ffi.py
@@ -387,21 +387,11 @@ def _dlopen(ffi, *names):
return ffi.dlopen(names[0]) # pragma: no cover
-gobject = _dlopen(
- ffi, 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0',
- 'libgobject-2.0.so.0', 'libgobject-2.0.dylib')
-pango = _dlopen(
- ffi, 'pango-1.0-0', 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0',
- 'libpango-1.0.dylib')
-harfbuzz = _dlopen(
- ffi, 'harfbuzz', 'harfbuzz-0.0', 'libharfbuzz-0',
- 'libharfbuzz.so.0', 'libharfbuzz.so.0', 'libharfbuzz.0.dylib')
-fontconfig = _dlopen(
- ffi, 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig-1.dll',
- 'libfontconfig.so.1', 'libfontconfig-1.dylib')
-pangoft2 = _dlopen(
- ffi, 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0',
- 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib')
+gobject = _dlopen(ffi, '@gobject@')
+pango = _dlopen(ffi, '@pango@')
+harfbuzz = _dlopen(ffi, '@harfbuzz@')
+fontconfig = _dlopen(ffi, '@fontconfig@')
+pangoft2 = _dlopen(ffi, '@pangoft2@')
gobject.g_type_init()