diff --git a/python/py-matplotlib/Portfile b/python/py-matplotlib/Portfile index f643bff2209b8..84917079d68a0 100644 --- a/python/py-matplotlib/Portfile +++ b/python/py-matplotlib/Portfile @@ -5,7 +5,7 @@ PortGroup python 1.0 name py-matplotlib version 3.3.0 -revision 0 +revision 1 categories-append graphics math platforms darwin @@ -53,7 +53,7 @@ if {${name} ne ${subport}} { if {${python.version} eq 27} { version 2.2.5 - revision 1 + revision 2 checksums rmd160 4532a205e8f40d6f40346b2e461d3dca144b38b9 \ sha256 a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea \ size 36678633 @@ -65,19 +65,17 @@ if {${name} ne ${subport}} { port:py${python.version}-tz patchfiles patch-v2-setup.cfg.diff \ - patch-v2-src-macosx.m.diff \ patch-v2-qhull.diff \ patch-v2-setupext.py.diff \ patch-v2-jquery-ui.diff } elseif {${python.version} eq 35} { version 3.0.3 - revision 2 + revision 3 checksums rmd160 98ecd1ca25d555bde5d43fcaef800f7436d7d738 \ sha256 e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7 \ size 36640137 patchfiles patch-v30-setup.cfg.diff \ - patch-v30-src-macosx.m.diff \ patch-v30-qhull.diff \ patch-v30-setupext.py.diff \ patch-v30-jquery-ui.diff diff --git a/python/py-matplotlib/files/patch-v2-src-macosx.m.diff b/python/py-matplotlib/files/patch-v2-src-macosx.m.diff deleted file mode 100644 index b7a83a5746877..0000000000000 --- a/python/py-matplotlib/files/patch-v2-src-macosx.m.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- src/_macosx.m.orig 2018-08-09 23:01:31.000000000 -0400 -+++ src/_macosx.m 2018-10-04 10:20:58.000000000 -0400 -@@ -1,5 +1,8 @@ - #include - #include -+#ifndef kCTForegroundColorFromContextAttributeName -+extern const CFStringRef kCTForegroundColorFromContextAttributeName AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; -+#endif - #include - #include - diff --git a/python/py-matplotlib/files/patch-v30-src-macosx.m.diff b/python/py-matplotlib/files/patch-v30-src-macosx.m.diff deleted file mode 100644 index b7a83a5746877..0000000000000 --- a/python/py-matplotlib/files/patch-v30-src-macosx.m.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- src/_macosx.m.orig 2018-08-09 23:01:31.000000000 -0400 -+++ src/_macosx.m 2018-10-04 10:20:58.000000000 -0400 -@@ -1,5 +1,8 @@ - #include - #include -+#ifndef kCTForegroundColorFromContextAttributeName -+extern const CFStringRef kCTForegroundColorFromContextAttributeName AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; -+#endif - #include - #include - diff --git a/python/py-matplotlib/files/patch-v33-src-macosx.m.diff b/python/py-matplotlib/files/patch-v33-src-macosx.m.diff index 102a7ed69d476..bb00fb8ab0bd3 100644 --- a/python/py-matplotlib/files/patch-v33-src-macosx.m.diff +++ b/python/py-matplotlib/files/patch-v33-src-macosx.m.diff @@ -1,12 +1,23 @@ ---- src/_macosx.m.orig 2019-05-18 14:01:10.000000000 -0400 -+++ src/_macosx.m 2019-05-21 09:49:01.000000000 -0400 -@@ -1,6 +1,9 @@ - #define PY_SSIZE_T_CLEAN - #include - #include -+#ifndef kCTForegroundColorFromContextAttributeName -+extern const CFStringRef kCTForegroundColorFromContextAttributeName AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; -+#endif - #include - #include - +In version 3.3.0 upstream started making use of features introduced +in macOS 10.11, which caused failures when building the MacOSX +backend on earlier macOS versions.. + +see: https://github.com/matplotlib/matplotlib/pull/17956 + +--- src/_macosx.m.orig 2020-07-18 17:50:09.000000000 -0400 ++++ src/_macosx.m 2020-07-18 19:44:06.000000000 -0400 +@@ -1207,8 +1207,12 @@ + rect.size.height = 0; + rect.origin.x += height; + NSTextView* messagebox = [[NSTextView alloc] initWithFrame: rect]; +- messagebox.textContainer.maximumNumberOfLines = 2; +- messagebox.textContainer.lineBreakMode = NSLineBreakByTruncatingTail; ++ ++ if (@available(macOS 10.11, *)) { ++ messagebox.textContainer.maximumNumberOfLines = 2; ++ messagebox.textContainer.lineBreakMode = NSLineBreakByTruncatingTail; ++ } ++ + [messagebox setFont: font]; + [messagebox setDrawsBackground: NO]; + [messagebox setSelectable: NO];