scim-1.4.14.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils flag-o-matic multilib gnome2-utils autotools-utils
  5. DESCRIPTION="Smart Common Input Method (SCIM) is an Input Method (IM) development platform"
  6. HOMEPAGE="http://www.scim-im.org/"
  7. SRC_URI="mirror://sourceforge/scim/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ppc ppc64 sparc x86 ~x86-fbsd"
  11. IUSE="doc gtk3"
  12. RDEPEND="x11-libs/libX11
  13. dev-libs/glib:2
  14. gtk3? ( x11-libs/gtk+:3 )
  15. !gtk3? ( x11-libs/gtk+:2 )
  16. >=dev-libs/atk-1
  17. >=x11-libs/pango-1
  18. !app-i18n/scim-cvs"
  19. DEPEND="${RDEPEND}
  20. doc? ( app-doc/doxygen
  21. >=app-text/docbook-xsl-stylesheets-1.73.1 )
  22. dev-lang/perl
  23. virtual/pkgconfig
  24. >=dev-util/intltool-0.33
  25. sys-devel/libtool"
  26. AUTOTOOLS_IN_SOURCE_BUILD=1
  27. DOCS=(
  28. README
  29. AUTHORS
  30. ChangeLog
  31. docs/developers
  32. docs/scim.cfg
  33. )
  34. src_configure() {
  35. local gtk_version
  36. if use gtk3; then
  37. gtk_version="--with-gtk-version=3"
  38. else
  39. gtk_version="--with-gtk-version=2"
  40. fi
  41. # bug #83625
  42. filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
  43. local myeconfargs=(
  44. $(use_with doc doxygen)
  45. --enable-ld-version-script
  46. $gtk_version
  47. )
  48. autotools-utils_src_configure
  49. }
  50. src_compile() {
  51. autotools-utils_src_compile
  52. use doc && emake docs
  53. }
  54. src_install() {
  55. use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/docs/html/")
  56. autotools-utils_src_install
  57. sed -e "s:@EPREFIX@:${EPREFIX}:" "${FILESDIR}/xinput-${PN}" > "${T}/${PN}.conf" || die
  58. insinto /etc/X11/xinit/xinput.d
  59. doins "${T}/${PN}.conf"
  60. }
  61. pkg_postinst() {
  62. elog
  63. elog "To use SCIM with both GTK2 and XIM, you should use the following"
  64. elog "in your user startup scripts such as .gnomerc or .xinitrc:"
  65. elog
  66. elog "LANG='your_language' scim -d"
  67. elog "export XMODIFIERS=@im=SCIM"
  68. elog "export GTK_IM_MODULE=\"scim\""
  69. elog "export QT_IM_MODULE=\"scim\""
  70. elog
  71. elog "where 'your_language' can be zh_CN, zh_TW, ja_JP.eucJP or any other"
  72. elog "UTF-8 locale such as en_US.UTF-8 or ja_JP.UTF-8"
  73. elog
  74. elog "To use Chinese input methods:"
  75. elog " # emerge app-i18n/scim-tables app-i18n/scim-pinyin"
  76. elog "To use Korean input methods:"
  77. elog " # emerge app-i18n/scim-hangul"
  78. elog "To use Japanese input methods:"
  79. elog " # emerge app-i18n/scim-anthy"
  80. elog "To use various input methods (more than 30 languages):"
  81. elog " # emerge app-i18n/scim-m17n"
  82. elog
  83. elog "Please modify ${EPREFIX}/etc/scim/global and add your UTF-8 locale to"
  84. elog "/SupportedUnicodeLocales entry."
  85. elog
  86. ewarn
  87. ewarn "If you upgraded from scim-1.2.x or scim-1.0.x, you should remerge all SCIM modules."
  88. ewarn
  89. gnome2_query_immodules_gtk2
  90. }
  91. pkg_postrm() {
  92. gnome2_query_immodules_gtk2
  93. }