You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-03-31 14:42:53 -07:00
176 lines
6.5 KiB
Tcl
176 lines
6.5 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup python 1.0
|
|
PortGroup compiler_wrapper 1.0
|
|
|
|
name py-matplotlib
|
|
version 3.10.8
|
|
revision 0
|
|
|
|
categories-append graphics math
|
|
license {PSF BSD}
|
|
maintainers {reneeotten @reneeotten} 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, gtk3, \
|
|
tkinter, qt5, cairo, latex).
|
|
|
|
homepage https://matplotlib.org/
|
|
|
|
checksums rmd160 ff72117e9da03356a69d71306e737209284fce0a \
|
|
sha256 2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3 \
|
|
size 34806269
|
|
|
|
python.versions 39 310 311 312 313 314
|
|
python.pep517_backend meson
|
|
|
|
if {${name} ne ${subport}} {
|
|
patchfiles patch-python-binary-meson.build.diff \
|
|
patch-meson-version-pyproject.toml.diff
|
|
|
|
if {${python.version} == 39} {
|
|
version 3.9.4
|
|
revision 1
|
|
checksums rmd160 334b62ae740d2853fafa4095d5d3cce1156dd8f4 \
|
|
sha256 1e00e8be7393cbdc6fedfa8a6fba02cf3e83814b285db1c60b906a023ba41bc3 \
|
|
size 36106529
|
|
|
|
depends_lib-append \
|
|
port:py${python.version}-importlib-resources
|
|
|
|
patchfiles patch-v394-python-binary-meson.build.diff \
|
|
patch-v394-pyproject.toml.diff
|
|
}
|
|
|
|
post-patch {
|
|
reinplace "s|@@PYTHONBIN@@|${python.bin}|g" \
|
|
${worksrcpath}/meson.build
|
|
}
|
|
|
|
compiler.cxx_standard 2017
|
|
|
|
depends_build-append \
|
|
port:py${python.version}-setuptools_scm \
|
|
path:bin/pkg-config:pkgconfig \
|
|
port:py${python.version}-certifi \
|
|
port:py${python.version}-pybind11 \
|
|
port:ninja
|
|
|
|
depends_lib-append \
|
|
port:freetype \
|
|
port:qhull \
|
|
port:py${python.version}-contourpy \
|
|
port:py${python.version}-cycler \
|
|
port:py${python.version}-dateutil \
|
|
port:py${python.version}-fonttools \
|
|
port:py${python.version}-kiwisolver \
|
|
port:py${python.version}-numpy \
|
|
port:py${python.version}-parsing \
|
|
port:py${python.version}-packaging \
|
|
port:py${python.version}-Pillow
|
|
|
|
build.args-append \
|
|
-Csetup-args=-Dsystem-freetype=True \
|
|
-Csetup-args=-Dsystem-qhull=True
|
|
|
|
build.env-append \
|
|
PATH=${python.prefix}/bin:$env(PATH) \
|
|
PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \
|
|
CFLAGS=${configure.cxxflags} \
|
|
CXXFLAGS=${configure.cxxflags}
|
|
|
|
destroot.env-append \
|
|
PATH=${python.prefix}/bin:$env(PATH) \
|
|
PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \
|
|
CFLAGS=${configure.cxxflags} \
|
|
CXXFLAGS=${configure.cxxflags}
|
|
|
|
# do not build the 'macosx' backend when GCC is used as a compiler and/or on OSes before 10.12
|
|
# see: https://trac.macports.org/ticket/61757
|
|
if {[string match *gcc* ${configure.compiler}] || ${os.platform} eq "darwin" && ${os.major} < 16} {
|
|
build.args-append \
|
|
-Csetup-args=-Dmacosx=False
|
|
}
|
|
|
|
# fix for missing symbols on 10.13 and below; see: https://trac.macports.org/ticket/71255
|
|
if {${os.platform} eq "darwin" && ${os.major} < 18} {
|
|
build.args-append \
|
|
-Csetup-args=-Db_lto=false
|
|
}
|
|
|
|
post-destroot {
|
|
xinstall -d ${destroot}${prefix}/share/doc/${subport} \
|
|
${destroot}${prefix}/share/${subport}
|
|
xinstall -m 0644 {*}[glob ${worksrcpath}/README.*] \
|
|
${destroot}${prefix}/share/doc/${subport}
|
|
|
|
file copy ${worksrcpath}/galleries \
|
|
${destroot}${prefix}/share/${subport}
|
|
}
|
|
|
|
variant tkinter description "Enable TkAgg backend" {
|
|
depends_lib-append port:py${python.version}-tkinter
|
|
}
|
|
|
|
variant gtk3 description "Enable GTK3Agg backend" {
|
|
depends_lib-append port:py${python.version}-gobject3 \
|
|
path:lib/pkgconfig/gtk+-3.0.pc:gtk3
|
|
}
|
|
|
|
variant qt5 description "Enable Qt5Agg backend" {
|
|
depends_lib-append port:py${python.version}-pyqt5
|
|
}
|
|
|
|
variant qt6 description "Enable Qt6Agg backend" {
|
|
depends_lib-append port:py${python.version}-pyqt6
|
|
}
|
|
|
|
variant cairo description "Enable Cairo backends" {
|
|
depends_lib-append port:py${python.version}-cairo
|
|
}
|
|
|
|
if {${python.version} < 312} {
|
|
variant pyside2 description "Enable PySide2 backend" {
|
|
depends_lib-append port:py${python.version}-pyside2
|
|
}
|
|
}
|
|
|
|
variant pyside6 description "Enable PySide6 backend" {
|
|
depends_lib-append port:py${python.version}-pyside6
|
|
}
|
|
|
|
variant dvipng description "Enable dvipng support" {
|
|
depends_run-append port:dvipng
|
|
}
|
|
|
|
variant ghostscript description "Enable GhostScript support" {
|
|
depends_run-append port:ghostscript
|
|
}
|
|
|
|
variant latex description "Enable LaTeX support" {
|
|
depends_run-append bin:latex:texlive
|
|
}
|
|
|
|
variant pdftops description "Enable pdftops support" {
|
|
depends_run-append bin:pdftops:poppler
|
|
}
|
|
|
|
if {![variant_isset tkinter] && ![variant_isset qt5] && ![variant_isset pyside2]} {
|
|
default_variants-append +cairo
|
|
}
|
|
|
|
notes "The default backend is the interactive Mac OS X backend. Different\
|
|
backends can be specified using the ~/.matplotlib/matplotlibrc file.\
|
|
More details regarding backends can be found in the matplotlib FAQ:
|
|
|
|
https://matplotlib.org/stable/users/explain/backends.html"
|
|
}
|