diff --git math/py-matplotlib/Makefile math/py-matplotlib/Makefile index 671c6490c8b7..8972a5f48e3d 100644 --- math/py-matplotlib/Makefile +++ math/py-matplotlib/Makefile @@ -2,15 +2,14 @@ # $FreeBSD$ PORTNAME= matplotlib -DISTVERSIONPREFIX= v -DISTVERSION= 2.1.2 -PORTREVISION= 5 +DISTVERSION= 2.2.4 CATEGORIES= math python +MASTER_SITES= CHEESESHOP:DEFAULT \ + https://jqueryui.com/resources/download/:jquery +DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz \ + jquery-ui-1.12.1.zip:jquery PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ -PATCHFILES= 5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch:-p1 # fix of the failure on 12 i386: https://github.com/matplotlib/matplotlib/issues/10698 - MAINTAINER= mainland@apeiron.net COMMENT= Plotting library uses a syntax familiar to MATLAB users @@ -29,8 +28,7 @@ RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR} py27_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}backports.functools_lru_cache>0:devel/py-backports.functools_lru_cache@${PY_FLAVOR} -USES= compiler:c++11-lib gettext pkgconfig python shebangfix uniquefiles:dirs -USE_GITHUB= yes +USES= compiler:c++11-lib gettext gnome pkgconfig python shebangfix uniquefiles:dirs USE_PYTHON= autoplist distutils CFLAGS+= -I${LOCALBASE}/include @@ -85,24 +83,18 @@ WXAGGBACKEND_BUILD_DEPENDS= Xvfb:x11-servers/xorg-vfbserver .endif .include + .if ${PORT_OPTIONS:MQT4AGG_BACKEND} DEPRECATED= Qt4 has been EOL since december 2015 EXPIRATION_DATE= 2019-03-15 .endif post-extract: - ${FIND} ${WRKSRC} -name \*.py | ${XARGS} ${CHMOD} -x + @${FIND} ${WRKSRC} -name '*.py' | ${XARGS} ${CHMOD} -x post-patch: - ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ - -e 's|%%TCL_INCLUDEDIR%%|${TCL_INCLUDEDIR}|g' \ - -e 's|%%TK_INCLUDEDIR%%|${TK_INCLUDEDIR}|g' \ - -e 's|%%TCL_LIBDIR%%|${TCL_LIBDIR}|g' \ - -e 's|%%TK_LIBDIR%%|${TK_LIBDIR}|g' \ - -e 's|%%TCL_VER%%|${TCL_SHLIB_VER}|g' \ - -e 's|%%TK_VER%%|${TK_SHLIB_VER}|g' \ - ${WRKSRC}/setupext.py - ${REINPLACE_CMD} -e 's|%%GTK_BACKEND%%|${GTK_BACKEND}|g' \ + @${REINPLACE_CMD} -e 's|%%DISTDIR%%|${DISTDIR}|g' ${WRKSRC}/setup.py + @${REINPLACE_CMD} -e 's|%%GTK_BACKEND%%|${GTK_BACKEND}|g' \ -e 's|%%GTKAGG_BACKEND%%|${GTKAGG_BACKEND}|g' \ -e 's|%%QT4AGG_BACKEND%%|${QT4AGG_BACKEND}|g' \ -e 's|%%QT5AGG_BACKEND%%|${QT5AGG_BACKEND}|g' \ @@ -111,8 +103,9 @@ post-patch: ${WRKSRC}/setup.cfg post-install: - @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib -name '*.so' \ + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib -name '*.so' \ | ${XARGS} ${STRIP_CMD} +# unzip ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/web_backend/jquery-ui-1.12.1.zip -o -d ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/web_backend/ post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} diff --git math/py-matplotlib/distinfo math/py-matplotlib/distinfo index 8ca6ad299d1f..4835b78eafc0 100644 --- math/py-matplotlib/distinfo +++ math/py-matplotlib/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1520663268 -SHA256 (matplotlib-matplotlib-v2.1.2_GH0.tar.gz) = 613d79282a0a8ba88cfc52dbcf1b08ab070dae395c3d313d141ccc3f87e3c9fa -SIZE (matplotlib-matplotlib-v2.1.2_GH0.tar.gz) = 35181192 -SHA256 (5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch) = f332f13cd365cdc3903bed12bdb483366e0212d9481f0949474334db96cc3257 -SIZE (5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch) = 1736 +TIMESTAMP = 1552137082 +SHA256 (matplotlib-2.2.4.tar.gz) = 029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126 +SIZE (matplotlib-2.2.4.tar.gz) = 36974286 +SHA256 (jquery-ui-1.12.1.zip) = f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d +SIZE (jquery-ui-1.12.1.zip) = 439463 diff --git math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp deleted file mode 100644 index 09ed34033f35..000000000000 --- math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp +++ /dev/null @@ -1,111 +0,0 @@ -extern/ttconv/pprdrv_tt.cpp:245:41: error: cast from pointer to smaller type 'char' loses information - font->Copyright[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:261:42: error: cast from pointer to smaller type 'char' loses information - font->FamilyName[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:277:37: error: cast from pointer to smaller type 'char' loses information - font->Style[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:293:40: error: cast from pointer to smaller type 'char' loses information - font->FullName[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:309:39: error: cast from pointer to smaller type 'char' loses information - font->Version[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:325:40: error: cast from pointer to smaller type 'char' loses information - font->PostName[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:340:42: error: cast from pointer to smaller type 'char' loses information - font->PostName[length/2]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:355:41: error: cast from pointer to smaller type 'char' loses information - font->Trademark[length]=(char)NULL; - ^~~~~~~~~~ -extern/ttconv/pprdrv_tt.cpp:1041:19: error: cast from pointer to smaller type 'char' loses information - temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ - ^~~~~~~~~~ - ---- extern/ttconv/pprdrv_tt.cpp.orig 2016-09-09 02:50:50 UTC -+++ extern/ttconv/pprdrv_tt.cpp -@@ -242,7 +242,7 @@ void Read_name(struct TTFONT *font) - { - font->Copyright = (char*)calloc(sizeof(char),length+1); - strncpy(font->Copyright,(const char*)strings+offset,length); -- font->Copyright[length]=(char)NULL; -+ font->Copyright[length]='\0'; - replace_newlines_with_spaces(font->Copyright); - - #ifdef DEBUG_TRUETYPE -@@ -258,7 +258,7 @@ void Read_name(struct TTFONT *font) - free(font->FamilyName); - font->FamilyName = (char*)calloc(sizeof(char),length+1); - strncpy(font->FamilyName,(const char*)strings+offset,length); -- font->FamilyName[length]=(char)NULL; -+ font->FamilyName[length]='\0'; - replace_newlines_with_spaces(font->FamilyName); - - #ifdef DEBUG_TRUETYPE -@@ -274,7 +274,7 @@ void Read_name(struct TTFONT *font) - free(font->Style); - font->Style = (char*)calloc(sizeof(char),length+1); - strncpy(font->Style,(const char*)strings+offset,length); -- font->Style[length]=(char)NULL; -+ font->Style[length]='\0'; - replace_newlines_with_spaces(font->Style); - - #ifdef DEBUG_TRUETYPE -@@ -290,7 +290,7 @@ void Read_name(struct TTFONT *font) - free(font->FullName); - font->FullName = (char*)calloc(sizeof(char),length+1); - strncpy(font->FullName,(const char*)strings+offset,length); -- font->FullName[length]=(char)NULL; -+ font->FullName[length]='\0'; - replace_newlines_with_spaces(font->FullName); - - #ifdef DEBUG_TRUETYPE -@@ -306,7 +306,7 @@ void Read_name(struct TTFONT *font) - free(font->Version); - font->Version = (char*)calloc(sizeof(char),length+1); - strncpy(font->Version,(const char*)strings+offset,length); -- font->Version[length]=(char)NULL; -+ font->Version[length]='\0'; - replace_newlines_with_spaces(font->Version); - - #ifdef DEBUG_TRUETYPE -@@ -322,7 +322,7 @@ void Read_name(struct TTFONT *font) - free(font->PostName); - font->PostName = (char*)calloc(sizeof(char),length+1); - strncpy(font->PostName,(const char*)strings+offset,length); -- font->PostName[length]=(char)NULL; -+ font->PostName[length]='\0'; - replace_newlines_with_spaces(font->PostName); - - #ifdef DEBUG_TRUETYPE -@@ -337,7 +337,7 @@ void Read_name(struct TTFONT *font) - free(font->PostName); - font->PostName = (char*)calloc(sizeof(char),length+1); - utf16be_to_ascii(font->PostName, (char *)strings+offset, length); -- font->PostName[length/2]=(char)NULL; -+ font->PostName[length/2]='\0'; - replace_newlines_with_spaces(font->PostName); - - #ifdef DEBUG_TRUETYPE -@@ -352,7 +352,7 @@ void Read_name(struct TTFONT *font) - { - font->Trademark = (char*)calloc(sizeof(char),length+1); - strncpy(font->Trademark,(const char*)strings+offset,length); -- font->Trademark[length]=(char)NULL; -+ font->Trademark[length]='\0'; - replace_newlines_with_spaces(font->Trademark); - - #ifdef DEBUG_TRUETYPE -@@ -1038,7 +1038,7 @@ const char *ttfont_CharStrings_getname(struct TTFONT * - } - - strncpy(temp,ptr,len); /* Copy the pascal string into */ -- temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ -+ temp[len]='\0'; /* a buffer and make it ASCIIz. */ - - return temp; - } diff --git math/py-matplotlib/files/patch-setup.cfg math/py-matplotlib/files/patch-setup.cfg index c364140c860a..3f9bbe6dc56f 100644 --- math/py-matplotlib/files/patch-setup.cfg +++ math/py-matplotlib/files/patch-setup.cfg @@ -1,4 +1,4 @@ ---- setup.cfg.orig 2015-09-05 07:46:40 UTC +--- setup.cfg.orig 2019-03-09 12:26:07 UTC +++ setup.cfg @@ -0,0 +1,83 @@ +# Rename this file to setup.cfg to modify matplotlib's @@ -58,12 +58,12 @@ +# otherwise skip silently. This is the default +# behavior +# -+gtk = %%GTK_BACKEND%% -+gtkagg = %%GTKAGG_BACKEND%% -+qt4agg = %%QT4AGG_BACKEND%% -+qt5agg = %%QT5AGG_BACKEND%% -+tkagg = %%TKAGG_BACKEND%% -+wxagg = %%WXAGG_BACKEND%% ++gtk = True ++gtkagg = True ++qt4agg = False ++qt5agg = False ++tkagg = True ++wxagg = False +#macosx = False + +[rc_options] @@ -84,5 +84,3 @@ +# packages. Now that NumPy has emerge as the universal array +# package for python, numerix is not really necessary and is +# maintained to provide backward compatibility. Do not change -+# this unless you have a compelling reason to do so. -+#numerix = numpy diff --git math/py-matplotlib/files/patch-setup.py math/py-matplotlib/files/patch-setup.py new file mode 100644 index 000000000000..2a4fd17d08a8 --- /dev/null +++ math/py-matplotlib/files/patch-setup.py @@ -0,0 +1,22 @@ +--- setup.py.orig 2019-03-09 12:42:06 UTC ++++ setup.py +@@ -153,12 +153,13 @@ def _download_jquery_to(dest): + sha = 'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d' + if not os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")): + _makedirs(dest, exist_ok=True) +- try: +- buff = download_or_cache(url, sha) +- except Exception: +- raise IOError("Failed to download jquery-ui. Please download " + +- "{url} and extract it to {dest}.".format( +- url=url, dest=dest)) ++ buff = os.path.join("%%DISTDIR%%", "jquery-ui-1.12.1.zip") ++# try: ++# buff = download_or_cache(url, sha) ++# except Exception: ++# raise IOError("Failed to download jquery-ui. Please download " + ++# "{url} and extract it to {dest}.".format( ++# url=url, dest=dest)) + with ZipFile(buff) as zf: + zf.extractall(dest) +