Files
MINGW-packages/mingw-w64-python3/0820-dont-link-with-gettext.patch
Алексей edc01d04d6 Update python to 3.7.0 (#4047)
* Initial python-3.7 port

* python3: Add setup.config.in to remove before patching

* python3: Implement setenv for mingw. Fix building with NT threads. Build
with unicode

* Fix typos

* Fix linking core modules

* Mingw build have exec_prefix

* Remove deprecated patch

* Fix building python and modules. Failing to build readline module and
install not working yet

* More getpath changes and more aggressive path separator conversion

* Fix readline module compilation and linking errors

* python3: By default building with posix threads, NT threads are broken.
Some patches optimization. First buildable commit

* Py_DecodeLocale handle char, not wchar

* Fix building multiprocessing module with posix threads
2018-07-06 09:57:52 +03:00

41 lines
1.3 KiB
Diff

diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac
--- Python-3.7.0-orig/configure.ac 2018-06-30 11:17:09.787916500 +0300
+++ Python-3.7.0/configure.ac 2018-06-30 11:17:42.204773500 +0300
@@ -3049,10 +3049,19 @@
fi
# check if we need libintl for locale functions
+case $host in
+ *-*-mingw*)
+ dnl Native windows build don't use libintl (see _localemodule.c).
+ dnl Also we don't like setup.py to add "intl" library to the list
+ dnl when build _locale module.
+ ;;
+ *)
AC_CHECK_LIB(intl, textdomain,
[AC_DEFINE(WITH_LIBINTL, 1,
[Define to 1 if libintl is needed for locale functions.])
LIBS="-lintl $LIBS"])
+ ;;
+esac
# checks for system dependent C++ extensions support
case "$ac_sys_system" in
diff -Naur Python-3.7.0-orig/Modules/_localemodule.c Python-3.7.0/Modules/_localemodule.c
--- Python-3.7.0-orig/Modules/_localemodule.c 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Modules/_localemodule.c 2018-06-30 11:17:42.204773500 +0300
@@ -11,6 +11,13 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#ifdef __MINGW32__
+/* The header libintl.h and library libintl may exist on mingw host.
+ * To be compatible with MSVC build we has to undef some defines.
+ */
+#undef HAVE_LIBINTL_H
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+#endif
#include <stdio.h>
#include <locale.h>