# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils DESCRIPTION="Small dynamic tiling window manager for X11 that tries to stay out of the way so that valuable screen real estate can be used for much more important stuff." HOMEPAGE="http://www.scrotwm.org" SRC_URI="http://peereboom.us/scrotwm/snapshot/${P}.tgz" LICENSE="ISC" SLOT="0" KEYWORDS="~x86" IUSE="acpi xft" DEPEND="x11-libs/libX11 x11-proto/xproto >x11-libs/libXrandr-1.0 acpi? ( sys-power/acpi ) xft? ( x11-libs/libXft )" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/01_all_do-not-use-symlinks-during-build.diff" epatch "${FILESDIR}/02_all_do-not-build-libswmhack.diff" epatch "${FILESDIR}/03_all_check-before-preloading-libswmhack.diff" if use acpi; then epatch "${FILESDIR}/04_all_remove-bash-and-openbsd-assumptions.diff" fi if use xft; then epatch "${FILESDIR}/10_all-use-xft.diff" epatch "${FILESDIR}/11_all-makefile-use-xft.diff" fi } src_compile() { cd "${S}/linux" einfo "Creating symlinks.." ln -s ../scrotwm.c . emake || die "emake failed" } src_install() { DESTTREE=/usr/local cd "${S}" doman *.1 dodir /usr/share/scrotwm insinto /usr/share/scrotwm insopts -m0444 if use xft; then doins "${FILESDIR}/scrotwm_xft.conf" else doins scrotwm.conf fi doins baraction.sh doins initscreen.sh doins screenshot.sh cd "${S}/linux" dobin scrotwm elog "Scrotwm successfully installed" elog "In /usr/share/scrotwm you will find a sample conf file, along with some useful scripts. Don't forget to copy scrotwm.conf into your homedir, and rename it as .scrotwm.conf ." elog "If you compiled it with the xft flag, copy the file scrotwm_xft.conf into your homedir and rename it as .scrotwm.conf" }