diff --git a/mingw-w64-python-matplotlib/001-fix-pointer-declaration.patch b/mingw-w64-python-matplotlib/001-fix-pointer-declaration.patch new file mode 100644 index 0000000000..f66fcfb487 --- /dev/null +++ b/mingw-w64-python-matplotlib/001-fix-pointer-declaration.patch @@ -0,0 +1,19 @@ +--- a/src/_tkagg.cpp ++++ b/src/_tkagg.cpp +@@ -231,13 +231,13 @@ + { + // Try to fill Tcl/Tk global vars with function pointers. Return whether + // all of them have been filled. +- if (void* ptr = dlsym(lib, "Tcl_SetVar")) { ++ if (auto ptr = dlsym(lib, "Tcl_SetVar")) { + TCL_SETVAR = (Tcl_SetVar_t)ptr; + } +- if (void* ptr = dlsym(lib, "Tk_FindPhoto")) { ++ if (auto ptr = dlsym(lib, "Tk_FindPhoto")) { + TK_FIND_PHOTO = (Tk_FindPhoto_t)ptr; + } +- if (void* ptr = dlsym(lib, "Tk_PhotoPutBlock")) { ++ if (auto ptr = dlsym(lib, "Tk_PhotoPutBlock")) { + TK_PHOTO_PUT_BLOCK = (Tk_PhotoPutBlock_t)ptr; + } + return TCL_SETVAR && TK_FIND_PHOTO && TK_PHOTO_PUT_BLOCK; diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index b4ec344c52..a37d32d969 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -7,7 +7,7 @@ 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.3 +pkgver=3.6.0 pkgrel=1 pkgdesc="A python plotting library, making publication quality plots (mingw-w64)" arch=('any') @@ -23,6 +23,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-python-pytz" "${MINGW_PACKAGE_PREFIX}-python-pillow" "${MINGW_PACKAGE_PREFIX}-python-pyparsing" "${MINGW_PACKAGE_PREFIX}-python-kiwisolver" + "${MINGW_PACKAGE_PREFIX}-python-contourpy" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-qhull") makedepends=("${MINGW_PACKAGE_PREFIX}-python" @@ -39,17 +40,15 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-python-pyqt5: Qt5Agg/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 - build-with-setuptools-scm-7.patch) -sha256sums=('339cac48b80ddbc8bfd05daae0a3a73414651a8596904c2a881cfd1edb65f26c' + 001-fix-pointer-declaration.patch) +sha256sums=('c5108ebe67da60a9204497d8d403316228deb52b550388190c53a57394d41531' 'fd0cb2d039bc85c97d8b3a1837faa3c560ef4a530f729517ea115917f0f8a972' - '1e1690aa9cfe321fa5d3351602f028dc10cbfd2e9fbd74f08f5f90fdb4e2da8c') + '316b6d67fd6877553cc4a4a78cf98a2d86295c8aa236717191d1fe78e5364eee') prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/setupext.py.patch - - # Revert https://github.com/matplotlib/matplotlib/pull/23479 - patch -p1 -i ${srcdir}/build-with-setuptools-scm-7.patch + patch -p1 -i ${srcdir}/001-fix-pointer-declaration.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 diff --git a/mingw-w64-python-matplotlib/build-with-setuptools-scm-7.patch b/mingw-w64-python-matplotlib/build-with-setuptools-scm-7.patch deleted file mode 100644 index 4cc7033faa..0000000000 --- a/mingw-w64-python-matplotlib/build-with-setuptools-scm-7.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -316,7 +316,7 @@ def make_release_tree(self, base_dir, files): - setup_requires=[ - "certifi>=2020.06.20", - "numpy>=1.17", -- "setuptools_scm>=4,<7", -+ "setuptools_scm>=4", - "setuptools_scm_git_archive", - ], - install_requires=[ -@@ -330,7 +330,7 @@ def make_release_tree(self, base_dir, files): - "python-dateutil>=2.7", - ] + ( - # Installing from a git checkout that is not producing a wheel. -- ["setuptools_scm>=4,<7"] if ( -+ ["setuptools_scm>=4"] if ( - Path(__file__).with_name(".git").exists() and - os.environ.get("CIBUILDWHEEL", "0") != "1" - ) else [] \ No newline at end of file