xvnkb-0.2.8a-r1.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils
  4. IUSE="spell xft"
  5. DESCRIPTION="Vietnamese input keyboard for X"
  6. SRC_URI="http://xvnkb.sourceforge.net/xvnkb/${P}.tar.bz2"
  7. HOMEPAGE="http://xvnkb.sourceforge.net/"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="x86 ppc"
  11. RDEPEND="x11-libs/libX11
  12. xft? ( x11-libs/libXft )"
  13. DEPEND="${RDEPEND}
  14. x11-proto/xproto"
  15. src_unpack() {
  16. unpack ${A}
  17. cd "${S}"
  18. epatch "${FILESDIR}/${P}.patch"
  19. epatch "${FILESDIR}/${PV}-putenv.patch"
  20. # Remove pregenerated dep file.
  21. rm -f "${S}/tools/Makefile.dep"
  22. }
  23. src_compile() {
  24. local myconf
  25. use spell || myconf="${myconf} --no-spellcheck"
  26. use xft || myconf="${myconf} --no-xft"
  27. # *not* autotools
  28. ./configure \
  29. --use-extstroke ${myconf} \
  30. || die "./configure failed"
  31. emake || die "emake failed"
  32. }
  33. src_install() {
  34. dobin xvnkb
  35. dobin tools/xvnkb_ctrl
  36. dolib xvnkb.so.${PV}
  37. dosym /usr/lib/xvnkb.so.${PV} /usr/lib/xvnkb.so
  38. dodoc ChangeLog AUTHORS THANKS TODO INSTALL* README* doc/*
  39. docinto scripts
  40. dodoc scripts/*
  41. docinto contrib
  42. dodoc contrib/*
  43. }
  44. pkg_postinst() {
  45. elog "Remember to"
  46. elog "$ export LANG=en_US.UTF-8"
  47. elog "(or any other UTF-8 locale) and"
  48. elog "$ export LD_PRELOAD=/usr/lib/xvnkb.so"
  49. elog "before starting X Window"
  50. elog "More documents are in /usr/share/doc/${PF}"
  51. ewarn "Programs with suid/sgid will have LD_PRELOAD cleared"
  52. ewarn "You have to unset suid/sgid to use with xvnkb"
  53. }