|
| 1 | +# Copyright 1999-2020 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=7 |
| 5 | + |
| 6 | +PYTHON_COMPAT=( python3_{6,7,8} ) |
| 7 | + |
| 8 | +inherit desktop distutils-r1 virtualx xdg |
| 9 | + |
| 10 | +DESCRIPTION="Qt scientific plotting package with good Postscript output" |
| 11 | +HOMEPAGE="https://veusz.github.io/" |
| 12 | +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz" |
| 13 | + |
| 14 | +SLOT="0" |
| 15 | +LICENSE="GPL-2" |
| 16 | +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
| 17 | +IUSE="dbus doc hdf5 minuit" |
| 18 | +RESTRICT="!test? ( test )" |
| 19 | + |
| 20 | +CDEPEND="dev-python/PyQt5[widgets,svg,printsupport,${PYTHON_USEDEP}] |
| 21 | + dev-python/numpy[${PYTHON_USEDEP}]" |
| 22 | +RDEPEND="${CDEPEND} |
| 23 | + dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] ) |
| 24 | + hdf5? ( dev-python/h5py[${PYTHON_USEDEP}] ) |
| 25 | + minuit? ( dev-python/iminuit[${PYTHON_USEDEP}] )" |
| 26 | +DEPEND="${CDEPEND} |
| 27 | + dev-python/setuptools[${PYTHON_USEDEP}] |
| 28 | + dev-python/sip[${PYTHON_USEDEP}] |
| 29 | + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |
| 30 | + |
| 31 | +src_prepare() { |
| 32 | + distutils-r1_src_prepare |
| 33 | + xdg_environment_reset |
| 34 | +} |
| 35 | + |
| 36 | +python_test() { |
| 37 | + distutils_install_for_testing |
| 38 | + VIRTUALX_COMMAND="${EPYTHON}" \ |
| 39 | + VEUSZ_RESOURCE_DIR="${S}" \ |
| 40 | + virtx tests/runselftest.py |
| 41 | +} |
| 42 | + |
| 43 | +python_install() { |
| 44 | + distutils-r1_python_install |
| 45 | + # symlink the license, bug #341653 |
| 46 | + rm "${D}/$(python_get_sitedir)"/${PN}/{COPYING,AUTHORS,ChangeLog} || die |
| 47 | + mkdir -p "${D}/$(python_get_sitedir)" || die |
| 48 | + cat >> "${D}/$(python_get_sitedir)"/${PN}/COPYING <<- EOF |
| 49 | + Please visit |
| 50 | +
|
| 51 | + https://www.gnu.org/licenses/gpl-2.0.html |
| 52 | +
|
| 53 | + for the full license text. |
| 54 | + EOF |
| 55 | +} |
| 56 | + |
| 57 | +python_install_all() { |
| 58 | + distutils-r1_python_install_all |
| 59 | + |
| 60 | + if use doc; then |
| 61 | + dodoc Documents/manual/pdf/${PN}.pdf |
| 62 | + docinto html |
| 63 | + dodoc -r Documents/manual/html |
| 64 | + fi |
| 65 | + |
| 66 | + doicon icons/veusz.png |
| 67 | + domenu "${FILESDIR}"/veusz.desktop |
| 68 | + insinto /usr/share/mime/packages |
| 69 | + doins "${FILESDIR}"/veusz.xml |
| 70 | +} |
0 commit comments