Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05e0e0bf4c | ||
|
|
887890bd4a | ||
|
|
70576db6a2 | ||
|
|
630c235008 | ||
|
|
313dac93e1 | ||
|
|
04e2e0f563 | ||
|
|
5446c87d15 | ||
|
|
15f4723084 | ||
|
|
aacc15245c | ||
|
|
e461fe631e |
82
matplotlib-1.0.1-noagg.patch
Normal file
82
matplotlib-1.0.1-noagg.patch
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
diff -up matplotlib-1.0.1/MANIFEST.in.noagg matplotlib-1.0.1/MANIFEST.in
|
||||||
|
--- matplotlib-1.0.1/MANIFEST.in.noagg 2010-07-06 19:41:55.000000000 -0600
|
||||||
|
+++ matplotlib-1.0.1/MANIFEST.in 2011-05-20 15:45:38.337580769 -0600
|
||||||
|
@@ -18,6 +18,5 @@ recursive-include examples *
|
||||||
|
recursive-include doc *
|
||||||
|
recursive-include src *.cpp *.c *.h *.m
|
||||||
|
recursive-include CXX *.cxx *.hxx *.c *.h
|
||||||
|
-recursive-include agg24 *
|
||||||
|
recursive-include lib *
|
||||||
|
recursive-include ttconv *.cpp *.h
|
||||||
|
diff -up matplotlib-1.0.1/setupext.py.noagg matplotlib-1.0.1/setupext.py
|
||||||
|
--- matplotlib-1.0.1/setupext.py.noagg 2010-07-06 19:41:55.000000000 -0600
|
||||||
|
+++ matplotlib-1.0.1/setupext.py 2011-05-20 16:11:56.977764688 -0600
|
||||||
|
@@ -104,7 +104,6 @@ BUILT_GDK = False
|
||||||
|
BUILT_PATH = False
|
||||||
|
BUILT_TRI = False
|
||||||
|
|
||||||
|
-AGG_VERSION = 'agg24'
|
||||||
|
TCL_TK_CACHE = None
|
||||||
|
|
||||||
|
# for nonstandard installation/build with --prefix variable
|
||||||
|
@@ -551,7 +550,8 @@ def add_agg_flags(module):
|
||||||
|
# before adding the freetype flags since -z comes later
|
||||||
|
add_base_flags(module)
|
||||||
|
add_numpy_flags(module)
|
||||||
|
- module.include_dirs.extend(['src', '%s/include'%AGG_VERSION, '.'])
|
||||||
|
+ module.include_dirs.extend(['src', '/usr/include/agg2', '.'])
|
||||||
|
+ module.libraries.append('agg')
|
||||||
|
|
||||||
|
# put these later for correct link order
|
||||||
|
module.libraries.extend(std_libs)
|
||||||
|
@@ -1251,17 +1251,7 @@ def build_agg(ext_modules, packages):
|
||||||
|
global BUILT_AGG
|
||||||
|
if BUILT_AGG: return # only build it if you you haven't already
|
||||||
|
|
||||||
|
- agg = (
|
||||||
|
- 'agg_trans_affine.cpp',
|
||||||
|
- 'agg_bezier_arc.cpp',
|
||||||
|
- 'agg_curves.cpp',
|
||||||
|
- 'agg_vcgen_dash.cpp',
|
||||||
|
- 'agg_vcgen_stroke.cpp',
|
||||||
|
- 'agg_image_filters.cpp',
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
- deps = ['%s/src/%s'%(AGG_VERSION, name) for name in agg]
|
||||||
|
- deps.extend(['src/mplutils.cpp', 'src/agg_py_transforms.cpp'])
|
||||||
|
+ deps = ['src/mplutils.cpp', 'src/agg_py_transforms.cpp']
|
||||||
|
deps.extend(glob.glob('CXX/*.cxx'))
|
||||||
|
deps.extend(glob.glob('CXX/*.c'))
|
||||||
|
temp_copy('src/_backend_agg.cpp', 'src/backend_agg.cpp')
|
||||||
|
@@ -1284,15 +1274,7 @@ def build_path(ext_modules, packages):
|
||||||
|
global BUILT_PATH
|
||||||
|
if BUILT_PATH: return # only build it if you you haven't already
|
||||||
|
|
||||||
|
- agg = (
|
||||||
|
- 'agg_curves.cpp',
|
||||||
|
- 'agg_bezier_arc.cpp',
|
||||||
|
- 'agg_trans_affine.cpp',
|
||||||
|
- 'agg_vcgen_stroke.cpp',
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
- deps = ['%s/src/%s'%(AGG_VERSION, name) for name in agg]
|
||||||
|
- deps.extend(glob.glob('CXX/*.cxx'))
|
||||||
|
+ deps = glob.glob('CXX/*.cxx')
|
||||||
|
deps.extend(glob.glob('CXX/*.c'))
|
||||||
|
|
||||||
|
temp_copy('src/_path.cpp', 'src/path.cpp')
|
||||||
|
@@ -1317,14 +1299,8 @@ def build_image(ext_modules, packages):
|
||||||
|
global BUILT_IMAGE
|
||||||
|
if BUILT_IMAGE: return # only build it if you you haven't already
|
||||||
|
|
||||||
|
- agg = ('agg_trans_affine.cpp',
|
||||||
|
- 'agg_image_filters.cpp',
|
||||||
|
- 'agg_bezier_arc.cpp',
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
temp_copy('src/_image.cpp', 'src/image.cpp')
|
||||||
|
deps = ['src/image.cpp', 'src/mplutils.cpp']
|
||||||
|
- deps.extend(['%s/src/%s'%(AGG_VERSION,name) for name in agg])
|
||||||
|
deps.extend(glob.glob('CXX/*.cxx'))
|
||||||
|
deps.extend(glob.glob('CXX/*.c'))
|
||||||
|
|
||||||
12
matplotlib-1.0.1-tkinter.patch
Normal file
12
matplotlib-1.0.1-tkinter.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff -up matplotlib-1.0.1/setupext.py.tkinter matplotlib-1.0.1/setupext.py
|
||||||
|
--- matplotlib-1.0.1/setupext.py.tkinter 2011-10-31 14:58:44.000000000 +0100
|
||||||
|
+++ matplotlib-1.0.1/setupext.py 2011-10-31 14:59:14.000000000 +0100
|
||||||
|
@@ -829,7 +829,7 @@ def check_for_tk():
|
||||||
|
|
||||||
|
if gotit:
|
||||||
|
print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" %
|
||||||
|
- (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))
|
||||||
|
+ (Tkinter.__version__, Tkinter.TkVersion, Tkinter.TclVersion))
|
||||||
|
else:
|
||||||
|
print_status("Tkinter", "no")
|
||||||
|
if explanation is not None:
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
Name: python-matplotlib
|
Name: python-matplotlib
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 12%{?dist}
|
Release: 19%{?dist}
|
||||||
Summary: Python plotting library
|
Summary: Python plotting library
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@@ -36,14 +36,28 @@ Source1: http://downloads.sourceforge.net/matplotlib/mpl_sampledata-%{ver
|
|||||||
Source2: setup.cfg
|
Source2: setup.cfg
|
||||||
# This patch taken from upstream SVN and will not be needed for releases later than 1.0.1
|
# 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
|
Patch0: matplotlib-1.0.1-plot_directive.patch
|
||||||
patch1: 0001-Bugfix-propagate-timezone-info-in-plot_date-xaxis_da.patch
|
Patch1: matplotlib-1.0.1-noagg.patch
|
||||||
|
Patch2: 0001-Bugfix-propagate-timezone-info-in-plot_date-xaxis_da.patch
|
||||||
|
# fix build when Tkinter doesn't return an expected value in __version__ (FTBFS)
|
||||||
|
Patch3: matplotlib-1.0.1-tkinter.patch
|
||||||
|
|
||||||
|
# Fix building against libpng 1.5
|
||||||
|
# https://github.com/matplotlib/matplotlib/issues/234
|
||||||
|
# Based on:
|
||||||
|
# https://github.com/matplotlib/matplotlib/commit/45c46672648e3b4a277bf7ff42b3baf56a98bcec
|
||||||
|
Patch4: use-png-accessor-functions.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: python-devel, freetype-devel, libpng-devel, zlib-devel
|
BuildRequires: python-devel, freetype-devel, libpng-devel, zlib-devel
|
||||||
BuildRequires: pygtk2-devel, gtk2-devel
|
BuildRequires: pygtk2-devel, gtk2-devel
|
||||||
BuildRequires: pytz, python-dateutil, numpy
|
BuildRequires: pytz, python-dateutil, numpy
|
||||||
|
BuildRequires: agg-devel
|
||||||
|
BuildRequires: pyparsing
|
||||||
Requires: numpy, pytz, python-dateutil
|
Requires: numpy, pytz, python-dateutil
|
||||||
Requires: pycairo >= 1.2.0
|
Requires: pycairo >= 1.2.0
|
||||||
Requires: dejavu-sans-fonts
|
Requires: dejavu-sans-fonts
|
||||||
|
Requires: dvipng
|
||||||
|
Requires: pyparsing
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Matplotlib is a pure python plotting library with the goal of making
|
Matplotlib is a pure python plotting library with the goal of making
|
||||||
@@ -97,9 +111,17 @@ BuildRequires: python-basemap
|
|||||||
%else
|
%else
|
||||||
%setup -q -n matplotlib-%{version}
|
%setup -q -n matplotlib-%{version}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1 -b .tkinter
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
|
# Remove bundled libraries
|
||||||
|
rm -r agg24 lib/matplotlib//pyparsing.py
|
||||||
|
|
||||||
|
# Remove references to bundled libraries
|
||||||
|
%patch1 -p1 -b .noagg
|
||||||
|
sed -i -e s/matplotlib\.pyparsing/pyparsing/g lib/matplotlib/*.py
|
||||||
|
|
||||||
chmod -x lib/matplotlib/mpl-data/images/*.svg
|
chmod -x lib/matplotlib/mpl-data/images/*.svg
|
||||||
|
|
||||||
@@ -150,7 +172,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc license/LICENSE_PAINT license/LICENSE_PIL
|
%doc license/LICENSE_PAINT license/LICENSE_PIL
|
||||||
%doc CHANGELOG CXX INSTALL INTERACTIVE KNOWN_BUGS
|
%doc CHANGELOG CXX INSTALL INTERACTIVE KNOWN_BUGS
|
||||||
%doc PKG-INFO TODO
|
%doc PKG-INFO TODO
|
||||||
%if 0%{?fedora} >= 9
|
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
||||||
%{python_sitearch}/*egg-info
|
%{python_sitearch}/*egg-info
|
||||||
%endif
|
%endif
|
||||||
%{python_sitearch}/matplotlib/
|
%{python_sitearch}/matplotlib/
|
||||||
@@ -181,8 +203,31 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Sep 15 2011 Jef Spaleta <jspaleta@fedoraproject.org> - 1.0.1-12
|
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-19
|
||||||
- Apply upstream patch for timezone in plotting (bug 735677)
|
- Rebuilt for c++ ABI breakage
|
||||||
|
|
||||||
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Dec 6 2011 David Malcolm <dmalcolm@redhat.com> - 1.0.1-17
|
||||||
|
- fix the build against libpng 1.5
|
||||||
|
|
||||||
|
* Tue Dec 6 2011 David Malcolm <dmalcolm@redhat.com> - 1.0.1-16
|
||||||
|
- fix egg-info conditional for RHEL
|
||||||
|
|
||||||
|
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.0.1-15
|
||||||
|
- Rebuild for new libpng
|
||||||
|
|
||||||
|
* Mon Oct 31 2011 Dan Horák <dan[at]danny.cz> - 1.0.1-14
|
||||||
|
- fix build with new Tkinter which doesn't return an expected value in __version__
|
||||||
|
|
||||||
|
* Thu Sep 15 2011 Jef Spaleta <jspaleta@fedoraproject.org> - 1.0.1-13
|
||||||
|
- apply upstream bugfix for timezone formatting (Bug 735677)
|
||||||
|
|
||||||
|
* Fri May 20 2011 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-12
|
||||||
|
- Add Requires dvipng (Bug 684836)
|
||||||
|
- Build against system agg (Bug 612807)
|
||||||
|
- Use system pyparsing (Bug 702160)
|
||||||
|
|
||||||
* Sat Feb 26 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-11
|
* Sat Feb 26 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-11
|
||||||
- Set PYTHONPATH during html doc building using find to prevent broken builds
|
- Set PYTHONPATH during html doc building using find to prevent broken builds
|
||||||
|
|||||||
79
use-png-accessor-functions.patch
Normal file
79
use-png-accessor-functions.patch
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
diff -up matplotlib-1.0.1/CHANGELOG.png15 matplotlib-1.0.1/CHANGELOG
|
||||||
|
diff -up matplotlib-1.0.1/doc/users/installing.rst.png15 matplotlib-1.0.1/doc/users/installing.rst
|
||||||
|
--- matplotlib-1.0.1/doc/users/installing.rst.png15 2010-07-06 21:41:46.000000000 -0400
|
||||||
|
+++ matplotlib-1.0.1/doc/users/installing.rst 2011-12-06 16:29:05.824621532 -0500
|
||||||
|
@@ -138,7 +138,7 @@ libraries themselves.
|
||||||
|
array support for python (`download
|
||||||
|
<http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103>`__)
|
||||||
|
|
||||||
|
-libpng 1.1 (or later)
|
||||||
|
+libpng 1.2 (or later)
|
||||||
|
library for loading and saving :term:`PNG` files (`download
|
||||||
|
<http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
|
||||||
|
zlib. If you are a windows user, you can ignore this since we
|
||||||
|
diff -up matplotlib-1.0.1/src/_png.cpp.png15 matplotlib-1.0.1/src/_png.cpp
|
||||||
|
--- matplotlib-1.0.1/src/_png.cpp.png15 2010-10-12 12:14:42.000000000 -0400
|
||||||
|
+++ matplotlib-1.0.1/src/_png.cpp 2011-12-06 16:29:05.825621532 -0500
|
||||||
|
@@ -350,10 +350,10 @@ _png_module::read_png(const Py::Tuple& a
|
||||||
|
png_set_sig_bytes(png_ptr, 8);
|
||||||
|
png_read_info(png_ptr, info_ptr);
|
||||||
|
|
||||||
|
- png_uint_32 width = info_ptr->width;
|
||||||
|
- png_uint_32 height = info_ptr->height;
|
||||||
|
+ png_uint_32 width = png_get_image_width(png_ptr, info_ptr);
|
||||||
|
+ png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
|
||||||
|
|
||||||
|
- int bit_depth = info_ptr->bit_depth;
|
||||||
|
+ int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
|
||||||
|
|
||||||
|
// Unpack 1, 2, and 4-bit images
|
||||||
|
if (bit_depth < 8)
|
||||||
|
@@ -361,7 +361,7 @@ _png_module::read_png(const Py::Tuple& a
|
||||||
|
|
||||||
|
// If sig bits are set, shift data
|
||||||
|
png_color_8p sig_bit;
|
||||||
|
- if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) &&
|
||||||
|
+ if ((png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_PALETTE) &&
|
||||||
|
png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
||||||
|
{
|
||||||
|
png_set_shift(png_ptr, sig_bit);
|
||||||
|
@@ -374,13 +374,13 @@ _png_module::read_png(const Py::Tuple& a
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert palletes to full RGB
|
||||||
|
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
{
|
||||||
|
png_set_palette_to_rgb(png_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there's an alpha channel convert gray to RGB
|
||||||
|
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
|
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
|
{
|
||||||
|
png_set_gray_to_rgb(png_ptr);
|
||||||
|
}
|
||||||
|
@@ -408,11 +408,11 @@ _png_module::read_png(const Py::Tuple& a
|
||||||
|
npy_intp dimensions[3];
|
||||||
|
dimensions[0] = height; //numrows
|
||||||
|
dimensions[1] = width; //numcols
|
||||||
|
- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
|
||||||
|
+ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
|
||||||
|
{
|
||||||
|
dimensions[2] = 4; //RGBA images
|
||||||
|
}
|
||||||
|
- else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
|
||||||
|
+ else if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_COLOR)
|
||||||
|
{
|
||||||
|
dimensions[2] = 3; //RGB images
|
||||||
|
}
|
||||||
|
@@ -421,7 +421,8 @@ _png_module::read_png(const Py::Tuple& a
|
||||||
|
dimensions[2] = 1; //Greyscale images
|
||||||
|
}
|
||||||
|
//For gray, return an x by y array, not an x by y by 1
|
||||||
|
- int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
|
||||||
|
+ int num_dims = (png_get_color_type(png_ptr, info_ptr)
|
||||||
|
+ & PNG_COLOR_MASK_COLOR) ? 3 : 2;
|
||||||
|
|
||||||
|
double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
|
||||||
|
PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(
|
||||||
Reference in New Issue
Block a user