source: trunk/dports/python/py26-matplotlib/Portfile @ 50335

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

python/py26-matplotlib: enable qt4 variant

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