diff --git a/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch new file mode 100644 index 0000000000..e0f8b169ec --- /dev/null +++ b/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch @@ -0,0 +1,20 @@ +--- Python-2.7.8/Python/sysmodule.c.orig 2014-10-10 07:30:53.163000000 +0400 ++++ Python-2.7.8/Python/sysmodule.c 2014-10-10 07:40:51.719400000 +0400 +@@ -27,7 +27,7 @@ + #include + #endif /* MS_WINDOWS */ + +-#ifdef MS_COREDLL ++#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) + extern void *PyWin_DLLhModule; + /* A string loaded from the DLL at startup: */ + extern const char *PyWin_DLLVersionString; +@@ -1459,7 +1459,7 @@ + SET_SYS_FROM_STRING("byteorder", + PyString_FromString(value)); + } +-#ifdef MS_COREDLL ++#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) + SET_SYS_FROM_STRING("dllhandle", + PyLong_FromVoidPtr(PyWin_DLLhModule)); + SET_SYS_FROM_STRING("winver", diff --git a/mingw-w64-python2/PKGBUILD b/mingw-w64-python2/PKGBUILD index 7fbf9ecb4e..efdb876dc2 100644 --- a/mingw-w64-python2/PKGBUILD +++ b/mingw-w64-python2/PKGBUILD @@ -5,23 +5,25 @@ _realname=python2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.7.8 -pkgrel=5 +pkgrel=6 _pybasever=2.7 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') license=('PSF') url="http://www.python.org/" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-gdbm" - "${MINGW_PACKAGE_PREFIX}-readline" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-libffi" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-tcl" - "${MINGW_PACKAGE_PREFIX}-tk") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-ncurses") + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-gdbm" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-readline" + "${MINGW_PACKAGE_PREFIX}-tcl" + "${MINGW_PACKAGE_PREFIX}-tk" + "${MINGW_PACKAGE_PREFIX}-zlib" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('!makeflags' 'staticlibs' 'strip' '!debug') source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0000-make-_sysconfigdata.py-relocatable.patch @@ -95,6 +97,7 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0840-add-builddir-to-library_dirs.patch 0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch 0860-mingw-build-optimized-ext.patch + 0910-fix-using-dllhandle-and-winver-mingw.patch 1000-dont-link-with-gettext.patch 1010-ctypes-python-dll.patch 1020-gdbm-module-includes.patch @@ -188,6 +191,7 @@ prepare() { patch -p1 -i "${srcdir}"/0840-add-builddir-to-library_dirs.patch patch -p1 -i "${srcdir}"/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch patch -p1 -i "${srcdir}"/0860-mingw-build-optimized-ext.patch + patch -p1 -i "${srcdir}"/0910-fix-using-dllhandle-and-winver-mingw.patch plain "Apply Alexey Pavlov's mingw-w64 patches (2)" patch -p1 -i "${srcdir}"/1000-dont-link-with-gettext.patch @@ -234,7 +238,7 @@ build() { CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " - CPPFLAGS+=" -I$PREFIX_WIN/include -I$PREFIX_WIN/include/ncursesw " + CPPFLAGS+=" -I${PREFIX_WIN}/include/ncursesw " if check_option "strip" "y"; then LDFLAGS+=" -s " @@ -396,6 +400,7 @@ sha1sums=('9c6281eeace0c3646fa556c8087bb1b7e033c9c4' 'b570caceaf451c0869d840fc06dae526f083046b' '9ee357eb87550e1ce5c8fd359a976a24bf9ff697' 'ee253d2d59916fe3f9f50c853b8006b9cf79e2c3' + '26f3e9c282f4f41645bed46a7541b0b82e083705' '439eaa06db994ddb724e5ad6a459bbddb5089527' '5601ab657dc701aea3b16cf96be782b45262a6b4' 'a5b4f74cfdc0cd8148ae0c2b7d080e08ac73bc5a' diff --git a/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch new file mode 100644 index 0000000000..97682dbdba --- /dev/null +++ b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch @@ -0,0 +1,20 @@ +--- Python-3.4.2/Python/sysmodule.c.orig 2014-10-10 07:30:53.163000000 +0400 ++++ Python-3.4.2/Python/sysmodule.c 2014-10-10 07:40:51.719400000 +0400 +@@ -26,7 +26,7 @@ + #include + #endif /* MS_WINDOWS */ + +-#ifdef MS_COREDLL ++#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) + extern void *PyWin_DLLhModule; + /* A string loaded from the DLL at startup: */ + extern const char *PyWin_DLLVersionString; +@@ -1733,7 +1733,7 @@ + PyUnicode_FromString("little")); + #endif + +-#ifdef MS_COREDLL ++#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) + SET_SYS_FROM_STRING("dllhandle", + PyLong_FromVoidPtr(PyWin_DLLhModule)); + SET_SYS_FROM_STRING("winver", diff --git a/mingw-w64-python3/PKGBUILD b/mingw-w64-python3/PKGBUILD index 74c5001d27..c2dcdc6399 100644 --- a/mingw-w64-python3/PKGBUILD +++ b/mingw-w64-python3/PKGBUILD @@ -6,7 +6,7 @@ _realname=python3 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _pybasever=3.4 pkgver=${_pybasever}.2 -pkgrel=1 +pkgrel=2 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') license=('PSF') @@ -107,6 +107,7 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0870-mingw-fix-ssl-dont-use-enum_certificates.patch 0890-mingw-build-optimized-ext.patch 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch + 0910-fix-using-dllhandle-and-winver-mingw.patch 1000-fix-building-posixmodule.patch 1010-install-msilib.patch) @@ -206,6 +207,7 @@ prepare() { patch -Np1 -i "${srcdir}"/0870-mingw-fix-ssl-dont-use-enum_certificates.patch patch -Np1 -i "${srcdir}"/0890-mingw-build-optimized-ext.patch patch -Np1 -i "${srcdir}"/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch + patch -Np1 -i "${srcdir}"/0910-fix-using-dllhandle-and-winver-mingw.patch patch -Np1 -i "${srcdir}"/1000-fix-building-posixmodule.patch patch -Np1 -i "${srcdir}"/1010-install-msilib.patch @@ -423,5 +425,6 @@ md5sums=('36fc7327c02c6f12fa24fc9ba78039e3' '501eaec84e4516a8201679ee45797a59' '5d5b248fe1821f82d0e4a4a1385e7ccf' '86b64116a831c3c35f32107fc0bdbc76' + '0cbae2936b4a63fe019afdedca236076' '38b940ff6ef0652c004c461f4393771a' '994736a02ffafe807207f0c88e40252b')