From 28081e1ceaa20ea7f0d6efae49e1bc1d7508551560f7d4cc93071636dbb0cd34 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 17 Aug 2011 22:05:34 +0000 Subject: [PATCH] Accepting request 78852 from devel:languages:python - fix build for platform == linux3 (forwarded request 78835 from oertel) OBS-URL: https://build.opensuse.org/request/show/78852 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=10 --- matplotlib-1.0.1-plot_directive.patch | 12 ++++++++ matplotlib-linux3.patch | 43 +++++++++++++++++++++++++++ python-matplotlib.changes | 5 ++++ python-matplotlib.spec | 6 +++- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 matplotlib-1.0.1-plot_directive.patch create mode 100644 matplotlib-linux3.patch diff --git a/matplotlib-1.0.1-plot_directive.patch b/matplotlib-1.0.1-plot_directive.patch new file mode 100644 index 0000000..8ff3481 --- /dev/null +++ b/matplotlib-1.0.1-plot_directive.patch @@ -0,0 +1,12 @@ +diff -uNr matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py +--- matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py 2011-01-23 05:42:08.000000000 +0900 ++++ matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py 2011-01-23 05:44:48.000000000 +0900 +@@ -346,7 +346,7 @@ + del options['nofigs'] + + formats = setup.config.plot_formats +- if type(formats) == str: ++ if type(formats) == str or type(formats) == unicode: + formats = eval(formats) + + fname = os.path.basename(plot_path) diff --git a/matplotlib-linux3.patch b/matplotlib-linux3.patch new file mode 100644 index 0000000..445f706 --- /dev/null +++ b/matplotlib-linux3.patch @@ -0,0 +1,43 @@ +--- doc/mpl_examples/api/font_file.py ++++ doc/mpl_examples/api/font_file.py +@@ -17,7 +17,7 @@ + + if sys.platform == 'win32': + fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf' +-elif sys.platform == 'linux2': ++elif sys.platform == 'linux2' or sys.platform == 'linux3': + fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf', + '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf', + '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf', +--- examples/api/font_file.py ++++ examples/api/font_file.py +@@ -17,7 +17,7 @@ + + if sys.platform == 'win32': + fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf' +-elif sys.platform == 'linux2': ++elif sys.platform == 'linux2' or sys.platform == 'linux3': + fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf', + '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf', + '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf', +--- lib/mpl_examples/api/font_file.py ++++ lib/mpl_examples/api/font_file.py +@@ -17,7 +17,7 @@ + + if sys.platform == 'win32': + fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf' +-elif sys.platform == 'linux2': ++elif sys.platform == 'linux2' or sys.platform == 'linux3': + fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf', + '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf', + '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf', +--- setupext.py ++++ setupext.py +@@ -53,6 +53,7 @@ + 'linux2-hppa' : ['/usr/local', '/usr'], + 'linux2-mips' : ['/usr/local', '/usr'], + 'linux2-sparc' : ['/usr/local', '/usr'], ++ 'linux3' : ['/usr/local', '/usr'], + 'linux2' : ['/usr/local', '/usr'], + 'linux' : ['/usr/local', '/usr',], + 'cygwin' : ['/usr/local', '/usr',], diff --git a/python-matplotlib.changes b/python-matplotlib.changes index 68ef2dd..d443e0d 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 15 02:00:37 CEST 2011 - ro@suse.de + +- fix build for platform == linux3 + ------------------------------------------------------------------- Mon Jan 24 12:58:1 UTC 2011 - toddrme2178@gmail.com diff --git a/python-matplotlib.spec b/python-matplotlib.spec index ddc79c6..cccac5f 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -27,7 +27,9 @@ Summary: Plotting Library for Python Url: http://sourceforge.net/projects/matplotlib Source: matplotlib-%{version}.tar.bz2 Source1: matplotlib-setup.cfg - +# This patch taken from upstream SVN and will not be needed for releases later than 1.0.1 +Patch0: matplotlib-1.0.1-plot_directive.patch +Patch1: matplotlib-linux3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fltk-devel @@ -105,6 +107,8 @@ wxWidgets backend for python-matplotlib plotting package %prep %setup -n matplotlib-%{version} +%patch0 -p1 +%patch1 chmod -x lib/matplotlib/mpl-data/images/*.svg %build