From fd9734a7cb24f7abb0908d9e6d78b960300c356b Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Mon, 21 Feb 2011 23:03:53 +0000 Subject: [PATCH] Remove unused patches --- matplotlib-0.87.7-matplotlibrc.patch | 13 ----- matplotlib-0.90.1-setup.patch | 53 ------------------ matplotlib-gcc43.patch | 63 ---------------------- matplotlib_gtk_tooltip.patch | 81 ---------------------------- python-matplotlib.spec | 10 ++-- 5 files changed, 3 insertions(+), 217 deletions(-) delete mode 100644 matplotlib-0.87.7-matplotlibrc.patch delete mode 100644 matplotlib-0.90.1-setup.patch delete mode 100644 matplotlib-gcc43.patch delete mode 100644 matplotlib_gtk_tooltip.patch diff --git a/matplotlib-0.87.7-matplotlibrc.patch b/matplotlib-0.87.7-matplotlibrc.patch deleted file mode 100644 index a172ebe..0000000 --- a/matplotlib-0.87.7-matplotlibrc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- matplotlib-0.87/setup.py.orig 2006-02-14 11:11:32.000000000 -0700 -+++ matplotlib-0.87/setup.py 2006-02-27 15:19:28.000000000 -0700 -@@ -258,8 +258,8 @@ - - # packagers: set rc['numerix'] and rc['backend'] here to override the auto - # defaults, eg --#rc['numerix'] = numpy --#rc['backend'] = GTKAgg -+rc['numerix'] = 'numpy' -+rc['backend'] = 'GTKAgg' - if sys.platform=='win32': - rc = dict(backend='TkAgg', numerix='Numeric') - template = file('matplotlibrc.template').read() diff --git a/matplotlib-0.90.1-setup.patch b/matplotlib-0.90.1-setup.patch deleted file mode 100644 index 0c2624b..0000000 --- a/matplotlib-0.90.1-setup.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- matplotlib-0.90.1/setup.py.tkagg 2007-06-04 10:34:46.000000000 -0600 -+++ matplotlib-0.90.1/setup.py 2007-06-04 10:54:44.000000000 -0600 -@@ -28,13 +28,13 @@ - # it. It makes very nice antialiased output and also supports alpha - # blending - BUILD_AGG = 1 --BUILD_GTKAGG = 'auto' --BUILD_GTK = 'auto' -+BUILD_GTKAGG = 1 -+BUILD_GTK = 1 - - # build TK GUI with Agg renderer ; requires Tkinter Python extension - # and Tk includes - # Use False or 0 if you don't want to build --BUILD_TKAGG = 'auto' -+BUILD_TKAGG = 1 - - # build wxPython extension code to efficiently blit agg into wx. Only - # needed for wxpython <2.8 if you plan on doing animations -@@ -226,11 +226,11 @@ - - havegtk.gotit = None - --if BUILD_GTK and havegtk(): -+if BUILD_GTK: - build_gdk(ext_modules, packages, NUMERIX) - rc['backend'] = 'GTK' - --if BUILD_GTKAGG and havegtk(): -+if BUILD_GTKAGG: - BUILD_AGG = 1 - build_gtkagg(ext_modules, packages, NUMERIX) - rc['backend'] = 'GTKAgg' -@@ -245,16 +245,9 @@ - print 'Tkinter present but import failed' - BUILD_TKAGG = 0 - else: -- try: -- tk = Tkinter.Tk() -- tk.withdraw() -- except Tkinter.TclError: -- print 'Tkinter present, but window failed to open' -- BUILD_TKAGG = 0 -- else: -- BUILD_AGG = 1 -- build_tkagg(ext_modules, packages, NUMERIX) -- rc['backend'] = 'TkAgg' -+ BUILD_AGG = 1 -+ build_tkagg(ext_modules, packages, NUMERIX) -+ rc['backend'] = 'TkAgg' - - if BUILD_WXAGG: - try: diff --git a/matplotlib-gcc43.patch b/matplotlib-gcc43.patch deleted file mode 100644 index 7bbc66b..0000000 --- a/matplotlib-gcc43.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -u -r matplotlib-0.91.2-old/ttconv/pprdrv.h matplotlib-0.91.2/ttconv/pprdrv.h ---- matplotlib-0.91.2-old/ttconv/pprdrv.h 2007-11-29 17:36:53.000000000 -0900 -+++ matplotlib-0.91.2/ttconv/pprdrv.h 2008-03-21 13:58:01.000000000 -0800 -@@ -20,7 +20,7 @@ - */ - - #include --#include -+#include - - /* - * Encapsulates all of the output to write to an arbitrary output -diff -u -r matplotlib-0.91.2-old/ttconv/pprdrv_tt2.cpp matplotlib-0.91.2/ttconv/pprdrv_tt2.cpp ---- matplotlib-0.91.2-old/ttconv/pprdrv_tt2.cpp 2007-11-29 17:36:53.000000000 -0900 -+++ matplotlib-0.91.2/ttconv/pprdrv_tt2.cpp 2008-03-21 16:04:49.000000000 -0800 -@@ -31,10 +31,11 @@ - */ - - #include "global_defines.h" --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include - #include "pprdrv.h" - #include "truetype.h" - #include -diff -u -r matplotlib-0.91.2-old/ttconv/pprdrv_tt.cpp matplotlib-0.91.2/ttconv/pprdrv_tt.cpp ---- matplotlib-0.91.2-old/ttconv/pprdrv_tt.cpp 2007-11-29 17:36:53.000000000 -0900 -+++ matplotlib-0.91.2/ttconv/pprdrv_tt.cpp 2008-03-21 15:57:42.000000000 -0800 -@@ -23,9 +23,9 @@ - */ - - #include "global_defines.h" --#include --#include --#include -+#include -+#include -+#include - #include "pprdrv.h" - #include "truetype.h" - #include -diff -u -r matplotlib-0.91.2-old/ttconv/ttutil.cpp matplotlib-0.91.2/ttconv/ttutil.cpp ---- matplotlib-0.91.2-old/ttconv/ttutil.cpp 2007-11-29 17:36:53.000000000 -0900 -+++ matplotlib-0.91.2/ttconv/ttutil.cpp 2008-03-24 11:25:06.000000000 -0800 -@@ -8,9 +8,9 @@ - /* (c) Frank Siegert 1996 */ - - #include "global_defines.h" --#include --#include --#include -+#include -+#include -+#include - #include "pprdrv.h" - - #if DEBUG_TRUETYPE diff --git a/matplotlib_gtk_tooltip.patch b/matplotlib_gtk_tooltip.patch deleted file mode 100644 index e4c6091..0000000 --- a/matplotlib_gtk_tooltip.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- lib/matplotlib/backends/backend_gtk.py 2010/02/18 14:54:30 8141 -+++ lib/matplotlib/backends/backend_gtk.py 2010/03/20 22:49:25 8203 -@@ -17,6 +17,8 @@ - % (gtk.pygtk_version + pygtk_version_required)) - del pygtk_version_required - -+_new_tooltip_api = (gtk.pygtk_version[1] >= 12) -+ - import matplotlib - from matplotlib import verbose - from matplotlib._pylab_helpers import Gcf -@@ -448,7 +450,7 @@ - # diong a blanket catch here, but an not sure what a - # better way is - JDH - verbose.report('Could not load matplotlib icon: %s' % sys.exc_info()[1]) -- -+ - self.vbox = gtk.VBox() - self.window.add(self.vbox) - self.vbox.show() -@@ -618,7 +620,8 @@ - - def _init_toolbar2_4(self): - basedir = os.path.join(matplotlib.rcParams['datapath'],'images') -- self.tooltips = gtk.Tooltips() -+ if not _new_tooltip_api: -+ self.tooltips = gtk.Tooltips() - - for text, tooltip_text, image_file, callback in self.toolitems: - if text is None: -@@ -630,7 +633,10 @@ - tbutton = gtk.ToolButton(image, text) - self.insert(tbutton, -1) - tbutton.connect('clicked', getattr(self, callback)) -- tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') -+ if _new_tooltip_api: -+ tbutton.set_tooltip_text(tooltip_text) -+ else: -+ tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') - - toolitem = gtk.SeparatorToolItem() - self.insert(toolitem, -1) -@@ -760,7 +766,8 @@ - def _create_toolitems_2_4(self): - # use the GTK+ 2.4 GtkToolbar API - iconSize = gtk.ICON_SIZE_SMALL_TOOLBAR -- self.tooltips = gtk.Tooltips() -+ if not _new_tooltip_api: -+ self.tooltips = gtk.Tooltips() - - for text, tooltip_text, image_num, callback, callback_arg, scroll \ - in self.toolitems: -@@ -778,15 +785,22 @@ - tbutton.connect('clicked', getattr(self, callback)) - if scroll: - tbutton.connect('scroll_event', getattr(self, callback)) -- tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') -+ if _new_tooltip_api: -+ tbutton.set_tooltip_text(tooltip_text) -+ else: -+ tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') - - # Axes toolitem, is empty at start, update() adds a menu if >=2 axes - self.axes_toolitem = gtk.ToolItem() - self.insert(self.axes_toolitem, 0) -- self.axes_toolitem.set_tooltip ( -- self.tooltips, -- tip_text='Select axes that controls affect', -- tip_private = 'Private') -+ if _new_tooltip_api: -+ self.axes_toolitem.set_tooltip_text( -+ 'Select axes that controls affect') -+ else: -+ self.axes_toolitem.set_tooltip ( -+ self.tooltips, -+ tip_text='Select axes that controls affect', -+ tip_private = 'Private') - - align = gtk.Alignment (xalign=0.5, yalign=0.5, xscale=0.0, yscale=0.0) - self.axes_toolitem.add(align) - diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 5f34159..d8d5e2c 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -29,9 +29,7 @@ URL: http://sourceforge.net/projects/matplotlib Source0: matplotlib-%{version}-without-gpc.tar.gz Source1: http://downloads.sourceforge.net/mpl_sampledata-%{version}.tar.gz Source2: setup.cfg -Patch0: matplotlib-gcc43.patch -Patch1: matplotlib_gtk_tooltip.patch -Patch2: matplotlib-1.0.1-plot_directive.patch +Patch0: matplotlib-1.0.1-plot_directive.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel, freetype-devel, libpng-devel, zlib-devel @@ -78,10 +76,7 @@ BuildRequires: python-basemap %prep %setup -q -n matplotlib-%{version} -b1 -#%setup -q -n matplotlib-0.99.3 -#%patch0 -p1 -#%patch1 -p0 -%patch2 -p1 +%patch0 -p1 chmod -x lib/matplotlib/mpl-data/images/*.svg # Ensure all example files are non-executable so that the -doc package doesn't @@ -149,6 +144,7 @@ rm -rf $RPM_BUILD_ROOT - Add conditional for optionally building doc sub-package - Add flag to build low res images for documentation - Add matplotlib-1.0.1-plot_directive.patch to fix build of low res images +- Remove unused patches * Sat Feb 19 2011 Jonathan G. Underwood - 1.0.1-2 - Build and package HTML documentation in -doc sub-package