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