1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby20 ruby21 ruby22"
8 inherit ruby-ng toolchain-funcs
10 if [[ ${PV} == "9999" ]]; then
11 EHG_REPO_URI="http://hg.subforge.org/subtle"
12 EHG_CHECKOUT_DIR=${S}/all
15 SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
19 DESCRIPTION="A manual tiling window manager"
20 HOMEPAGE="http://subforge.org/projects/subtle/wiki"
24 IUSE="debug doc +xft xinerama xpm +xrandr +xtest"
26 RDEPEND="x11-libs/libX11
27 xft? ( x11-libs/libXft )
28 xinerama? ( x11-libs/libXinerama )
29 xpm? ( x11-libs/libXpm )
30 xtest? ( x11-libs/libXtst )
31 xrandr? ( x11-libs/libXrandr )"
35 ruby_add_rdepend "dev-ruby/archive-tar-minitar"
36 ruby_add_bdepend "dev-ruby/rake"
39 if [[ ${PV} == "9999" ]]; then
46 each_ruby_configure() {
48 use debug && myconf+=" debug=yes" || myconf+=" debug=no"
49 use xft && myconf+=" xft=yes" || myconf+=" xft=no"
50 use xinerama && myconf+=" xinerama=yes" || myconf+=" xinerama=no"
51 use xpm && myconf+=" xpm=yes" || myconf+=" xpm=no"
52 use xtest && myconf+=" xtest=yes" || myconf+=" xtest=no"
53 use xrandr && myconf+=" xrandr=yes" || myconf+=" xrandr=no"
55 ${RUBY} -S rake -v CC="$(tc-getCC)" destdir="${D}" ${myconf} config || die
59 ${RUBY} -S rake -v build || die
63 use doc && { rake rdoc || die ; }
67 ${RUBY} -S rake -v install || die
71 dodir /etc/X11/Sessions
72 cat <<-EOF > "${D}/etc/X11/Sessions/${PN}"
76 fperms a+x /etc/X11/Sessions/${PN}
78 insinto /usr/share/xsessions
79 doins data/${PN}.desktop
83 use doc && dohtml -r html/*
87 elog "Note that surserver will currently not work since dev-ruby/datamapper"
88 elog "is not in the tree."