Files
MINGW-packages/mingw-w64-python3.12/0109-Enable-_uuid-on-MINGW.patch
2024-09-10 08:53:36 +02:00

38 lines
1.1 KiB
Diff

From cc5349878a8e38f5dff5e1bc101d785d7a8927bb Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Mon, 1 Jan 2024 15:04:43 +0530
Subject: [PATCH 109/N] Enable `_uuid` on MINGW
---
configure.ac | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5e98122..7d9dd18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4276,6 +4276,12 @@ AS_CASE([$MACHDEP],
[CTYPES_LIBS=""]
)
+dnl On MINGW, you need to link againt rpcrt4 for _uuid
+AS_CASE([$MACHDEP],
+ [win32], [UUID_LIBS="-lrpcrt4"],
+ [UUID_LIBS=""]
+)
+
dnl detect sqlite3 from Emscripten emport
PY_CHECK_EMSCRIPTEN_PORT([LIBSQLITE3], [-sUSE_SQLITE3])
@@ -8003,8 +8009,8 @@ PY_STDLIB_MOD([_tkinter],
[], [test "$have_tcltk" = "yes"],
[$TCLTK_CFLAGS], [$TCLTK_LIBS])
PY_STDLIB_MOD([_uuid],
- [], [test "$have_uuid" = "yes"],
- [$LIBUUID_CFLAGS], [$LIBUUID_LIBS])
+ [], [test "$have_uuid" = "yes" -o "$MACHDEP" = "win32"],
+ [$LIBUUID_CFLAGS], [$LIBUUID_LIBS $UUID_LIBS])
dnl compression libs
PY_STDLIB_MOD([zlib], [], [test "$have_zlib" = yes],