diff --git a/recipes/recipes_emscripten/matplotlib/patches/static-cast.patch b/recipes/recipes_emscripten/matplotlib/patches/static-cast.patch new file mode 100644 index 000000000..638a67e7b --- /dev/null +++ b/recipes/recipes_emscripten/matplotlib/patches/static-cast.patch @@ -0,0 +1,31 @@ +From 1b919a42a6be3090d4553cafff8f0c0f9e221d60 Mon Sep 17 00:00:00 2001 +From: Ian Thomas +Date: Tue, 14 Jan 2025 14:34:34 +0000 +Subject: [PATCH] Static cast patch + +--- + src/_backend_agg_wrapper.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/_backend_agg_wrapper.cpp b/src/_backend_agg_wrapper.cpp +index 269e2aaa9e..2bad7f4d0b 100644 +--- a/src/_backend_agg_wrapper.cpp ++++ b/src/_backend_agg_wrapper.cpp +@@ -250,12 +250,12 @@ PYBIND11_MODULE(_backend_agg, m, py::mod_gil_not_used()) + + .def_buffer([](RendererAgg *renderer) -> py::buffer_info { + std::vector shape { +- renderer->get_height(), +- renderer->get_width(), ++ static_cast(renderer->get_height()), ++ static_cast(renderer->get_width()), + 4 + }; + std::vector strides { +- renderer->get_width() * 4, ++ static_cast(renderer->get_width() * 4), + 4, + 1 + }; +-- +2.39.3 (Apple Git-146) diff --git a/recipes/recipes_emscripten/matplotlib/recipe.yaml b/recipes/recipes_emscripten/matplotlib/recipe.yaml index adb0e43d1..7d022743b 100644 --- a/recipes/recipes_emscripten/matplotlib/recipe.yaml +++ b/recipes/recipes_emscripten/matplotlib/recipe.yaml @@ -7,6 +7,7 @@ source: sha256: 825919da8957bbc19cec35caf8663b734d34af72a0b040c43b7d8c1b76fdcab7 patches: - patches/fix-threading-and-font-cache.patch + - patches/static-cast.patch build: number: 0