veusz-1.25.1.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 python3_{4,5} )
  5. inherit eutils fdo-mime distutils-r1 virtualx
  6. DESCRIPTION="Qt scientific plotting package with good Postscript output"
  7. HOMEPAGE="http://home.gna.org/veusz/"
  8. SRC_URI="http://download.gna.org/${PN}/${P}.tar.gz"
  9. SLOT="0"
  10. LICENSE="GPL-2"
  11. KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
  12. IUSE="dbus doc emf fits hdf5 minuit vo"
  13. CDEPEND="
  14. dev-python/numpy[${PYTHON_USEDEP}]
  15. >=dev-python/PyQt4-4.11.4[compat,X,svg,${PYTHON_USEDEP}]"
  16. RDEPEND="${CDEPEND}
  17. dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
  18. emf? ( dev-python/pyemf[$(python_gen_usedep 'python2*')] )
  19. fits? ( dev-python/astropy[${PYTHON_USEDEP}] )
  20. hdf5? ( dev-python/h5py[${PYTHON_USEDEP}] )
  21. minuit? ( dev-python/pyminuit[${PYTHON_USEDEP}] )
  22. vo? (
  23. dev-python/astropy[${PYTHON_USEDEP}]
  24. dev-python/sampy[$(python_gen_usedep 'python2*')]
  25. )"
  26. DEPEND="${CDEPEND}
  27. dev-python/setuptools[${PYTHON_USEDEP}]
  28. dev-python/sip[${PYTHON_USEDEP}]
  29. "
  30. python_test() {
  31. distutils_install_for_testing
  32. cd tests || die
  33. VIRTUALX_COMMAND="${EPYTHON}" \
  34. VEUSZ_RESOURCE_DIR="${S}" \
  35. virtualmake runselftest.py
  36. }
  37. python_install() {
  38. distutils-r1_python_install
  39. # symlink the license, bug #341653
  40. rm "${D}/$(python_get_sitedir)"/${PN}/{COPYING,AUTHORS,ChangeLog} || die
  41. mkdir -p "${D}/$(python_get_sitedir)" || die
  42. cat >> "${D}/$(python_get_sitedir)"/${PN}/COPYING <<- EOF
  43. Please visit
  44. https://www.gnu.org/licenses/gpl-2.0.html
  45. for the full license text.
  46. EOF
  47. }
  48. python_install_all() {
  49. distutils-r1_python_install_all
  50. use doc && dodoc Documents/manual.pdf && \
  51. dohtml -r Documents/{manimages,manual.html}
  52. doicon icons/veusz.png
  53. domenu "${FILESDIR}"/veusz.desktop
  54. insinto /usr/share/mime/packages
  55. doins "${FILESDIR}"/veusz.xml
  56. }
  57. pkg_postinst() {
  58. fdo-mime_desktop_database_update
  59. }
  60. pkg_postrm() {
  61. fdo-mime_desktop_database_update
  62. }