gpm-1.20.7-r2.ebuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # emacs support disabled due to #99533 #335900
  4. EAPI=5
  5. inherit eutils systemd toolchain-funcs autotools multilib-minimal
  6. DESCRIPTION="Console-based mouse driver"
  7. HOMEPAGE="http://www.nico.schottelius.org/software/gpm/"
  8. SRC_URI="http://www.nico.schottelius.org/software/${PN}/archives/${P}.tar.lzma
  9. mirror://gentoo/${P}-docs.patch.xz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
  13. IUSE="selinux static-libs"
  14. RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
  15. selinux? ( sec-policy/selinux-gpm )
  16. abi_x86_32? (
  17. !<=app-emulation/emul-linux-x86-baselibs-20130224-r12
  18. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
  19. )"
  20. DEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
  21. app-arch/xz-utils
  22. sys-apps/texinfo
  23. virtual/yacc"
  24. src_prepare() {
  25. epatch "${FILESDIR}"/${P}-sysmacros.patch
  26. # Hack up the docs until we get this sorted upstream.
  27. # https://github.com/telmich/gpm/issues/8
  28. epatch "${WORKDIR}"/${P}-docs.patch
  29. touch -r . doc/* || die
  30. # fix ABI values
  31. sed -i \
  32. -e '/^abi_lev=/s:=.*:=1:' \
  33. -e '/^abi_age=/s:=.*:=20:' \
  34. configure.ac.footer || die
  35. # Rebuild autotools since release doesn't include them.
  36. # Should be fixed with the next release though.
  37. # https://github.com/telmich/gpm/pull/15
  38. sed -i -e '/ACLOCAL/,$d' autogen.sh || die
  39. ./autogen.sh
  40. eautoreconf
  41. # Out-of-tree builds are broken.
  42. # https://github.com/telmich/gpm/issues/16
  43. multilib_copy_sources
  44. }
  45. multilib_src_configure() {
  46. econf \
  47. --sysconfdir=/etc/gpm \
  48. $(use_enable static-libs static) \
  49. emacs=/bin/false
  50. }
  51. _emake() {
  52. emake \
  53. EMACS=: ELISP="" \
  54. $(multilib_is_native_abi || echo "PROG= ") \
  55. "$@"
  56. }
  57. multilib_src_compile() {
  58. _emake
  59. }
  60. multilib_src_test() {
  61. _emake check
  62. }
  63. multilib_src_install() {
  64. _emake DESTDIR="${D}" install
  65. dosym libgpm.so.1 /usr/$(get_libdir)/libgpm.so
  66. gen_usr_ldscript -a gpm
  67. }
  68. multilib_src_install_all() {
  69. insinto /etc/gpm
  70. doins conf/gpm-*.conf
  71. dodoc README TODO
  72. dodoc doc/Announce doc/FAQ doc/README*
  73. newinitd "${FILESDIR}"/gpm.rc6-2 gpm
  74. newconfd "${FILESDIR}"/gpm.conf.d gpm
  75. systemd_dounit "${FILESDIR}"/gpm.service
  76. }