summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/weasyprint/library-paths.patch
blob: dd2bbfe784e05c9a0aa6163a8c31de7005df5b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py
index b5a9cf2..9380a79 100644
--- a/weasyprint/text/ffi.py
+++ b/weasyprint/text/ffi.py
@@ -444,25 +444,12 @@ if hasattr(os, 'add_dll_directory') and not hasattr(sys, 'frozen'):  # pragma: n
         with suppress((OSError, FileNotFoundError)):
             os.add_dll_directory(dll_directory)
 
-gobject = _dlopen(
-    ffi, 'libgobject-2.0-0', 'gobject-2.0-0', 'gobject-2.0',
-    'libgobject-2.0.so.0', 'libgobject-2.0.dylib', 'libgobject-2.0-0.dll')
-pango = _dlopen(
-    ffi, 'libpango-1.0-0', 'pango-1.0-0', 'pango-1.0', 'libpango-1.0.so.0',
-    'libpango-1.0.dylib', 'libpango-1.0-0.dll')
-harfbuzz = _dlopen(
-    ffi, 'libharfbuzz-0', 'harfbuzz', 'harfbuzz-0.0',
-    'libharfbuzz.so.0', 'libharfbuzz.0.dylib', 'libharfbuzz-0.dll')
-harfbuzz_subset = _dlopen(
-    ffi, 'libharfbuzz-subset-0', 'harfbuzz-subset', 'harfbuzz-subset-0.0',
-    'libharfbuzz-subset.so.0', 'libharfbuzz-subset.0.dylib', 'libharfbuzz-subset-0.dll',
-    allow_fail=True)
-fontconfig = _dlopen(
-    ffi, 'libfontconfig-1', 'fontconfig-1', 'fontconfig',
-    'libfontconfig.so.1', 'libfontconfig.1.dylib', 'libfontconfig-1.dll')
-pangoft2 = _dlopen(
-    ffi, 'libpangoft2-1.0-0', 'pangoft2-1.0-0', 'pangoft2-1.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@")
+harfbuzz_subset = _dlopen(ffi, "@harfbuzz_subset@", allow_fail=True)
+fontconfig = _dlopen(ffi, "@fontconfig@")
+pangoft2 = _dlopen(ffi, "@pangoft2@")
 
 gobject.g_type_init()