source: trunk/dports/python/py-matplotlib/Portfile @ 33489

Last change on this file since 33489 was 33489, checked in by ram@…, 9 years ago

python/py-matplotlib: sync with python25 version

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Portfile 33489 2008-01-27 22:02:46Z ram@macports.org $
2
3PortSystem               1.0
4PortGroup                python24 1.0
5categories-append        graphics math
6name                     py-matplotlib
7version                  0.90.1
8revision                 1
9maintainers              ram openmaintainer
10
11description              matlab-like syntax for creating plots in python
12long_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).
19homepage                 http://matplotlib.sourceforge.net
20master_sites             sourceforge:matplotlib
21distname                 matplotlib-${version}
22checksums                md5 e1344bd72660e7c9c0b7540a72cc45b8
23
24platforms                darwin
25
26depends_lib-append       port:freetype \
27                         port:libpng \
28                         port:py-dateutil \
29                         port:py-tz
30
31patchfiles               patch-setupext.py.diff
32
33build.env                MPLIB_BASE="${prefix}"
34
35
36post-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
73post-patch {
74        reinplace "s|@@DPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py
75}
76
77post-destroot {
78        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
79                ${destroot}${prefix}/share/${name}
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/${name}
87}
88
89variant cairo description "Allow to use cairo for interactive plotting" {
90        depends_lib-append      port:py-cairo
91}
92variant gtk2 conflicts tkinter wxpython description "Use GTKAgg for interactive plotting" {
93        depends_lib-append      port:py-gtk
94}
95variant tkinter conflicts gtk2 wxpython description "Use tkAgg for interactive plotting" {
96        depends_lib-append      port:py-tkinter
97}
98variant wxpython conflicts gtk2 tkinter description "Use wxAgg for interactive plotting" {
99        depends_lib-append      port:py-wxpython
100}
101variant numarray conflicts numpy Numeric description "Use numarray as array-object" {
102        depends_lib-append      port:py-numarray
103}
104variant Numeric conflicts numarray numpy description "Use Numeric as array-object" {
105        depends_lib-append      port:py-numeric
106}
107variant numpy conflicts numarray Numeric description "Use numpy as array-object" {
108        depends_lib-append      port:py-numpy
109}
110if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } {
111        default_variants        +tkinter
112}
113if { ![variant_isset numarray] && ![variant_isset Numeric] && ![variant_isset numpy] } {
114        default_variants        +numpy
115}
Note: See TracBrowser for help on using the repository browser.