1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 109089 2013-08-08 00:25:09Z jeremyhu@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | github.setup matplotlib matplotlib 1.3.1 |
---|
9 | |
---|
10 | name py-matplotlib |
---|
11 | revision 0 |
---|
12 | categories-append graphics math |
---|
13 | platforms darwin |
---|
14 | license {PSF BSD} |
---|
15 | |
---|
16 | python.versions 26 27 31 32 33 |
---|
17 | |
---|
18 | maintainers sean openmaintainer |
---|
19 | |
---|
20 | description Matplotlib is a python plotting library |
---|
21 | |
---|
22 | long_description Matplotlib strives to produce publication quality 2D \ |
---|
23 | graphics for interactive graphing, scientific publishing, \ |
---|
24 | user interface development and web application servers \ |
---|
25 | targeting multiple user interfaces and hardcopy output \ |
---|
26 | formats. There is a 'pylab' mode which emulates matlab \ |
---|
27 | graphics. The library uses numpy for handling large data \ |
---|
28 | sets and supports a variety of output backends. This port \ |
---|
29 | provides variants for the different GUIs (gtk2, tkinter, \ |
---|
30 | qt4, cairo, latex). |
---|
31 | |
---|
32 | homepage http://matplotlib.org/ |
---|
33 | |
---|
34 | checksums rmd160 a3a3fa97ab8bdf33a6ef2f68884af649015ca05c \ |
---|
35 | sha256 d1a31ab238c6d4008c20c922f2541f0827abc07dbe5f43a91c992102db63fb29 |
---|
36 | |
---|
37 | if {${name} != ${subport}} { |
---|
38 | depends_build-append \ |
---|
39 | port:pkgconfig |
---|
40 | |
---|
41 | depends_lib-append port:freetype \ |
---|
42 | port:libpng \ |
---|
43 | port:py${python.version}-numpy \ |
---|
44 | port:py${python.version}-tz \ |
---|
45 | port:py${python.version}-dateutil \ |
---|
46 | port:py${python.version}-parsing \ |
---|
47 | port:py${python.version}-six \ |
---|
48 | port:py${python.version}-pyobjc-cocoa |
---|
49 | |
---|
50 | patchfiles-append patch-setup.cfg.diff \ |
---|
51 | patch-setupext.py.diff |
---|
52 | |
---|
53 | build.env PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig" |
---|
54 | |
---|
55 | post-patch { |
---|
56 | reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/setup.cfg |
---|
57 | } |
---|
58 | |
---|
59 | # build fails with gcc-4.0 on Leopard, use gcc-4.2 (#37069) |
---|
60 | compiler.blacklist gcc-4.0 |
---|
61 | |
---|
62 | post-destroot { |
---|
63 | if {${name} != ${subport}} { |
---|
64 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \ |
---|
65 | ${destroot}${prefix}/share/${subport} |
---|
66 | xinstall -m 644 -W ${worksrcpath} CHANGELOG README.rst TODO matplotlibrc.template \ |
---|
67 | ${destroot}${prefix}/share/doc/${subport} |
---|
68 | file copy ${worksrcpath}/examples \ |
---|
69 | ${destroot}${prefix}/share/${subport} |
---|
70 | } |
---|
71 | } |
---|
72 | |
---|
73 | variant webagg description "Enable WebAgg backend" { |
---|
74 | depends_run-append port:py${python.version}-tornado |
---|
75 | } |
---|
76 | |
---|
77 | variant tkinter description "Enable tkAgg backend" { |
---|
78 | depends_lib-append port:py${python.version}-tkinter |
---|
79 | post-patch { |
---|
80 | reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg |
---|
81 | } |
---|
82 | } |
---|
83 | |
---|
84 | variant gtk2 description "Enable GTKAgg backend" { |
---|
85 | depends_lib-append port:py${python.version}-pygtk |
---|
86 | post-patch { |
---|
87 | reinplace "s|^gtk=False|gtk=True|" ${worksrcpath}/setup.cfg |
---|
88 | reinplace "s|^gtkagg=False|gtkagg=True|" ${worksrcpath}/setup.cfg |
---|
89 | } |
---|
90 | } |
---|
91 | |
---|
92 | variant qt4 description "Enable QT4Agg backend" { |
---|
93 | depends_lib-append port:py${python.version}-pyqt4 |
---|
94 | post-patch { |
---|
95 | reinplace "s|^qt4agg=False|qt4agg=True|" ${worksrcpath}/setup.cfg |
---|
96 | } |
---|
97 | } |
---|
98 | |
---|
99 | variant pyside description "Enable PySide backend" { |
---|
100 | depends_lib-append port:py${python.version}-pyside |
---|
101 | patchfiles-append patch-setup.py.diff |
---|
102 | post-patch { |
---|
103 | reinplace "s|^pyside=False|pyside=True|" ${worksrcpath}/setup.cfg |
---|
104 | } |
---|
105 | } |
---|
106 | |
---|
107 | variant cairo description "Enable Cairo backends" { |
---|
108 | depends_lib-append port:py${python.version}-cairo |
---|
109 | post-patch { |
---|
110 | reinplace "s|^cairo=False|cairo=True|" ${worksrcpath}/setup.cfg |
---|
111 | } |
---|
112 | } |
---|
113 | |
---|
114 | variant dvipng description "Enable dvipng support" { |
---|
115 | depends_run-append port:dvipng |
---|
116 | } |
---|
117 | |
---|
118 | variant ghostscript description "Enable GhostScript support" { |
---|
119 | depends_run-append port:ghostscript |
---|
120 | } |
---|
121 | |
---|
122 | variant latex description "Enable LaTeX support" { |
---|
123 | depends_run-append bin:latex:texlive |
---|
124 | } |
---|
125 | |
---|
126 | variant pdftops description "Enable pdftops support" { |
---|
127 | depends_run-append bin:pdftops:poppler |
---|
128 | } |
---|
129 | |
---|
130 | if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset qt4] && ![variant_isset pyside] } { |
---|
131 | default_variants +tkinter |
---|
132 | } |
---|
133 | |
---|
134 | livecheck.type none |
---|
135 | |
---|
136 | notes " |
---|
137 | The default backend is the interactive Mac OS X backend. Different\ |
---|
138 | backends can be specified using the ~/.matplotlib/matplotlibrc file.\ |
---|
139 | More details regarding backends can be found in the matplotlib FAQ: |
---|
140 | |
---|
141 | http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend |
---|
142 | " |
---|
143 | } else { |
---|
144 | livecheck.regex archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}" |
---|
145 | } |
---|