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

Last change on this file since 31210 was 31210, checked in by jochen@…, 13 years ago

Fix #13084 using patch by ram@….

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1# $Id: Portfile 31210 2007-11-18 11:17:45Z jochen@macports.org $
2
3PortSystem               1.0
4PortGroup                python24 1.0
5categories-append        graphics math
6name                     py-matplotlib
7version                  0.90.1
8revision                 0
9maintainers              openmaintainer jochen
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 port:py-tz
29
30patchfiles               patch-setupext.py.diff
31
32build.env                MPLIB_BASE="${prefix}"
33
34
35post-extract {
36        if {[variant_isset gtk2]} {
37                reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \
38                  ${worksrcpath}/setup.py
39                reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=1|" \
40                  ${worksrcpath}/setup.py
41        } else {
42                reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=0|" \
43                  ${worksrcpath}/setup.py
44                reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=0|" \
45                  ${worksrcpath}/setup.py
46        }
47        if {[variant_isset tkinter]} {
48                reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \
49                        ${worksrcpath}/setup.py
50        } else {
51                reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \
52                        ${worksrcpath}/setup.py
53        }
54        if {[variant_isset wxpython]} {
55                reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=1|" \
56                  ${worksrcpath}/setup.py
57        } else {
58                reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=0|" \
59                  ${worksrcpath}/setup.py
60        }
61        if {[variant_isset numarray]} {
62                reinplace "s|NUMERIX.-1.|'numarray'|" ${worksrcpath}/setup.py
63        }
64        if {[variant_isset numeric]} {
65                reinplace "s|NUMERIX.-1.|'numeric'|" ${worksrcpath}/setup.py
66        }
67        if {[variant_isset numpy]} {
68                reinplace "s|NUMERIX.-1.|'numpy'|" ${worksrcpath}/setup.py
69        }
70}
71
72post-patch {
73        reinplace "s|@@DPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py
74}
75
76post-destroot {
77        xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name} \
78                ${destroot}/${prefix}/share/${name}
79        xinstall -m 644 -W ${worksrcpath} API_CHANGES CHANGELOG INSTALL \
80                INTERACTIVE KNOWN_BUGS README TODO \
81                ${destroot}/${prefix}/share/doc/${name}
82        file copy ${worksrcpath}/license \
83                ${destroot}/${prefix}/share/doc/${name}
84        file copy ${worksrcpath}/examples \
85                ${destroot}/${prefix}/share/${name}
86}
87
88variant gtk2 conflicts tkinter wxpython description "Use gtkAgg for interactive plotting" {
89        depends_lib-append      port:py-gtk2
90}
91variant tkinter conflicts gtk2 wxpython description "Use tkAgg for interactive plotting" {
92        depends_lib-append      port:py-tkinter
93}
94variant wxpython conflicts gtk2 tkinter description "Use wxAgg for interactive plotting" {
95        depends_lib-append      port:py-wxpython
96}
97variant numarray conflicts numpy Numeric description "Use numarray as array-object" {
98        depends_lib-append      port:py-numarray
99}
100variant Numeric conflicts numarray numpy description "Use Numeric as array-object" {
101        depends_lib-append      port:py-numeric
102}
103variant numpy conflicts numarray Numeric description "Use numpy as array-object" {
104        depends_lib-append      port:py-numpy
105}
106if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } {
107        default_variants        +tkinter
108}
109if { ![variant_isset numarray] && ![variant_isset Numeric] && ![variant_isset numpy] } {
110        default_variants        +numpy
111}
Note: See TracBrowser for help on using the repository browser.