# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils toolchain-funcs x-modular DESCRIPTION="window manager improved 2 -- the next generation of the WMI project." HOMEPAGE="http://www.wmii.net" SRC_URI="http://wmii.de/download/${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~hppa ~ppc ~x86" RDEPEND="|| ( ( x11-libs/libX11 ) virtual/x11 ) sys-apps/9base" DEPEND="${RDEPEND} || ( ( x11-proto/xproto ) virtual/x11 )" src_unpack() { unpack "${A}" cd ${S} sed -i \ -e "/^PREFIX/s/=.*/= \/usr/" \ -e "/^CONFPREFIX/s/=.*/= \/etc/" \ -e "/^CC/s/=.*/= $(tc-getCC)/" \ -e "/^AR/s/=.*/= $(tc-getAR) cr/" \ -e "/^RANLIB/s/=.*/= $(tc-getRANLIB)/" \ -e "/^CFLAGS/s/-g/-g ${CFLAGS}/" \ -e "/^LDFLAGS/s/-g /-g ${LDFLAGS} /" \ "${S}/config.mk" || die "sed failed." } src_compile() { MAKEOPTS="-j1" # To keep the warnings away emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed." dodoc README LICENSE doc/NOTES doc/RELEASE doc/wmii.svg doc/wmii.tex || die "dodoc failed." echo -e "exec /usr/bin/wmii" > "${T}/${PN}" exeinto /etc/X11/Sessions doexe "${T}/${PN}" || die "/etc/X11/Sessions failed." insinto /usr/share/xsessions doins "${FILESDIR}/${PN}.desktop" || die "${PN}.desktop failed." }