blob: 84bec0b201e3cfaf8b0b19f64393bb0106677885 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "matplotlib: plotting with Python"
2DESCRIPTION = "\
3Matplotlib is a Python 2D plotting library which produces \
4publication-quality figures in a variety of hardcopy formats \
5and interactive environments across platforms."
6HOMEPAGE = "https://github.com/matplotlib/matplotlib"
7SECTION = "devel/python"
8LICENSE = "PSF"
9LIC_FILES_CHKSUM = "\
10 file://setup.py;beginline=296;endline=296;md5=20e7ab4d2b2b1395a0e4ab800181eb96 \
11 file://LICENSE/LICENSE;md5=afec61498aa5f0c45936687da9a53d74 \
12"
13
14DEPENDS = "\
15 freetype \
16 libpng \
17 ${PYTHON_PN}-numpy-native \
18 ${PYTHON_PN}-pip-native \
19 ${PYTHON_PN}-dateutil-native \
20 ${PYTHON_PN}-pytz-native \
21 ${PYTHON_PN}-certifi-native \
22"
23
24SRC_URI[sha256sum] = "b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c"
25
26inherit pypi setuptools3 pkgconfig
27
28# Stop the component from attempting to download when it detects a missing
29# dependency
30SRC_URI += "file://matplotlib-disable-download.patch"
31
32# This python module requires a full copy of freetype-2.6.1
33SRC_URI += "https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz;name=freetype;subdir=matplotlib-${PV}/build"
34SRC_URI[freetype.sha256sum] = "0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014"
35
36# This python module requires a full copy of 'qhull-2020'
37SRC_URI += "http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz;name=qhull;subdir=matplotlib-${PV}/build"
38SRC_URI[qhull.sha256sum] = "b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e"
39
40# LTO with clang needs lld
41LDFLAGS:append:toolchain-clang = " -fuse-ld=lld"
42LDFLAGS:remove:toolchain-clang:mips = "-fuse-ld=lld"
43
44RDEPENDS:${PN} = "\
45 freetype \
46 libpng \
47 ${PYTHON_PN}-numpy \
48 ${PYTHON_PN}-pyparsing \
49 ${PYTHON_PN}-cycler \
50 ${PYTHON_PN}-dateutil \
51 ${PYTHON_PN}-kiwisolver \
52 ${PYTHON_PN}-pytz \
53"
54
55ENABLELTO:toolchain-clang:riscv64 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
56ENABLELTO:toolchain-clang:riscv32 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
57ENABLELTO:toolchain-clang:mips = "echo enable_lto = False >> ${S}/mplsetup.cfg"
58do_compile:prepend() {
59 echo [libs] > ${S}/mplsetup.cfg
60 echo system_freetype = True >> ${S}/mplsetup.cfg
61 ${ENABLELTO}
62}
63
64BBCLASSEXTEND = "native"