aboutsummaryrefslogtreecommitdiff
blob: 0c5919f90a85f7c977ad1dc811c24e213da2a509 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit multilib versionator

[[ "${PR}" != "r0" ]] && \
	BUGFIX="-bf${PR#r}"

MY_PV="$(get_major_version).$(get_version_component_range 2)"
MY_P="${PN}-${MY_PV}${BUGFIX}"

DESCRIPTION="An improved dynamic tiling window manager"
HOMEPAGE="http://i3wm.org/"
SRC_URI="http://i3wm.org/downloads/${MY_P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="debug doc"

RDEPEND="
	>=x11-libs/libxcb-1.1.90.1
	>=x11-libs/xcb-util-0.3.3
	|| (
		<x11-libs/xcb-util-0.3.8
		(
			>=x11-libs/xcb-util-0.3.8
			>=x11-libs/xcb-util-keysyms-0.3.8
			>=x11-libs/xcb-util-wm-0.3.8
		)
	)
	x11-libs/libX11
	dev-libs/libev
	dev-libs/yajl
	"
DEPEND="${RDEPEND}
	>=x11-proto/xcb-proto-1.3
	doc? ( >=app-text/asciidoc-8.1.0 )
	sys-devel/bison
	sys-devel/flex
	dev-util/pkgconfig
	"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	use debug || { sed -i -e "s:DEBUG=1:DEBUG=0:" common.mk || die "sed die - debug" ; }
	sed -i \
		-e "s:/usr/local/include:/usr/include:" \
		-e "s:/usr/local/lib:/usr/$(get_libdir):" \
		common.mk || die "sed die"
}

src_compile() {
	emake || die "emake compile die"
	use doc && { emake -C docs || die "emake docs die" ; }
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install die"
	doman man/*.1 || die "doman die"
	dodoc GOALS TODO || die "dodoc die"
	if use doc; then
		dohtml -r docs/*.html || die "dohtml die"
		elog "Documentation in html is in /etc/share/doc/${P}"
	fi
}