Cross-Platform build scripts for audio plugins
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.

100 lines
3.4KB

  1. diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac
  2. --- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:52.028128100 +0300
  3. +++ Python-3.8.0/configure.ac 2019-10-22 10:00:53.198130100 +0300
  4. @@ -574,6 +574,14 @@
  5. AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
  6. fi
  7. +AC_MSG_CHECKING([for init system calls])
  8. +AC_SUBST(INITSYS)
  9. +case $host in
  10. + *-*-mingw*) INITSYS=nt;;
  11. + *) INITSYS=posix;;
  12. +esac
  13. +AC_MSG_RESULT([$INITSYS])
  14. +
  15. # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
  16. # it may influence the way we can build extensions, so distutils
  17. # needs to check it
  18. --- Python-3.8.1/Modules/posixmodule.c.orig 2019-12-18 18:21:23.000000000 +0100
  19. +++ Python-3.8.1/Modules/posixmodule.c 2019-12-23 10:35:51.095967700 +0100
  20. @@ -193,6 +193,27 @@
  21. #define HAVE_CWAIT 1
  22. #define HAVE_FSYNC 1
  23. #define fsync _commit
  24. +#elif defined(__MINGW32__) /* GCC for windows hosts */
  25. +/* getlogin is detected by configure on mingw-w64 */
  26. +#undef HAVE_GETLOGIN
  27. +/*#define HAVE_GETCWD 1 - detected by configure*/
  28. +#define HAVE_GETPPID 1
  29. +#define HAVE_GETLOGIN 1
  30. +#define HAVE_SPAWNV 1
  31. +#define HAVE_WSPAWNV 1
  32. +#define HAVE_WEXECV 1
  33. +/*#define HAVE_EXECV 1 - detected by configure*/
  34. +#define HAVE_PIPE 1
  35. +#define HAVE_POPEN 1
  36. +#define HAVE_SYSTEM 1
  37. +#define HAVE_CWAIT 1
  38. +#define HAVE_FSYNC 1
  39. +#define fsync _commit
  40. +#include <windows.h>
  41. +#include <winioctl.h>
  42. +#ifndef _MAX_ENV
  43. +#define _MAX_ENV 32767
  44. +#endif
  45. #else
  46. /* Unix functions that the configure script doesn't check for */
  47. #ifndef __VXWORKS__
  48. @@ -292,7 +313,7 @@
  49. #endif
  50. #endif
  51. -#ifdef _MSC_VER
  52. +#ifdef MS_WINDOWS
  53. #ifdef HAVE_DIRECT_H
  54. #include <direct.h>
  55. #endif
  56. @@ -314,7 +335,7 @@
  57. #include <shellapi.h> /* for ShellExecute() */
  58. #include <lmcons.h> /* for UNLEN */
  59. #define HAVE_SYMLINK
  60. -#endif /* _MSC_VER */
  61. +#endif /* MS_WINDOWS */
  62. #ifndef MAXPATHLEN
  63. #if defined(PATH_MAX) && PATH_MAX > 1024
  64. @@ -1372,9 +1393,9 @@
  65. ** man environ(7).
  66. */
  67. #include <crt_externs.h>
  68. -#elif !defined(_MSC_VER) && (!defined(__WATCOMC__) || defined(__QNX__) || defined(__VXWORKS__))
  69. +#elif !defined(MS_WINDOWS) && (!defined(__WATCOMC__) || defined(__QNX__) || defined(__VXWORKS__))
  70. extern char **environ;
  71. -#endif /* !_MSC_VER */
  72. +#endif /* !MS_WINDOWS */
  73. static PyObject *
  74. convertenviron(void)
  75. diff -Naur Python-3.8.0-orig/Modules/Setup Python-3.8.0/Modules/Setup
  76. --- Python-3.8.0-orig/Modules/Setup 2019-10-14 16:34:47.000000000 +0300
  77. +++ Python-3.8.0/Modules/Setup 2019-10-22 10:00:54.430532300 +0300
  78. @@ -101,7 +101,6 @@
  79. # This only contains the minimal set of modules required to run the
  80. # setup.py script in the root of the Python source tree.
  81. -posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls
  82. errno errnomodule.c # posix (UNIX) errno values
  83. pwd pwdmodule.c # this is needed to find out the user's home dir
  84. # if $HOME is not set
  85. diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in
  86. --- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:00:30.171489600 +0300
  87. +++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:00:54.009331600 +0300
  88. @@ -3,3 +3,6 @@
  89. # The purpose of this file is to conditionally enable certain modules
  90. # based on configure-time options.
  91. +# init system calls(posix/nt/...) for INITFUNC (used by makesetup)
  92. +@INITSYS@ -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c
  93. +