Files
MINGW-packages/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch
Christoph Reiter 9757046077 python3: Update to 3.6.1 (#2587)
* python3: Update to 3.6.1

The patches starting with 16 are new to fix the build.
Some no longer relevant patches were dropped, the rest is just refreshed.

* Bump pkgrel of all packages containing Python 3 bytecode/extensions.

The package list was generated using:
    pkgfile.exe -R mingw64 -r "cpython.*\\.(py[cod]|dll)"

* lensfun: Add cmake to makedepends

* numpy: Don't hardcode the Python version

* blender: rebuild for new Python

* boost: Don't hardcode Python versions; rebuild

* pillow: Don't hardcode Python version; rebuild

* python-dateutil: Don't hardcode Python versions

* sip: Don't hardcode Python versions

* pyqt4: Don't hardcode Python versions; rebuild

* pyqt5: Don't hardcode Python versions; rebuild

* opencv: Update Python3 version in patch
2017-06-15 17:40:51 +03:00

75 lines
2.4 KiB
Diff

diff -Naur Python-3.5.2-orig/configure.ac Python-3.5.2/configure.ac
--- Python-3.5.2-orig/configure.ac 2016-07-12 14:21:50.147800700 +0300
+++ Python-3.5.2/configure.ac 2016-07-12 14:21:50.471800700 +0300
@@ -2175,7 +2175,7 @@
AC_HEADER_STDC
AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \
fcntl.h grp.h \
-ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
+ieeefp.h io.h langinfo.h libintl.h process.h \
sched.h shadow.h signal.h stropts.h termios.h \
unistd.h utime.h \
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
@@ -2734,9 +2734,11 @@
:
else
if test "$with_threads" = "yes" -o -z "$with_threads"; then
- AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
- # posix4 on Solaris 2.6
- # pthread (first!) on Linux
+ if test "$ac_cv_ntthread" = "no" -o -z "$ac_cv_ntthread"; then
+ AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
+ # posix4 on Solaris 2.6
+ # pthread (first!) on Linux
+ fi
fi
fi
@@ -5032,6 +5034,14 @@
AC_CHECK_HEADERS(curses.h ncurses.h)
+# If using nt threads, don't look for pthread.h or thread.h
+if test "x$ac_cv_ntthread" = xno ; then
+AC_HEADER_STDC
+AC_CHECK_HEADERS(pthread.h thread.h)
+AC_HEADER_DIRENT
+AC_HEADER_MAJOR
+fi
+
# On Solaris, term.h requires curses.h
AC_CHECK_HEADERS(term.h,,,[
#ifdef HAVE_CURSES_H
diff -Naur Python-3.5.2-orig/Python/condvar.h Python-3.5.2/Python/condvar.h
--- Python-3.5.2-orig/Python/condvar.h 2016-06-26 00:38:38.000000000 +0300
+++ Python-3.5.2/Python/condvar.h 2016-07-12 14:21:50.487300700 +0300
@@ -42,6 +42,12 @@
#include "Python.h"
+#ifdef __MINGW32__
+# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS)
+# undef _POSIX_THREADS
+# endif
+#endif
+
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
not present in unistd.h. But they still can be implemented as an external
diff -Naur Python-3.5.2-orig/Python/thread.c Python-3.5.2/Python/thread.c
--- Python-3.5.2-orig/Python/thread.c 2016-06-26 00:38:38.000000000 +0300
+++ Python-3.5.2/Python/thread.c 2016-07-12 14:21:50.495800700 +0300
@@ -7,6 +7,12 @@
#include "Python.h"
+#ifdef __MINGW32__
+# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS)
+# undef _POSIX_THREADS
+# endif
+#endif
+
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
not present in unistd.h. But they still can be implemented as an external