Date: Sun, 16 Oct 2011 17:17:43 GMT From: Ruslan Mahmatkhanov <cvs-src@yandex.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/161716: [PATCH] math/py-matplotlib: fix build on 10-CURRENT Message-ID: <201110161717.p9GHHh4M000310@red.freebsd.org> Resent-Message-ID: <201110161720.p9GHK9Ed058185@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161716 >Category: ports >Synopsis: [PATCH] math/py-matplotlib: fix build on 10-CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 16 17:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Ruslan Mahmatkhanov >Release: 10.0-CURRENT >Organization: >Environment: 10.0-CURRENT i386 >Description: - fix build on 10.0-CURRENT (new item in patch-setupext.py) while here: - pet porlint (change spaces with tabs) - strict python versions to 2.6-2.7. Python 2.4 and 2.5 are EOL, and python3 is not supported by py-matplotlib - use wxPython 2.8+ according to [1]: """ wxpython 2.8 or later The python wrappers for the wx widgets library for use with the WX or WXAgg backend """ - when using wxPython 2.8+, file _wxagg.so does not installs, since 2.8 has it's own version of it: """ wxPython: 2.8.12.1 * WxAgg extension not required for wxPython >= 2.8 """ so remove it from pkg-plist and from Makefile. [1] http://matplotlib.sourceforge.net/users/installing.html >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/Makefile b/Makefile index c153554..1a043ad 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PORTNAME= matplotlib PORTVERSION= 1.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= math python MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -23,11 +23,11 @@ LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \ png.6:${PORTSDIR}/graphics/png RUN_DEPENDS= ${PYNUMPY} -USE_PYTHON= 2.4+ +USE_PYTHON= 2.6-2.7 USE_PYDISTUTILS= yes CFLAGS+= -I${LOCALBASE}/include -OPTIONS= GTKBACKEND "GTK backend support" ON \ +OPTIONS= GTKBACKEND "GTK backend support" ON \ GTKAGGBACKEND "GTKAgg backend support" ON \ TKAGGBACKEND "TKAgg backend support" ON \ WXAGGBACKEND "WXAgg backend support" OFF @@ -47,23 +47,23 @@ USE_GNOME= gtk20 pygtk2 .endif .if defined(WITH_GTKBACKEND) && !defined(WITHOUT_GTKBACKEND) -GTK_BACKEND=True +GTK_BACKEND= True -PLIST_SUB+= GTKBACKEND="" +PLIST_SUB+= GTKBACKEND="" .else -GTK_BACKEND=False +GTK_BACKEND= False -PLIST_SUB+= GTKBACKEND="@comment " +PLIST_SUB+= GTKBACKEND="@comment " .endif .if defined(WITH_GTKAGGBACKEND) -GTKAGG_BACKEND=True +GTKAGG_BACKEND= True -PLIST_SUB+= GTKAGGBACKEND="" +PLIST_SUB+= GTKAGGBACKEND="" .else -GTKAGG_BACKEND=False +GTKAGG_BACKEND= False -PLIST_SUB+= GTKAGGBACKEND="@comment " +PLIST_SUB+= GTKAGGBACKEND="@comment " .endif .if defined(WITH_TKAGGBACKEND) @@ -73,27 +73,23 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkint USE_TCL_RUN= yes USE_TK_RUN= yes -TKAGG_BACKEND=True +TKAGG_BACKEND= True -PLIST_SUB+= TKAGGBACKEND="" +PLIST_SUB+= TKAGGBACKEND="" .else -TKAGG_BACKEND=False +TKAGG_BACKEND= False -PLIST_SUB+= TKAGGBACKEND="@comment " +PLIST_SUB+= TKAGGBACKEND="@comment " .endif .if defined(WITH_WXAGGBACKEND) -USE_WX= 2.6 +USE_WX= 2.8+ WX_COMPS= python CONFIGURE_ENV+= WX_CONFIG="${WX_CONFIG}" -WXAGG_BACKEND=True - -PLIST_SUB+= WXAGGBACKEND="" +WXAGG_BACKEND= True .else -WXAGG_BACKEND=False - -PLIST_SUB+= WXAGGBACKEND="@comment " +WXAGG_BACKEND= False .endif .include <bsd.port.pre.mk> diff --git a/files/patch-setupext.py b/files/patch-setupext.py index 2aa771b..eb23ebc 100644 --- a/files/patch-setupext.py +++ b/files/patch-setupext.py @@ -1,16 +1,17 @@ ---- setupext.py.orig 2010-07-07 09:41:55.000000000 +0800 -+++ setupext.py 2011-06-27 16:14:58.000000000 +0800 -@@ -68,6 +68,9 @@ +--- setupext.py.orig 2010-07-07 05:41:55.000000000 +0400 ++++ setupext.py 2011-10-16 18:49:43.000000000 +0400 +@@ -68,6 +68,10 @@ 'freebsd4' : ['/usr/local', '/usr'], 'freebsd5' : ['/usr/local', '/usr'], 'freebsd6' : ['/usr/local', '/usr'], + 'freebsd7' : ['/usr/local', '/usr'], + 'freebsd8' : ['/usr/local', '/usr'], + 'freebsd9' : ['/usr/local', '/usr'], ++ 'freebsd10': ['/usr/local', '/usr'], 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',], 'gnukfreebsd5' : ['/usr/local', '/usr'], 'gnukfreebsd6' : ['/usr/local', '/usr'], -@@ -789,7 +792,7 @@ +@@ -789,7 +793,7 @@ module.libraries.extend(wxlibs) return @@ -19,7 +20,7 @@ # Make sure you use the Tk version given by Tkinter.TkVersion # or else you'll build for a wrong version of the Tcl -@@ -828,8 +831,12 @@ +@@ -828,8 +832,12 @@ gotit = False if gotit: @@ -33,7 +34,7 @@ else: print_status("Tkinter", "no") if explanation is not None: -@@ -1092,9 +1099,9 @@ +@@ -1092,9 +1100,9 @@ # Add final versions of directories and libraries to module lists tcl_lib, tcl_inc, tk_lib, tk_inc = result diff --git a/pkg-plist b/pkg-plist index 7e74e0a..0fb411b 100644 --- a/pkg-plist +++ b/pkg-plist @@ -50,7 +50,6 @@ %%GTKBACKEND%%%%PYTHON_SITELIBDIR%%/matplotlib/backends/_backend_gdk.so %%GTKAGGBACKEND%%%%PYTHON_SITELIBDIR%%/matplotlib/backends/_gtkagg.so %%TKAGGBACKEND%%%%PYTHON_SITELIBDIR%%/matplotlib/backends/_tkagg.so -%%WXAGGBACKEND%%%%PYTHON_SITELIBDIR%%/matplotlib/backends/_wxagg.so %%PYTHON_SITELIBDIR%%/matplotlib/backends/backend_agg.py %%PYTHON_SITELIBDIR%%/matplotlib/backends/backend_agg.pyc %%PYTHON_SITELIBDIR%%/matplotlib/backends/backend_agg.pyo >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110161717.p9GHHh4M000310>