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