summaryrefslogtreecommitdiff
blob: 618fa05f87b0b5b618d5a5017e91fac3f5cd741d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-wm/musca/musca-0.9.24.ebuild,v 1.5 2009/11/30 23:46:21 jer Exp $

EAPI="2"

inherit eutils savedconfig toolchain-funcs

DESCRIPTION="A simple dynamic window manager for X, with features nicked from
ratpoison and dwm"
HOMEPAGE="http://aerosuidae.net/musca/"
SRC_URI="http://aerosuidae.net/${P}.tgz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~x86"
IUSE="apis xlisten"

COMMON="x11-libs/libX11"
DEPEND="${COMMON} sys-apps/sed"
RDEPEND="
	${COMMON} x11-misc/dmenu
	apis? ( x11-misc/xbindkeys )
"

src_prepare() {
	epatch "${FILESDIR}"/${P}-make.patch

	local i
	for i in apis xlisten; do
		use ${i} || sed -e "s|${i}||g" -i Makefile
	done

	use savedconfig && restore_config config.h
}

src_compile() {
	use savedconfig && msg=", please check the saved config file"
	tc-export CC
	emake || die "emake failed${msg}"
}

src_install() {
	dobin musca || die "dobin failed"

	local i
	for i in xlisten apis; do
		if use ${i}; then
			dobin ${i} || die "dobin ${i} failed"
		fi
	done
	doman musca.1 || die "doman failed"
	save_config config.h
}