View | Details | Raw Unified | Return to bug 236455 | Differences between
and this patch

Collapse All | Expand All

(-)math/py-matplotlib/Makefile (-19 / +12 lines)
Lines 2-16 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	matplotlib
4
PORTNAME=	matplotlib
5
DISTVERSIONPREFIX=	v
5
DISTVERSION=	2.2.4
6
DISTVERSION=	2.1.2
7
PORTREVISION=	5
8
CATEGORIES=	math python
6
CATEGORIES=	math python
7
MASTER_SITES=	CHEESESHOP:DEFAULT \
8
		https://jqueryui.com/resources/download/:jquery
9
DISTFILES=	${PORTNAME}-${PORTVERSION}.tar.gz \
10
		jquery-ui-1.12.1.zip:jquery
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
10
12
11
PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
12
PATCHFILES=	5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch:-p1 # fix of the failure on 12 i386: https://github.com/matplotlib/matplotlib/issues/10698
13
14
MAINTAINER=	mainland@apeiron.net
13
MAINTAINER=	mainland@apeiron.net
15
COMMENT=	Plotting library uses a syntax familiar to MATLAB users
14
COMMENT=	Plotting library uses a syntax familiar to MATLAB users
16
15
Lines 29-36 RUN_DEPENDS= ${PYNUMPY} \ Link Here
29
		${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR}
28
		${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR}
30
py27_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}backports.functools_lru_cache>0:devel/py-backports.functools_lru_cache@${PY_FLAVOR}
29
py27_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}backports.functools_lru_cache>0:devel/py-backports.functools_lru_cache@${PY_FLAVOR}
31
30
32
USES=		compiler:c++11-lib gettext pkgconfig python shebangfix uniquefiles:dirs
31
USES=		compiler:c++11-lib gettext gnome pkgconfig python shebangfix uniquefiles:dirs
33
USE_GITHUB=	yes
34
USE_PYTHON=	autoplist distutils
32
USE_PYTHON=	autoplist distutils
35
CFLAGS+=	-I${LOCALBASE}/include
33
CFLAGS+=	-I${LOCALBASE}/include
36
34
Lines 85-108 WXAGGBACKEND_BUILD_DEPENDS= Xvfb:x11-servers/xorg-vfbserver Link Here
85
.endif
83
.endif
86
84
87
.include <bsd.port.options.mk>
85
.include <bsd.port.options.mk>
86
88
.if ${PORT_OPTIONS:MQT4AGG_BACKEND}
87
.if ${PORT_OPTIONS:MQT4AGG_BACKEND}
89
DEPRECATED=		Qt4 has been EOL since december 2015
88
DEPRECATED=		Qt4 has been EOL since december 2015
90
EXPIRATION_DATE=	2019-03-15
89
EXPIRATION_DATE=	2019-03-15
91
.endif
90
.endif
92
91
93
post-extract:
92
post-extract:
94
	${FIND} ${WRKSRC} -name \*.py | ${XARGS} ${CHMOD} -x
93
	@${FIND} ${WRKSRC} -name '*.py' | ${XARGS} ${CHMOD} -x
