1 | # $Id: Portfile 25887 2007-06-04 19:16:42Z jochen@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python25 1.0 |
---|
5 | categories-append graphics math |
---|
6 | name py25-matplotlib |
---|
7 | version 0.90.1 |
---|
8 | revision 0 |
---|
9 | maintainers openmaintainer@macports.org jochen@macports.org |
---|
10 | |
---|
11 | description matlab-like syntax for creating plots in python |
---|
12 | long_description Matplotlib is a pure python plotting library with the goal of making \ |
---|
13 | publication quality plots using a syntax familiar to matlab users. \ |
---|
14 | The library uses numarray, Numeric, or numpy for handling large \ |
---|
15 | data sets and supports a variety of output backends. \ |
---|
16 | This port provides variants for the different \ |
---|
17 | array-objects (numarray, Numeric, numpy) and \ |
---|
18 | for different GUIs (gtk2, tkinter, wxpython). |
---|
19 | homepage http://matplotlib.sourceforge.net |
---|
20 | master_sites sourceforge:matplotlib |
---|
21 | distname matplotlib-${version} |
---|
22 | checksums md5 e1344bd72660e7c9c0b7540a72cc45b8 |
---|
23 | |
---|
24 | platforms darwin |
---|
25 | |
---|
26 | depends_lib-append port:freetype \ |
---|
27 | port:libpng \ |
---|
28 | port:py25-dateutil \ |
---|
29 | port:py25-tz |
---|
30 | |
---|
31 | patchfiles patch-setupext.py.diff |
---|
32 | |
---|
33 | build.env MPLIB_BASE="${prefix}" |
---|
34 | |
---|
35 | |
---|
36 | post-extract { |
---|
37 | if {[variant_isset gtk2]} { |
---|
38 | reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \ |
---|
39 | ${worksrcpath}/setup.py |
---|
40 | reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=1|" \ |
---|
41 | ${worksrcpath}/setup.py |
---|
42 | } else { |
---|
43 | reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=0|" \ |
---|
44 | ${worksrcpath}/setup.py |
---|
45 | reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=0|" \ |
---|
46 | ${worksrcpath}/setup.py |
---|
47 | } |
---|
48 | if {[variant_isset tkinter]} { |
---|
49 | reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \ |
---|
50 | ${worksrcpath}/setup.py |
---|
51 | } else { |
---|
52 | reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \ |
---|
53 | ${worksrcpath}/setup.py |
---|
54 | } |
---|
55 | if {[variant_isset wxpython]} { |
---|
56 | reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=1|" \ |
---|
57 | ${worksrcpath}/setup.py |
---|
58 | } else { |
---|
59 | reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=0|" \ |
---|
60 | ${worksrcpath}/setup.py |
---|
61 | } |
---|
62 | if {[variant_isset numarray]} { |
---|
63 | reinplace "s|NUMERIX.-1.|'numarray'|" ${worksrcpath}/setup.py |
---|
64 | } |
---|
65 | if {[variant_isset numeric]} { |
---|
66 | reinplace "s|NUMERIX.-1.|'numeric'|" ${worksrcpath}/setup.py |
---|
67 | } |
---|
68 | if {[variant_isset numpy]} { |
---|
69 | reinplace "s|NUMERIX.-1.|'numpy'|" ${worksrcpath}/setup.py |
---|
70 | } |
---|
71 | } |
---|
72 | |
---|
73 | post-patch { |
---|
74 | reinplace "s|@@DPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py |
---|
75 | } |
---|
76 | |
---|
77 | post-destroot { |
---|
78 | xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name} \ |
---|
79 | ${destroot}/${prefix}/share/matplotlib |
---|
80 | xinstall -m 644 -W ${worksrcpath} API_CHANGES CHANGELOG INSTALL \ |
---|
81 | INTERACTIVE KNOWN_BUGS README TODO \ |
---|
82 | ${destroot}/${prefix}/share/doc/${name} |
---|
83 | file copy ${worksrcpath}/license \ |
---|
84 | ${destroot}/${prefix}/share/doc/${name} |
---|
85 | file copy ${worksrcpath}/examples \ |
---|
86 | ${destroot}/${prefix}/share/matplotlib |
---|
87 | } |
---|
88 | |
---|
89 | variant gtk2 conflicts tkinter wxpython description "Use gtkAgg for interactive plotting" { |
---|
90 | depends_lib-append port:py25-gtk |
---|
91 | } |
---|
92 | variant tkinter conflicts gtk2 wxpython description "Use tkAgg for interactive plotting" { |
---|
93 | depends_lib-append port:py25-tkinter |
---|
94 | } |
---|
95 | variant wxpython conflicts gtk2 tkinter description "Use wxAgg for interactive plotting" { |
---|
96 | depends_lib-append port:py25-wxpython |
---|
97 | } |
---|
98 | if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } { |
---|
99 | default_variants +tkinter |
---|
100 | } |
---|
101 | variant Numeric conflicts numpy description "Use Numeric as array-object" { |
---|
102 | depends_lib-append port:py25-numeric |
---|
103 | } |
---|
104 | variant numpy conflicts Numeric description "Use numpy as array-object" { |
---|
105 | depends_lib-append port:py25-numpy |
---|
106 | } |
---|
107 | if { ![variant_isset Numeric] && ![variant_isset numpy] } { |
---|
108 | default_variants +numpy |
---|
109 | } |
---|
110 | |
---|