dev-libs/botan: stable 2.14.0-r1 for hppa, bug #722904
[gentoo.git] / x11-wm / i3 / i3-4.15-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 AEVER=0.17
7
8 inherit autotools out-of-source virtualx
9
10 DESCRIPTION="An improved dynamic tiling window manager"
11 HOMEPAGE="https://i3wm.org/"
12 SRC_URI="https://i3wm.org/downloads/${P}.tar.bz2"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="amd64 ~arm64 x86"
17 IUSE="doc debug test"
18
19 CDEPEND="dev-libs/libev
20         dev-libs/libpcre
21         >=dev-libs/yajl-2.0.3
22         x11-libs/libxcb[xkb]
23         x11-libs/libxkbcommon[X]
24         x11-libs/startup-notification
25         x11-libs/xcb-util
26         x11-libs/xcb-util-cursor
27         x11-libs/xcb-util-keysyms
28         x11-libs/xcb-util-wm
29         x11-libs/xcb-util-xrm
30         x11-misc/xkeyboard-config
31         >=x11-libs/cairo-1.14.4[X,xcb(+)]
32         >=x11-libs/pango-1.30.0[X]"
33 DEPEND="${CDEPEND}
34         test? (
35                 dev-perl/AnyEvent
36                 >=dev-perl/X11-XCB-0.120.0
37                 dev-perl/Inline
38                 dev-perl/Inline-C
39                 dev-perl/IPC-Run
40                 dev-perl/ExtUtils-PkgConfig
41                 dev-perl/local-lib
42                 >=virtual/perl-Test-Simple-0.940.0
43                 x11-base/xorg-server[xephyr]
44         )
45         virtual/pkgconfig"
46 RDEPEND="${CDEPEND}
47         dev-lang/perl
48         dev-perl/AnyEvent-I3
49         dev-perl/JSON-XS"
50
51 # Test without debug will apply optimization levels, which results
52 # in type-punned pointers - which in turn causes test failures.
53 REQUIRED_USE="test? ( debug )"
54
55 PATCHES=(
56         "${FILESDIR}/${PN}-musl-GLOB_TILDE.patch"
57 )
58
59 # https://github.com/i3/i3/issues/3013
60 RESTRICT="test"
61
62 src_prepare() {
63         default
64
65         cat <<- EOF > "${T}"/i3wm
66                 #!/bin/sh
67                 exec /usr/bin/i3
68         EOF
69
70         eautoreconf
71 }
72
73 my_src_configure() {
74         local myeconfargs=(
75                 $(use_enable debug)
76         )
77         econf "${myeconfargs[@]}"
78 }
79
80 my_src_test() {
81         emake \
82                 test.commands_parser \
83                 test.config_parser \
84                 test.inject_randr15
85
86         virtx perl \
87                 -I "${S}/testcases/lib" \
88                 -I "${BUILD_DIR}/testcases/lib" \
89                 testcases/complete-run.pl
90 }
91
92 my_src_install_all() {
93         doman man/*.1
94
95         einstalldocs
96         use doc && dodoc -r docs "RELEASE-NOTES-${PV}"
97
98         exeinto /etc/X11/Sessions
99         doexe "${T}/i3wm"
100 }
101
102 pkg_postinst() {
103         # Only show the elog information on a new install
104         if [[ ! ${REPLACING_VERSIONS} ]]; then
105                 elog "There are several packages that you may find useful with ${PN} and"
106                 elog "their usage is suggested by the upstream maintainers, namely:"
107                 elog "  x11-misc/dmenu"
108                 elog "  x11-misc/i3status"
109                 elog "  x11-misc/i3lock"
110                 elog "Please refer to their description for additional info."
111         fi
112 }