logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

anki-2.1.8.ebuild (1521B)


  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Copyright 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  3. # Distributed under the terms of the GNU General Public License v2
  4. EAPI=6
  5. PYTHON_COMPAT=( python3_6 )
  6. PYTHON_REQ_USE="sqlite"
  7. inherit eutils python-single-r1 xdg
  8. DESCRIPTION="A spaced-repetition memory training program (flash cards)"
  9. HOMEPAGE="https://apps.ankiweb.net"
  10. SRC_URI="https://apps.ankiweb.net/downloads/current/${P}-source.tgz"
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE="latex +recording +sound test"
  15. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  16. RDEPEND="${PYTHON_DEPS}
  17. dev-python/PyQt5[gui,svg,webengine,widgets,${PYTHON_USEDEP}]
  18. dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
  19. dev-python/decorator[${PYTHON_USEDEP}]
  20. dev-python/send2trash[${PYTHON_USEDEP}]
  21. dev-python/requests[${PYTHON_USEDEP}]
  22. dev-python/markdown[${PYTHON_USEDEP}]
  23. recording? (
  24. media-sound/lame
  25. >=dev-python/pyaudio-0.2.4[${PYTHON_USEDEP}]
  26. )
  27. sound? ( media-video/mpv )
  28. latex? (
  29. app-text/texlive
  30. app-text/dvipng
  31. )
  32. "
  33. DEPEND="${RDEPEND}
  34. test? ( dev-python/nose[${PYTHON_USEDEP}] )
  35. "
  36. PATCHES=( "${FILESDIR}"/${PN}-2.1.0_beta25-web-folder.patch )
  37. pkg_setup() {
  38. python-single-r1_pkg_setup
  39. }
  40. src_prepare() {
  41. default
  42. sed -i "s/updates=True/updates=False/" aqt/profiles.py || die
  43. sed -i "s;share/doc/anki;share/doc/${P};" Makefile || die
  44. }
  45. src_compile() {
  46. ./tools/build_ui.sh || die
  47. }
  48. src_test() {
  49. sed "s:nosetests:${EPYTHON} ${EROOT}usr/bin/nosetests:" -i tools/tests.sh || die
  50. ./tools/tests.sh || die
  51. }