x11-wm/i3: update live ebuild, fixes #598976
[gentoo.git] / x11-wm / i3 / i3-9999.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 inherit autotools git-r3
8
9 DESCRIPTION="An improved dynamic tiling window manager"
10 HOMEPAGE="http://i3wm.org/"
11 SRC_URI=""
12 EGIT_REPO_URI="git://github.com/i3/i3"
13 EGIT_BRANCH="next"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS=""
18 IUSE="doc"
19
20 CDEPEND="dev-lang/perl
21         dev-libs/libev
22         dev-libs/libpcre
23         >=dev-libs/yajl-2.0.3
24         x11-libs/libxcb[xkb]
25         x11-libs/libxkbcommon[X]
26         x11-libs/startup-notification
27         x11-libs/xcb-util
28         x11-libs/xcb-util-cursor
29         x11-libs/xcb-util-keysyms
30         x11-libs/xcb-util-wm
31         x11-libs/xcb-util-xrm
32         >=x11-libs/pango-1.30.0[X]
33         >=x11-libs/cairo-1.14.4[X,xcb]"
34 DEPEND="${CDEPEND}
35         doc? ( app-text/asciidoc app-text/xmlto )
36         virtual/pkgconfig"
37 RDEPEND="${CDEPEND}
38         dev-perl/AnyEvent-I3
39         dev-perl/JSON-XS"
40
41 src_prepare() {
42         default
43
44         if ! use doc ; then
45                 sed -e '/AC_PATH_PROG(\[PATH_ASCIIDOC/d' -i configure.ac || die
46         fi
47         eautoreconf
48
49         cat <<- EOF > "${T}"/i3wm
50                 #!/bin/sh
51                 exec /usr/bin/i3
52         EOF
53 }
54
55 src_configure() {
56         local myeconfargs=( --enable-debug=no )  # otherwise injects -O0 -g
57         econf "${myeconfargs[@]}"
58 }
59
60 src_compile() {
61         emake -C "${CBUILD}"
62 }
63
64 src_install() {
65         emake -C "${CBUILD}" DESTDIR="${D}" install
66         einstalldocs
67
68         exeinto /etc/X11/Sessions
69         doexe "${T}"/i3wm
70 }
71
72 pkg_postinst() {
73         einfo "There are several packages that you may find useful with ${PN} and"
74         einfo "their usage is suggested by the upstream maintainers, namely:"
75         einfo "  x11-misc/dmenu"
76         einfo "  x11-misc/i3status"
77         einfo "  x11-misc/i3lock"
78         einfo "Please refer to their description for additional info."
79 }