scim-wnn-1.0.0-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. inherit eutils
  5. DESCRIPTION="Japanese input method Wnn IMEngine for SCIM"
  6. HOMEPAGE="http://nop.net-p.org/modules/pukiwiki/index.php?%5B%5Bscim-wnn%5D%5D"
  7. SRC_URI="http://nop.net-p.org/files/scim-wnn/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="+freewnn"
  12. RDEPEND=">=app-i18n/scim-1.4[-gtk3]
  13. dev-libs/wnn7sdk
  14. freewnn? ( app-i18n/freewnn )"
  15. DEPEND="${RDEPEND}
  16. virtual/pkgconfig
  17. >=sys-apps/sed-4"
  18. src_prepare() {
  19. # bug #140794
  20. sed -i -e 's:$LDFLAGS conftest.$ac_ext $LIBS:conftest.$ac_ext $LIBS $LDFLAGS:g' \
  21. configure || die "ldflags sed failed"
  22. # sed -i -e "s:/usr/lib/wnn7:/usr/$(get_libdir)/wnn:g" \
  23. sed -i -e "s:/usr/lib/wnn7:/usr/lib/wnn:g" \
  24. src/scim_wnn_def.h src/wnnconversion.cpp || die "sed failed"
  25. # bug #295733
  26. epatch "${FILESDIR}/${P}-gcc43.patch"
  27. }
  28. src_install() {
  29. emake DESTDIR="${D}" install || die "make install failed"
  30. dodoc AUTHORS ChangeLog NEWS README || die
  31. }
  32. pkg_postinst() {
  33. elog
  34. elog "To use SCIM with both GTK2 and XIM, you should use the following"
  35. elog "in your user startup scripts such as .gnomerc or .xinitrc:"
  36. elog
  37. elog "LANG='your_language' scim -d"
  38. elog "export XMODIFIERS=@im=SCIM"
  39. elog
  40. if ! use freewnn ; then
  41. ewarn
  42. ewarn "You disabled freewnn USE flag."
  43. ewarn "Please make sure you have wnnenvrc visible to scim-wnn."
  44. ewarn
  45. fi
  46. }