You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
3.0 KiB
79 lines
3.0 KiB
2 months ago
|
diff -rupN --no-dereference Pillow-10.4.0/setup.py Pillow-10.4.0-new/setup.py
|
||
|
--- Pillow-10.4.0/setup.py 2024-07-01 07:42:12.000000000 +0200
|
||
|
+++ Pillow-10.4.0-new/setup.py 2024-07-01 20:26:44.474821670 +0200
|
||
|
@@ -140,7 +140,7 @@ class RequiredDependencyException(Except
|
||
3 years ago
|
pass
|
||
|
|
||
|
|
||
|
-PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version
|
||
3 years ago
|
+PLATFORM_MINGW = "mingw32" in os.getenv("CC", "")
|
||
3 years ago
|
|
||
|
|
||
2 years ago
|
def _dbg(s, tp=None):
|
||
2 months ago
|
@@ -524,7 +524,7 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
#
|
||
|
# add platform directories
|
||
|
|
||
|
- if self.disable_platform_guessing:
|
||
|
+ if self.disable_platform_guessing or PLATFORM_MINGW:
|
||
|
pass
|
||
|
|
||
|
elif sys.platform == "cygwin":
|
||
2 months ago
|
@@ -618,7 +618,7 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
# FIXME: check /opt/stuff directories here?
|
||
|
|
||
|
# standard locations
|
||
|
- if not self.disable_platform_guessing:
|
||
|
+ if not self.disable_platform_guessing and not PLATFORM_MINGW:
|
||
|
_add_directory(library_dirs, "/usr/local/lib")
|
||
|
_add_directory(include_dirs, "/usr/local/include")
|
||
|
|
||
2 months ago
|
@@ -860,7 +860,7 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
if feature.xcb:
|
||
|
libs.append(feature.xcb)
|
||
|
defs.append(("HAVE_XCB", None))
|
||
|
- if sys.platform == "win32":
|
||
|
+ if sys.platform == "win32" or PLATFORM_MINGW:
|
||
|
libs.extend(["kernel32", "user32", "gdi32"])
|
||
|
if struct.unpack("h", b"\0\1")[0] == 1:
|
||
|
defs.append(("WORDS_BIGENDIAN", None))
|
||
2 months ago
|
@@ -875,6 +875,8 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
if feature.freetype:
|
||
|
srcs = []
|
||
|
libs = ["freetype"]
|
||
|
+ if sys.platform == "win32" or PLATFORM_MINGW:
|
||
|
+ libs.extend(["dl"])
|
||
|
defs = []
|
||
|
if feature.raqm:
|
||
|
if not feature.want_vendor("raqm"): # using system Raqm
|
||
2 months ago
|
@@ -897,7 +899,7 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
|
||
|
if feature.lcms:
|
||
|
extra = []
|
||
|
- if sys.platform == "win32":
|
||
|
+ if sys.platform == "win32" or PLATFORM_MINGW:
|
||
|
extra.extend(["user32", "gdi32"])
|
||
|
self._update_extension("PIL._imagingcms", [feature.lcms] + extra)
|
||
|
else:
|
||
2 months ago
|
@@ -916,7 +918,7 @@ class pil_build_ext(build_ext):
|
||
3 years ago
|
else:
|
||
|
self._remove_extension("PIL._webp")
|
||
|
|
||
|
- tk_libs = ["psapi"] if sys.platform in ("win32", "cygwin") else []
|
||
|
+ tk_libs = ["psapi"] if sys.platform in ("win32", "cygwin") or PLATFORM_MINGW else []
|
||
|
self._update_extension("PIL._imagingtk", tk_libs)
|
||
|
|
||
|
build_ext.build_extensions(self)
|
||
2 months ago
|
diff -rupN --no-dereference Pillow-10.4.0/src/libImaging/ImPlatform.h Pillow-10.4.0-new/src/libImaging/ImPlatform.h
|
||
|
--- Pillow-10.4.0/src/libImaging/ImPlatform.h 2024-07-01 07:42:12.000000000 +0200
|
||
|
+++ Pillow-10.4.0-new/src/libImaging/ImPlatform.h 2024-07-01 20:26:44.475821670 +0200
|
||
3 years ago
|
@@ -28,7 +28,7 @@
|
||
2 years ago
|
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
||
3 years ago
|
|
||
|
#define WIN32_LEAN_AND_MEAN
|
||
|
-#include <Windows.h>
|
||
|
+#include <windows.h>
|
||
|
|
||
|
#ifdef __CYGWIN__
|
||
|
#undef _WIN64
|