subtle-9999.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. USE_RUBY="ruby20 ruby21 ruby22"
  5. inherit ruby-ng toolchain-funcs
  6. if [[ ${PV} == "9999" ]]; then
  7. EHG_REPO_URI="http://hg.subforge.org/subtle"
  8. EHG_CHECKOUT_DIR=${S}/all
  9. inherit mercurial
  10. else
  11. SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
  12. KEYWORDS="~amd64 ~x86"
  13. fi
  14. DESCRIPTION="A manual tiling window manager"
  15. HOMEPAGE="http://subforge.org/projects/subtle/wiki"
  16. LICENSE="GPL-2"
  17. SLOT="0"
  18. IUSE="debug doc +xft xinerama xpm +xrandr +xtest"
  19. RDEPEND="x11-libs/libX11
  20. xft? ( x11-libs/libXft )
  21. xinerama? ( x11-libs/libXinerama )
  22. xpm? ( x11-libs/libXpm )
  23. xtest? ( x11-libs/libXtst )
  24. xrandr? ( x11-libs/libXrandr )"
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig"
  27. ruby_add_rdepend "dev-ruby/archive-tar-minitar"
  28. ruby_add_bdepend "dev-ruby/rake"
  29. all_ruby_unpack() {
  30. if [[ ${PV} == "9999" ]]; then
  31. mercurial_src_unpack
  32. else
  33. default
  34. fi
  35. }
  36. each_ruby_configure() {
  37. local myconf
  38. use debug && myconf+=" debug=yes" || myconf+=" debug=no"
  39. use xft && myconf+=" xft=yes" || myconf+=" xft=no"
  40. use xinerama && myconf+=" xinerama=yes" || myconf+=" xinerama=no"
  41. use xpm && myconf+=" xpm=yes" || myconf+=" xpm=no"
  42. use xtest && myconf+=" xtest=yes" || myconf+=" xtest=no"
  43. use xrandr && myconf+=" xrandr=yes" || myconf+=" xrandr=no"
  44. ${RUBY} -S rake -v CC="$(tc-getCC)" destdir="${D}" ${myconf} config || die
  45. }
  46. each_ruby_compile() {
  47. ${RUBY} -S rake -v build || die
  48. }
  49. all_ruby_compile() {
  50. use doc && { rake rdoc || die ; }
  51. }
  52. each_ruby_install() {
  53. ${RUBY} -S rake -v install || die
  54. }
  55. all_ruby_install() {
  56. dodir /etc/X11/Sessions
  57. cat <<-EOF > "${D}/etc/X11/Sessions/${PN}"
  58. #!/bin/sh
  59. exec /usr/bin/subtle
  60. EOF
  61. fperms a+x /etc/X11/Sessions/${PN}
  62. insinto /usr/share/xsessions
  63. doins data/${PN}.desktop
  64. dodoc AUTHORS NEWS
  65. use doc && dohtml -r html/*
  66. }
  67. pkg_postinst() {
  68. elog "Note that surserver will currently not work since dev-ruby/datamapper"
  69. elog "is not in the tree."
  70. }