pyzy-0.1.0-r2.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils python-any-r1 autotools
  6. PY_DATABASE=${PN}-database-1.0.0
  7. DESCRIPTION="The Chinese PinYin and Bopomofo conversion library"
  8. HOMEPAGE="https://github.com/pyzy/pyzy"
  9. SRC_URI="https://pyzy.googlecode.com/files/${P}.tar.gz
  10. https://pyzy.googlecode.com/files/${PY_DATABASE}.tar.bz2"
  11. LICENSE="LGPL-2.1"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86"
  14. IUSE="boost doc opencc test"
  15. RDEPEND="dev-libs/glib:2
  16. dev-db/sqlite:3
  17. sys-apps/util-linux
  18. boost? ( dev-libs/boost )
  19. opencc? ( app-i18n/opencc )"
  20. DEPEND="${RDEPEND}
  21. ${PYTHON_DEPS}
  22. doc? ( app-doc/doxygen )"
  23. # Currently it fails to build test code
  24. RESTRICT="test"
  25. src_prepare() {
  26. epatch "${FILESDIR}"/${PN}-dont-download-dictionary-file.patch
  27. epatch "${FILESDIR}"/${PN}-support-opencc-1.0.0.patch
  28. mv ../db ./data/db/open-phrase/ || die
  29. eautoreconf
  30. }
  31. src_configure() {
  32. econf \
  33. --enable-db-open-phrase \
  34. --enable-db-android \
  35. $(use_enable boost) \
  36. $(use_enable opencc) \
  37. $(use_enable test tests)
  38. }
  39. src_install() {
  40. default
  41. use doc && dohtml -r docs/html/*
  42. }