imsettings-1.5.0.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils autotools
  5. DESCRIPTION="Delivery framework for general Input Method configuration"
  6. HOMEPAGE="https://tagoh.github.com/imsettings/"
  7. SRC_URI="https://bitbucket.org/tagoh/imsettings/downloads/${P}.tar.bz2"
  8. LICENSE="LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="doc gconf gtk3 qt4 static-libs xfconf"
  12. # X11 connections are required for test.
  13. RESTRICT="test"
  14. RDEPEND=">=dev-libs/check-0.9.4
  15. >=dev-libs/glib-2.26
  16. sys-apps/dbus
  17. >=x11-libs/gtk+-2.12:2
  18. >=x11-libs/libgxim-0.4.0
  19. >=x11-libs/libnotify-0.7
  20. x11-libs/libX11
  21. gconf? ( gnome-base/gconf )
  22. gtk3? ( x11-libs/gtk+:3 )
  23. qt4? ( dev-qt/qtcore:4 )
  24. xfconf? ( xfce-base/xfconf )"
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig
  27. dev-util/intltool
  28. doc? ( dev-util/gtk-doc )"
  29. MY_XINPUTSH="90-xinput"
  30. DOCS=( AUTHORS ChangeLog NEWS README )
  31. src_prepare() {
  32. # Prevent automagic linking to libxfconf-0.
  33. if ! use gconf; then
  34. sed -i -e 's:gconf-2.0:dIsAbLe&:' configure || die
  35. fi
  36. if ! use gtk3; then
  37. sed -i -e 's:gtk+-3.0:dIsAbLe&:' configure || die
  38. fi
  39. if ! use qt4; then
  40. sed -i -e 's:QtCore:dIsAbLe&:' configure || die
  41. fi
  42. if ! use xfconf; then
  43. sed -i -e 's:libxfconf-0:dIsAbLe&:' configure || die
  44. fi
  45. epatch "${FILESDIR}"/${P}-gir-scanner.patch
  46. eautoreconf
  47. }
  48. src_configure() {
  49. econf \
  50. $(use_enable static-libs static) \
  51. --with-xinputsh="${MY_XINPUTSH}"
  52. }
  53. src_install() {
  54. default
  55. find "${ED}" -name '*.la' -exec rm -f '{}' +
  56. fperms 0755 /usr/libexec/xinputinfo.sh
  57. fperms 0755 "/etc/X11/xinit/xinitrc.d/${MY_XINPUTSH}"
  58. }
  59. pkg_postinst() {
  60. if [ ! -e "${EPREFIX}/etc/X11/xinit/xinputrc" ] ; then
  61. ln -sf xinput.d/xcompose.conf "${EPREFIX}/etc/X11/xinit/xinputrc"
  62. fi
  63. }