1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 USE_RUBY="ruby24 ruby25 ruby26"
7 inherit ruby-ng toolchain-funcs
9 if [[ ${PV} == "9999" ]]; then
10 EHG_REPO_URI="https://hg.subforge.org/subtle"
11 EHG_CHECKOUT_DIR=${S}/all
14 SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
18 DESCRIPTION="A manual tiling window manager"
19 HOMEPAGE="https://subforge.org/projects/subtle/wiki"
23 IUSE="debug doc +xft xinerama xpm +xrandr +xtest"
24 RESTRICT="!test? ( test )"
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 )"
33 BDEPEND="virtual/pkgconfig"
35 ruby_add_rdepend "dev-ruby/archive-tar-minitar"
36 ruby_add_bdepend "dev-ruby/rake doc? ( dev-ruby/rdoc )"
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 && dodoc -r html
87 elog "Note that surserver will currently not work since dev-ruby/datamapper"
88 elog "is not in the tree."