scim-bridge-0.4.16-r3.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. inherit autotools eutils gnome2-utils multilib readme.gentoo-r1
  5. DESCRIPTION="Yet another IM-client of SCIM"
  6. HOMEPAGE="http://www.scim-im.org/projects/scim_bridge"
  7. SRC_URI="mirror://sourceforge/scim/${P}.tar.gz"
  8. LICENSE="GPL-2 LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
  11. IUSE="doc gtk qt4"
  12. RESTRICT="test"
  13. RDEPEND="
  14. >=app-i18n/scim-1.4.6
  15. gtk? (
  16. >=x11-libs/gtk+-2.2:2
  17. >=x11-libs/pango-1.1
  18. )
  19. qt4? (
  20. dev-qt/qtgui:4
  21. dev-qt/qtcore:4
  22. >=x11-libs/pango-1.1
  23. )
  24. "
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig
  27. dev-util/intltool
  28. doc? ( app-doc/doxygen )
  29. "
  30. DISABLE_AUTOFORMATTING="yes"
  31. DOC_CONTENTS="
  32. If you would like to use ${PN} as default instead of scim, set
  33. $ export GTK_IM_MODULE=scim-bridge
  34. $ export QT_IM_MODULE=scim-bridge
  35. "
  36. PATCHES=(
  37. "${FILESDIR}/${PN}-0.4.15.2-qt4.patch"
  38. "${FILESDIR}/${PN}-0.4.15.2-gcc43.patch"
  39. "${FILESDIR}/${P}+gcc-4.4.patch"
  40. "${FILESDIR}/${P}+gcc-4.7.patch"
  41. "${FILESDIR}/${P}-configure.ac.patch" #280887
  42. )
  43. src_prepare() {
  44. default
  45. eautoreconf
  46. }
  47. src_configure() {
  48. local myconf=""
  49. # '--disable-*-immodule' are b0rked, bug #280887
  50. if use gtk ; then
  51. myconf="${myconf} --enable-gtk2-immodule=yes"
  52. else
  53. myconf="${myconf} --enable-gtk2-immodule=no"
  54. fi
  55. # Qt3 is no longer supported, bug 283429
  56. myconf="${myconf} --enable-qt3-immodule=no"
  57. if use qt4 ; then
  58. myconf="${myconf} --enable-qt4-immodule=yes"
  59. else
  60. myconf="${myconf} --enable-qt4-immodule=no"
  61. fi
  62. econf \
  63. --disable-static \
  64. $(use_enable doc documents) \
  65. ${myconf}
  66. }
  67. src_install() {
  68. default
  69. prune_libtool_files --modules
  70. readme.gentoo_create_doc
  71. }
  72. pkg_postinst() {
  73. use gtk && gnome2_query_immodules_gtk2
  74. readme.gentoo_print_elog
  75. }
  76. pkg_postrm() {
  77. use gtk && gnome2_query_immodules_gtk2
  78. }