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.

62 lines
1.8KB

  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:34.321096900 +0300
  3. +++ Python-3.8.0/configure.ac 2019-10-22 10:00:39.843506600 +0300
  4. @@ -362,6 +362,17 @@
  5. # Set name for machine-dependent library files
  6. AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
  7. AC_MSG_CHECKING(MACHDEP)
  8. +case $host in
  9. + *-*-mingw*)
  10. + # On those hosts MACHDEP is 'win', as platform specific files
  11. + # go in plat-$(MACHDEP), but runtime platform is 'win32'
  12. + test -z "$MACHDEP" && MACHDEP=win
  13. +
  14. + dnl Configuration will be based only on "host triplet" as build
  15. + dnl must not depend from posix compatible environement.
  16. + ac_sys_system=ignore
  17. + ;;
  18. +esac
  19. if test -z "$MACHDEP"
  20. then
  21. # avoid using uname for cross builds
  22. @@ -431,12 +442,23 @@
  23. *-*-vxworks*)
  24. _host_cpu=$host_cpu
  25. ;;
  26. + *-*-mingw*)
  27. + _host_cpu=
  28. + ;;
  29. *)
  30. # for now, limit cross builds to known configurations
  31. MACHDEP="unknown"
  32. AC_MSG_ERROR([cross build not supported for $host])
  33. esac
  34. _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
  35. +
  36. + case "$host_os" in
  37. + mingw*)
  38. + # As sys.platform() return 'win32' to build python and extantions
  39. + # we will use 'mingw' (in setup.py and etc.)
  40. + _PYTHON_HOST_PLATFORM=mingw
  41. + ;;
  42. + esac
  43. fi
  44. # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
  45. diff -Naur Python-3.8.0-orig/Python/getplatform.c Python-3.8.0/Python/getplatform.c
  46. --- Python-3.8.0-orig/Python/getplatform.c 2019-10-14 16:34:47.000000000 +0300
  47. +++ Python-3.8.0/Python/getplatform.c 2019-10-22 10:00:40.249107300 +0300
  48. @@ -1,6 +1,12 @@
  49. #include "Python.h"
  50. +#ifdef __MINGW32__
  51. +# undef PLATFORM
  52. +/* see PC/pyconfig.h */
  53. +# define PLATFORM "win32"
  54. +#endif
  55. +
  56. #ifndef PLATFORM
  57. #define PLATFORM "unknown"
  58. #endif