Files
MINGW-packages/mingw-w64-python-pillow/dlopen-fix.patch
2019-07-05 00:07:40 -04:00

38 lines
1.1 KiB
Diff

--- Pillow-6.1.0.orig/src/_imagingft.c 2019-07-04 23:53:09.565089500 -0400
+++ Pillow-6.1.0/src/_imagingft.c 2019-07-04 23:59:00.793782000 -0400
@@ -31,7 +31,7 @@
#define KEEP_PY_UNICODE
#include "py3.h"
-#if !defined(_MSC_VER)
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <dlfcn.h>
#endif
@@ -154,20 +154,23 @@
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.version_atleast = (t_raqm_version_atleast)dlsym(p_raqm.raqm, "raqm_version_atleast");
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");