MINGW-packages/mingw-w64-python/0109-Enable-_uuid-on-MINGW.patch
2025-06-07 14:11:54 +02:00

38 lines
1.1 KiB
Diff

From 6843f1f35a166cc5c706c45802418abfcb8096c6 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 159d4fe..2575149 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4300,6 +4300,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])
@@ -8027,8 +8033,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],