ratpoison-1.4.8-r1.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit elisp-common eutils toolchain-funcs
  5. DESCRIPTION="window manager without mouse dependency"
  6. HOMEPAGE="http://www.nongnu.org/ratpoison/"
  7. SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 hppa ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
  11. IUSE="debug emacs +history sloppy +xft"
  12. RDEPEND="
  13. emacs? ( virtual/emacs )
  14. history? ( sys-libs/readline:= )
  15. xft? ( x11-libs/libXft )
  16. virtual/perl-Pod-Parser
  17. x11-libs/libXinerama
  18. x11-libs/libXtst
  19. "
  20. DEPEND="
  21. ${RDEPEND}
  22. app-arch/xz-utils
  23. virtual/pkgconfig
  24. "
  25. SITEFILE=50ratpoison-gentoo.el
  26. DOCS=( AUTHORS ChangeLog NEWS README TODO )
  27. src_prepare() {
  28. epatch "${FILESDIR}"/ratpoison.el-gentoo.patch
  29. }
  30. src_configure() {
  31. econf \
  32. $(use_enable debug) \
  33. $(use_enable history) \
  34. $(use_with xft)
  35. }
  36. src_compile() {
  37. emake CFLAGS="${CFLAGS}"
  38. if use emacs; then
  39. elisp-compile contrib/ratpoison.el || die "elisp-compile failed"
  40. fi
  41. if use sloppy; then
  42. pushd contrib
  43. $(tc-getCC) \
  44. ${CFLAGS} \
  45. ${LDFLAGS} \
  46. -o sloppy{,.c} \
  47. $( $(tc-getPKG_CONFIG) --libs x11) \
  48. || die
  49. fi
  50. }
  51. src_install() {
  52. default
  53. exeinto /etc/X11/Sessions
  54. newexe "${FILESDIR}"/ratpoison.xsession ratpoison
  55. insinto /usr/share/xsessions
  56. doins "${FILESDIR}"/${PN}.desktop
  57. use sloppy && dobin contrib/sloppy
  58. docinto example
  59. dodoc contrib/{genrpbindings,split.sh} \
  60. doc/{ipaq.ratpoisonrc,sample.ratpoisonrc}
  61. rm -rf "${ED}/usr/share/"{doc/ratpoison,ratpoison}
  62. if use emacs; then
  63. elisp-install ${PN} contrib/ratpoison.*
  64. elisp-site-file-install "${FILESDIR}/${SITEFILE}"
  65. fi
  66. }
  67. pkg_postinst() {
  68. use emacs && elisp-site-regen
  69. }
  70. pkg_postrm() {
  71. use emacs && elisp-site-regen
  72. }