95
94
96
post-patch:
95
post-patch:
97
	${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
96
	@${REINPLACE_CMD} -e 's|%%DISTDIR%%|${DISTDIR}|g' ${WRKSRC}/setup.py
98
			 -e 's|%%TCL_INCLUDEDIR%%|${TCL_INCLUDEDIR}|g' \
97
	@${REINPLACE_CMD} -e 's|%%GTK_BACKEND%%|${GTK_BACKEND}|g' \
99
			 -e 's|%%TK_INCLUDEDIR%%|${TK_INCLUDEDIR}|g' \
100
			 -e 's|%%TCL_LIBDIR%%|${TCL_LIBDIR}|g' \
101
			 -e 's|%%TK_LIBDIR%%|${TK_LIBDIR}|g' \
102
			 -e 's|%%TCL_VER%%|${TCL_SHLIB_VER}|g' \
103
			 -e 's|%%TK_VER%%|${TK_SHLIB_VER}|g' \
104
		${WRKSRC}/setupext.py
105
	${REINPLACE_CMD} -e 's|%%GTK_BACKEND%%|${GTK_BACKEND}|g' \
106
			 -e 's|%%GTKAGG_BACKEND%%|${GTKAGG_BACKEND}|g' \
98
			 -e 's|%%GTKAGG_BACKEND%%|${GTKAGG_BACKEND}|g' \
107
			 -e 's|%%QT4AGG_BACKEND%%|${QT4AGG_BACKEND}|g' \
99
			 -e 's|%%QT4AGG_BACKEND%%|${QT4AGG_BACKEND}|g' \
108
			 -e 's|%%QT5AGG_BACKEND%%|${QT5AGG_BACKEND}|g' \
100
			 -e 's|%%QT5AGG_BACKEND%%|${QT5AGG_BACKEND}|g' \
Lines 111-118 post-patch: Link Here
111
		${WRKSRC}/setup.cfg
103
		${WRKSRC}/setup.cfg
112
104
113
post-install:
105
post-install:
114
	@${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib -name '*.so' \
106
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib -name '*.so' \
115
		| ${XARGS} ${STRIP_CMD}
107
		| ${XARGS} ${STRIP_CMD}
108
#	unzip ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/web_backend/jquery-ui-1.12.1.zip -o -d ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/web_backend/
116
109
117
post-install-EXAMPLES-on:
110
post-install-EXAMPLES-on:
118
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
111
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(-)math/py-matplotlib/distinfo (-5 / +5 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1520663268
1
TIMESTAMP = 1552137082
2
SHA256 (matplotlib-matplotlib-v2.1.2_GH0.tar.gz) = 613d79282a0a8ba88cfc52dbcf1b08ab070dae395c3d313d141ccc3f87e3c9fa
2
SHA256 (matplotlib-2.2.4.tar.gz) = 029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126
3
SIZE (matplotlib-matplotlib-v2.1.2_GH0.tar.gz) = 35181192
3
SIZE (matplotlib-2.2.4.tar.gz) = 36974286
4
SHA256 (5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch) = f332f13cd365cdc3903bed12bdb483366e0212d9481f0949474334db96cc3257
4
SHA256 (jquery-ui-1.12.1.zip) = f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d
5
SIZE (5b7a21e53e11a7064b2171c0d91afda67f30c4e7.patch) = 1736
5
SIZE (jquery-ui-1.12.1.zip) = 439463
(-)math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp (-111 lines)
Removed Link Here
1
extern/ttconv/pprdrv_tt.cpp:245:41: error: cast from pointer to smaller type 'char' loses information
2
                font->Copyright[length]=(char)NULL;
3
                                        ^~~~~~~~~~
4
extern/ttconv/pprdrv_tt.cpp:261:42: error: cast from pointer to smaller type 'char' loses information
5
                font->FamilyName[length]=(char)NULL;
6
                                         ^~~~~~~~~~
7
extern/ttconv/pprdrv_tt.cpp:277:37: error: cast from pointer to smaller type 'char' loses information
8
                font->Style[length]=(char)NULL;
9
                                    ^~~~~~~~~~
10
extern/ttconv/pprdrv_tt.cpp:293:40: error: cast from pointer to smaller type 'char' loses information
11
                font->FullName[length]=(char)NULL;
12
                                       ^~~~~~~~~~
13
extern/ttconv/pprdrv_tt.cpp:309:39: error: cast from pointer to smaller type 'char' loses information
14
                font->Version[length]=(char)NULL;
15
                                      ^~~~~~~~~~
16
extern/ttconv/pprdrv_tt.cpp:325:40: error: cast from pointer to smaller type 'char' loses information
17
                font->PostName[length]=(char)NULL;
18
                                       ^~~~~~~~~~
19
extern/ttconv/pprdrv_tt.cpp:340:42: error: cast from pointer to smaller type 'char' loses information
20
                font->PostName[length/2]=(char)NULL;
21
                                         ^~~~~~~~~~
22
extern/ttconv/pprdrv_tt.cpp:355:41: error: cast from pointer to smaller type 'char' loses information
23
                font->Trademark[length]=(char)NULL;
24
                                        ^~~~~~~~~~
25
extern/ttconv/pprdrv_tt.cpp:1041:19: error: cast from pointer to smaller type 'char' loses information
26
        temp[len]=(char)NULL;   /* a buffer and make it ASCIIz. */
27
                  ^~~~~~~~~~
28
29
--- extern/ttconv/pprdrv_tt.cpp.orig	2016-09-09 02:50:50 UTC
30
+++ extern/ttconv/pprdrv_tt.cpp
31
@@ -242,7 +242,7 @@ void Read_name(struct TTFONT *font)
32
             {
33
                 font->Copyright = (char*)calloc(sizeof(char),length+1);
34
                 strncpy(font->Copyright,(const char*)strings+offset,length);
35
-                font->Copyright[length]=(char)NULL;
36
+                font->Copyright[length]='\0';
37
                 replace_newlines_with_spaces(font->Copyright);
38
 
39
 #ifdef DEBUG_TRUETYPE
40
@@ -258,7 +258,7 @@ void Read_name(struct TTFONT *font)
41
                 free(font->FamilyName);
42
                 font->FamilyName = (char*)calloc(sizeof(char),length+1);
43
                 strncpy(font->FamilyName,(const char*)strings+offset,length);
44
-                font->FamilyName[length]=(char)NULL;
45
+                font->FamilyName[length]='\0';
46
                 replace_newlines_with_spaces(font->FamilyName);
47
 
48
 #ifdef DEBUG_TRUETYPE
49
@@ -274,7 +274,7 @@ void Read_name(struct TTFONT *font)
50
                 free(font->Style);
51
                 font->Style = (char*)calloc(sizeof(char),length+1);
52
                 strncpy(font->Style,(const char*)strings+offset,length);
53
-                font->Style[length]=(char)NULL;
54
+                font->Style[length]='\0';
55
                 replace_newlines_with_spaces(font->Style);
56
 
57
 #ifdef DEBUG_TRUETYPE
58
@@ -290,7 +290,7 @@ void Read_name(struct TTFONT *font)
59
                 free(font->FullName);
60
                 font->FullName = (char*)calloc(sizeof(char),length+1);
61
                 strncpy(font->FullName,(const char*)strings+offset,length);
62
-                font->FullName[length]=(char)NULL;
63
+                font->FullName[length]='\0';
64
                 replace_newlines_with_spaces(font->FullName);
65
 
66
 #ifdef DEBUG_TRUETYPE
67
@@ -306,7 +306,7 @@ void Read_name(struct TTFONT *font)
68
                 free(font->Version);
69
                 font->Version = (char*)calloc(sizeof(char),length+1);
70
                 strncpy(font->Version,(const char*)strings+offset,length);
71
-                font->Version[length]=(char)NULL;
72
+                font->Version[length]='\0';
73
                 replace_newlines_with_spaces(font->Version);
74
 
75
 #ifdef DEBUG_TRUETYPE
76
@@ -322,7 +322,7 @@ void Read_name(struct TTFONT *font)
77
                 free(font->PostName);
78
                 font->PostName = (char*)calloc(sizeof(char),length+1);
79
                 strncpy(font->PostName,(const char*)strings+offset,length);
80
-                font->PostName[length]=(char)NULL;
81
+                font->PostName[length]='\0';
82
                 replace_newlines_with_spaces(font->PostName);
83
 
84
 #ifdef DEBUG_TRUETYPE
85
@@ -337,7 +337,7 @@ void Read_name(struct TTFONT *font)
86
                 free(font->PostName);
87
                 font->PostName = (char*)calloc(sizeof(char),length+1);
88
                 utf16be_to_ascii(font->PostName, (char *)strings+offset, length);
89
-                font->PostName[length/2]=(char)NULL;
90
+                font->PostName[length/2]='\0';
91
                 replace_newlines_with_spaces(font->PostName);
92
 
93
 #ifdef DEBUG_TRUETYPE
94
@@ -352,7 +352,7 @@ void Read_name(struct TTFONT *font)
95
             {
96
                 font->Trademark = (char*)calloc(sizeof(char),length+1);
97
                 strncpy(font->Trademark,(const char*)strings+offset,length);
98
-                font->Trademark[length]=(char)NULL;
99
+                font->Trademark[length]='\0';
100
                 replace_newlines_with_spaces(font->Trademark);
101
 
102
 #ifdef DEBUG_TRUETYPE
103
@@ -1038,7 +1038,7 @@ const char *ttfont_CharStrings_getname(struct TTFONT *
104
         }
105
 
106
         strncpy(temp,ptr,len);  /* Copy the pascal string into */
107
-        temp[len]=(char)NULL;   /* a buffer and make it ASCIIz. */
108
+        temp[len]='\0';   /* a buffer and make it ASCIIz. */
109
 
110
         return temp;
111
     }
(-)math/py-matplotlib/files/patch-setup.cfg (-9 / +7 lines)
Lines 1-4 Link Here
1
--- setup.cfg.orig	2015-09-05 07:46:40 UTC
1
--- setup.cfg.orig	2019-03-09 12:26:07 UTC
2
+++ setup.cfg
2
+++ setup.cfg
3
@@ -0,0 +1,83 @@
3
@@ -0,0 +1,83 @@
4
+# Rename this file to setup.cfg to modify matplotlib's
4
+# Rename this file to setup.cfg to modify matplotlib's
Lines 58-69 Link Here
58
+#           otherwise skip silently. This is the default
58
+#           otherwise skip silently. This is the default
59
+#           behavior
59
+#           behavior
60
+#
60
+#
61
+gtk = %%GTK_BACKEND%%
61
+gtk = True
62
+gtkagg = %%GTKAGG_BACKEND%%
62
+gtkagg = True
63
+qt4agg = %%QT4AGG_BACKEND%%
63
+qt4agg = False
64
+qt5agg = %%QT5AGG_BACKEND%%
64
+qt5agg = False
65
+tkagg = %%TKAGG_BACKEND%%
65
+tkagg = True
66
+wxagg = %%WXAGG_BACKEND%%
66
+wxagg = False
67
+#macosx = False
67
+#macosx = False
68
+
68
+
69
+[rc_options]
69
+[rc_options]
Lines 84-88 Link Here
84
+# packages. Now that NumPy has emerge as the universal array
84
+# packages. Now that NumPy has emerge as the universal array
85
+# package for python, numerix is not really necessary and is
85
+# package for python, numerix is not really necessary and is
86
+# maintained to provide backward compatibility. Do not change
86
+# maintained to provide backward compatibility. Do not change
87
+# this unless you have a compelling reason to do so.
88
+#numerix = numpy
(-)math/py-matplotlib/files/patch-setup.py (+22 lines)
Added Link Here
1
--- setup.py.orig	2019-03-09 12:42:06 UTC
2
+++ setup.py
3
@@ -153,12 +153,13 @@ def _download_jquery_to(dest):
4
     sha = 'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d'
5
     if not os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")):
6
         _makedirs(dest, exist_ok=True)
7
-        try:
8
-            buff = download_or_cache(url, sha)
9
-        except Exception:
10
-            raise IOError("Failed to download jquery-ui.  Please download " +
11
-                          "{url} and extract it to {dest}.".format(
12
-                              url=url, dest=dest))
13
+        buff = os.path.join("%%DISTDIR%%", "jquery-ui-1.12.1.zip")
14
+#        try:
15
+#            buff = download_or_cache(url, sha)
16
+#        except Exception:
17
+#            raise IOError("Failed to download jquery-ui.  Please download " +
18
+#                          "{url} and extract it to {dest}.".format(
19
+#                              url=url, dest=dest))
20
         with ZipFile(buff) as zf:
21
             zf.extractall(dest)
22
 

Return to bug 236455