diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2019-09-30 21:09:49 +0200 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2019-10-23 10:05:17 +0200 |
commit | 77e0cebcadc8b96613832e1554e326d48e20f72f (patch) | |
tree | e8dbae1a5f9fcd2b212caa02b07e32dd8130b7c2 /gnu/packages/patches | |
parent | 221012ec2d415d4306515b28e8e18db83c14fe62 (diff) | |
download | guix-77e0cebcadc8b96613832e1554e326d48e20f72f.tar.gz |
gnu: Add weasyprint.
Now includs the patch file missed in 73f0ed8dbfde97341716fd8b156907e4ef800873. * gnu/packages/pdf.scm (weasyprint): New variable. * gnu/packages/patches/weasyprint-library-paths.patch: New file. * gnu/local.mk: Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/weasyprint-library-paths.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/patches/weasyprint-library-paths.patch b/gnu/packages/patches/weasyprint-library-paths.patch new file mode 100644 index 0000000000..eabbdbdcd6 --- /dev/null +++ b/gnu/packages/patches/weasyprint-library-paths.patch @@ -0,0 +1,38 @@ +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() + |