# -*- 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
github.setup matplotlib matplotlib 2.2.2 v
categories-append graphics math
python.versions 27 34 35 36
maintainers sean openmaintainer
description Matplotlib is a python plotting library
long_description Matplotlib strives to produce publication quality 2D \
graphics for interactive graphing, scientific publishing, \
user interface development and web application servers \
targeting multiple user interfaces and hardcopy output \
formats. There is a 'pylab' mode which emulates matlab \
graphics. The library uses numpy for handling large data \
sets and supports a variety of output backends. This port \
provides variants for the different GUIs (gtk2, tkinter, \
homepage http://matplotlib.org/
checksums rmd160 94ea2604a9473aba40a065027caf06d42e775e6e \
sha256 bf08dc0347ddcdce02dca22c20f89d760a459bcb6ba793fa002b6b8925f66c68 \
if {${name} ne ${subport}} {
depends_lib-append port:freetype \
port:py${python.version}-dateutil \
port:py${python.version}-numpy \
port:py${python.version}-parsing \
port:py${python.version}-pyobjc-cocoa \
port:py${python.version}-six \
port:py${python.version}-tornado \
port:py${python.version}-tz \
port:py${python.version}-cycler \
port:py${python.version}-kiwisolver
if {${python.version} == 27} {
depends_lib-append port:py27-functools32 \
port:py27-backports-functools_lru_cache
patchfiles-append patch-setup.cfg.diff \
build.env PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig"
reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/setup.cfg
# build fails with gcc-4.0 on Leopard, use gcc-4.2 (#37069)
compiler.blacklist gcc-4.0
if {${name} ne ${subport}} {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \
${destroot}${prefix}/share/${subport}
xinstall -m 644 -W ${worksrcpath} README.rst matplotlibrc.template \
${destroot}${prefix}/share/doc/${subport}
file copy ${worksrcpath}/examples \
${destroot}${prefix}/share/${subport}
variant webagg description "Enable WebAgg backend" {
depends_run-append port:py${python.version}-tornado
variant tkinter description "Enable tkAgg backend" {
depends_lib-append port:py${python.version}-tkinter
reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg