Files
MINGW-packages/mingw-w64-python-pillow/dlopen-fix.patch
J. Peter Mugaas 49ff4f9eab Pillow - 5.0.0 - update to latest version. Demote libraqm to optdepends (#3411)
libraqm - 0.4.0 Update to latest version
2018-02-18 23:31:50 +03:00

38 lines
1.1 KiB
Diff

--- Pillow-5.0.0/src/_imagingft.c.orig 2018-01-01 10:03:06.000000000 -0500
+++ Pillow-5.0.0/src/_imagingft.c 2018-02-18 03:38:28.511730800 -0500
@@ -28,7 +28,7 @@
#define KEEP_PY_UNICODE
#include "py3.h"
-#if !defined(_MSC_VER)
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <dlfcn.h>
#endif
@@ -142,20 +142,23 @@ setraqm(void)
p_raqm.raqm = NULL;
/* Microsoft needs a totally different system */
-#if !defined(_MSC_VER)
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
p_raqm.raqm = dlopen("libraqm.so.0", RTLD_LAZY);
if (!p_raqm.raqm) {
p_raqm.raqm = dlopen("libraqm.dylib", RTLD_LAZY);
}
#else
p_raqm.raqm = LoadLibrary("libraqm");
+ if (!p_raqm.raqm) {
+ p_raqm.raqm = LoadLibrary("libraqm-0.dll");
+ }
#endif
if (!p_raqm.raqm) {
return 1;
}
-#if !defined(_MSC_VER)
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
p_raqm.create = (t_raqm_create)dlsym(p_raqm.raqm, "raqm_create");
p_raqm.set_text = (t_raqm_set_text)dlsym(p_raqm.raqm, "raqm_set_text");
p_raqm.set_text_utf8 = (t_raqm_set_text_utf8)dlsym(p_raqm.raqm, "raqm_set_text_utf8");