sunpinyin-2.0.3-r1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="3"
  4. inherit eutils multilib scons-utils toolchain-funcs
  5. DESCRIPTION="SunPinyin is a SLM (Statistical Language Model) based IME"
  6. HOMEPAGE="https://sunpinyin.googlecode.com"
  7. SRC_URI="${HOMEPAGE}/files/${P}.tar.gz
  8. https://open-gram.googlecode.com/files/dict.utf8.tar.bz2
  9. https://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2"
  10. LICENSE="LGPL-2.1 CDDL"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
  13. IUSE=""
  14. RDEPEND="dev-db/sqlite:3"
  15. DEPEND="${RDEPEND}
  16. virtual/pkgconfig"
  17. src_unpack() {
  18. unpack "${P}.tar.gz"
  19. ln -s "${DISTDIR}/dict.utf8.tar.bz2" "${S}/raw/" || die "dict file not found"
  20. ln -s "${DISTDIR}/lm_sc.t3g.arpa.tar.bz2" "${S}/raw/" || die "dict file not found"
  21. }
  22. src_prepare() {
  23. epatch "${FILESDIR}/${P}-force-switch.patch"
  24. epatch "${FILESDIR}/${P}-gcc-4.7.patch"
  25. }
  26. src_configure() {
  27. tc-export CXX
  28. myesconsargs=(
  29. --prefix="${EPREFIX}"/usr
  30. --libdir="${EPREFIX}"/usr/$(get_libdir)
  31. --libdatadir="${EPREFIX}"/usr/lib
  32. )
  33. }
  34. src_compile() {
  35. escons || die
  36. }
  37. src_install() {
  38. escons --install-sandbox="${ED}" install || die
  39. }
  40. pkg_postinst() {
  41. elog ""
  42. elog "If you have already installed former version of ${PN}"
  43. elog "and any wrapper, please remerge the wrapper to make it work with"
  44. elog "the new version."
  45. elog ""
  46. elog "To use any wrapper for ${PN}, please merge any of the following"
  47. elog "packages: "
  48. elog "emerge app-i18n/fcitx-sunpinyin"
  49. elog "emerge app-i18n/ibus-sunpinyin"
  50. elog "emerge app-i18n/scim-sunpinyin"
  51. elog "emerge app-i18n/xsunpinyin"
  52. elog ""
  53. }