diff --git a/mingw-w64-python-matplotlib/0001-move-variable-initialization.patch b/mingw-w64-python-matplotlib/0001-move-variable-initialization.patch new file mode 100644 index 0000000000..46a166a6a4 --- /dev/null +++ b/mingw-w64-python-matplotlib/0001-move-variable-initialization.patch @@ -0,0 +1,18 @@ +--- a/src/_tkagg.cpp ++++ b/src/_tkagg.cpp +@@ -259,6 +259,7 @@ + HANDLE process = GetCurrentProcess(); // Pseudo-handle, doesn't need closing. + HMODULE* modules = NULL; + DWORD size; ++ bool tcl_ok = false, tk_ok = false; + if (!EnumProcessModules(process, NULL, 0, &size)) { + PyErr_SetFromWindowsErr(0); + goto exit; +@@ -271,7 +272,6 @@ + PyErr_SetFromWindowsErr(0); + goto exit; + } +- bool tcl_ok = false, tk_ok = false; + for (unsigned i = 0; i < size / sizeof(HMODULE); ++i) { + if (!tcl_ok) { + tcl_ok = load_tcl(modules[i]); diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index a64197167c..292499888e 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -7,8 +7,8 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=3.5.1 -pkgrel=2 +pkgver=3.5.2 +pkgrel=1 pkgdesc="A python plotting library, making publication quality plots (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -38,14 +38,19 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-python-pyqt5: Qt5Agg/Qt5Cairo backend" "${MINGW_PACKAGE_PREFIX}-python-cairo: cairo/GTK3Cairo/Qt5Cairo backend" "${MINGW_PACKAGE_PREFIX}-python-tornado: WebAgg backend") source=("${_realname}-${pkgver}.tar.gz"::"https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz" - setupext.py.patch) -sha256sums=('b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c' - 'a062e64775118de782b1995bd0b7b488de10cc5cbe8b5b834b79c0faea540826') + setupext.py.patch + 0001-move-variable-initialization.patch) +sha256sums=('48cf850ce14fa18067f2d9e0d646763681948487a8080ec0af2686468b4607a2' + 'a062e64775118de782b1995bd0b7b488de10cc5cbe8b5b834b79c0faea540826' + '9184347152a775114fa257aebe3549a3bd34eb52e36ed947a7eb4232bf0a6bad') prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/setupext.py.patch + # https://github.com/matplotlib/matplotlib/pull/23051 + patch -p1 -i ${srcdir}/0001-move-variable-initialization.patch + # Use system freetype and qhull sed -e 's|#system_freetype = False|system_freetype = True|' -e 's|#system_qhull = False|system_qhull = True|' mplsetup.cfg.template > mplsetup.cfg