1 | # $Id: Portfile 45788 2009-01-22 04:19:55Z ram@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python26 1.0 |
---|
5 | |
---|
6 | categories-append graphics math |
---|
7 | name py26-matplotlib |
---|
8 | version 0.98.5.2 |
---|
9 | revision 1 |
---|
10 | maintainers ram openmaintainer |
---|
11 | platforms darwin |
---|
12 | |
---|
13 | description matlab-like syntax for creating plots in python |
---|
14 | long_description Matplotlib is a pure python plotting library with the \ |
---|
15 | goal of making publication quality plots using a syntax \ |
---|
16 | familiar to matlab users. The library uses numpy for \ |
---|
17 | handling large data sets and supports a variety of \ |
---|
18 | output backends. This port provides variants for the \ |
---|
19 | different GUIs (gtk2, tkinter, wxpython). |
---|
20 | |
---|
21 | homepage http://matplotlib.sourceforge.net |
---|
22 | master_sites sourceforge:matplotlib |
---|
23 | distname matplotlib-${version} |
---|
24 | |
---|
25 | checksums md5 3e8210ec8bb71a18962ec8b43688509c \ |
---|
26 | sha1 fbce043555de4f5a34e2a47e200527720a90b370 \ |
---|
27 | rmd160 12c64fce5758259f10e31aa1c8e3b47152bda09f |
---|
28 | |
---|
29 | depends_lib-append port:freetype \ |
---|
30 | port:libpng \ |
---|
31 | port:py26-dateutil \ |
---|
32 | port:py26-tz \ |
---|
33 | port:py26-numpy \ |
---|
34 | port:py26-configobj \ |
---|
35 | port:py26-pyobjc2-cocoa |
---|
36 | |
---|
37 | patchfiles patch-setupext.py.diff \ |
---|
38 | patch-setup.cfg.diff \ |
---|
39 | patch-disable_optional_deps.diff \ |
---|
40 | patch-backend_cocoaagg.py.diff |
---|
41 | |
---|
42 | build.env MPLIB_BASE="${prefix}" |
---|
43 | |
---|
44 | post-patch { |
---|
45 | reinplace "s|@@MPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py |
---|
46 | } |
---|
47 | |
---|
48 | post-destroot { |
---|
49 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \ |
---|
50 | ${destroot}${prefix}/share/${name} |
---|
51 | xinstall -m 644 -W ${worksrcpath} CHANGELOG INSTALL \ |
---|
52 | INTERACTIVE KNOWN_BUGS README.txt TODO \ |
---|
53 | ${destroot}${prefix}/share/doc/${name} |
---|
54 | file copy ${worksrcpath}/license \ |
---|
55 | ${destroot}${prefix}/share/doc/${name} |
---|
56 | file copy ${worksrcpath}/examples \ |
---|
57 | ${destroot}${prefix}/share/${name} |
---|
58 | } |
---|
59 | |
---|
60 | post-activate { |
---|
61 | ui_msg "\nThe default backend is now the non-interactive Agg backend, different |
---|
62 | backends can be specified using the ~/.matplotlib/matplotlibrc file. |
---|
63 | More details, regarding backends, can be found in the matplotlib FAQ: |
---|
64 | \nhttp://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend\n" |
---|
65 | } |
---|
66 | |
---|
67 | variant cairo description "Enable Cairo backends" { |
---|
68 | depends_lib-append port:py26-cairo |
---|
69 | post-patch { |
---|
70 | reinplace "s|MP_Cairo=False|MP_Cairo=True|" ${worksrcpath}/setupext.py |
---|
71 | } |
---|
72 | } |
---|
73 | |
---|
74 | variant gtk2 description "Enable GTKAgg backend" { |
---|
75 | depends_lib-append port:py26-gtk |
---|
76 | post-patch { |
---|
77 | reinplace "s|^gtk=False|gtk=True|" ${worksrcpath}/setup.cfg |
---|
78 | reinplace "s|^gtkagg=False|gtkagg=True|" ${worksrcpath}/setup.cfg |
---|
79 | } |
---|
80 | } |
---|
81 | |
---|
82 | variant tkinter description "Enable tkAgg backend" { |
---|
83 | depends_lib-append port:py26-tkinter |
---|
84 | post-patch { |
---|
85 | reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg |
---|
86 | } |
---|
87 | } |
---|
88 | |
---|
89 | variant wxpython description "Enable wxAgg backend" { |
---|
90 | depends_lib-append port:py26-wxpython |
---|
91 | post-patch { |
---|
92 | reinplace "s|^wxagg=False|wxagg=True|" ${worksrcpath}/setup.cfg |
---|
93 | } |
---|
94 | } |
---|
95 | |
---|
96 | variant latex description "Enable LaTeX support" { |
---|
97 | depends_lib-append port:texlive |
---|
98 | post-patch { |
---|
99 | reinplace "s|MP_LaTeX=False|MP_LaTeX=True|" ${worksrcpath}/setupext.py |
---|
100 | } |
---|
101 | } |
---|
102 | |
---|
103 | variant ghostscript description "Enable GhostScript support" { |
---|
104 | depends_lib-append port:ghostscript |
---|
105 | post-patch { |
---|
106 | reinplace "s|MP_GhostScript=False|MP_GhostScript=True|" ${worksrcpath}/setupext.py |
---|
107 | } |
---|
108 | } |
---|
109 | |
---|
110 | if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } { |
---|
111 | default_variants +tkinter |
---|
112 | } |
---|
113 | |
---|
114 | livecheck.check regex |
---|
115 | livecheck.url ${homepage} |
---|
116 | livecheck.regex {Current version: <b>(\d+(?:\.\d+)*)</b>} |
---|