void-packages/srcpkgs/python3-matplotlib/template
2019-08-25 10:27:09 +02:00

45 lines
1.6 KiB
Bash

# Template file for 'python3-matplotlib'
pkgname=python3-matplotlib
version=3.1.1
revision=1
wrksrc="matplotlib-${version}"
build_style=python3-module
pycompile_module="matplotlib mpl_toolkits pylab.py"
hostmakedepends="pkg-config python3-setuptools"
# XXX use internal copy of agg, highly patched
makedepends="python3-numpy python3-devel freetype-devel libpng-devel libqhull-devel"
depends="python3-matplotlib-data>=${version}_${revision} python3-numpy
python3-dateutil python3-parsing python3-cycler python3-kiwisolver"
short_desc="Python3 2D/3D plotting library"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="custom:matplotlib, BSD-3-Clause, MIT"
homepage="https://matplotlib.org/"
distfiles="https://github.com/matplotlib/matplotlib/archive/v${version}.tar.gz"
checksum=29d1a239bb7d1095d98d8831bb661519ab0d23e30d38ed47729f554f15e8cd3e
pre_build() {
# adjust qhull path
sed -i "s|'libqhull',|'qhull',|" setupext.py
# adjust conf file path
sed -i 's,\(site-packages/matplotlib/mpl-data\),/etc,' matplotlibrc.template
}
post_install() {
vlicense LICENSE/LICENSE
# remove data files
rm -rf ${DESTDIR}/usr/lib/python3*/site-packages/matplotlib/mpl-data
}
python3-matplotlib-data_package() {
archs=noarch
short_desc+=" - data files"
conf_files="/etc/matplotlibrc"
replaces="python-matplotlib-data<3.0.0"
pkg_install() {
vmkdir usr/share/matplotlib
vcopy lib/matplotlib/mpl-data usr/share/matplotlib
vsconf matplotlibrc.template
vconf ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc
rm -f ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc
}
}