dev-libs/botan: stable 2.14.0-r1 for hppa, bug #722904
[gentoo.git] / x11-wm / i3 / i3-4.14-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 inherit autotools
7
8 DESCRIPTION="An improved dynamic tiling window manager"
9 HOMEPAGE="https://i3wm.org/"
10 # iw3m.org tarball for 4.14 is broken, see https://github.com/i3/i3/issues/2905
11 SRC_URI="https://github.com/i3/i3/archive/${PV}.tar.gz -> ${P}.tar.gz"
12 S="${WORKDIR}/${P}"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~x86"
17 IUSE="doc debug test"
18 RESTRICT="!test? ( test )"
19
20 CDEPEND="dev-libs/libev
21         dev-libs/libpcre
22         >=dev-libs/yajl-2.0.3
23         x11-libs/libxcb[xkb]
24         x11-libs/libxkbcommon[X]
25         x11-libs/startup-notification
26         x11-libs/xcb-util
27         x11-libs/xcb-util-cursor
28         x11-libs/xcb-util-keysyms
29         x11-libs/xcb-util-wm
30         x11-libs/xcb-util-xrm
31         >=x11-libs/cairo-1.14.4[X,xcb(+)]
32         >=x11-libs/pango-1.30.0[X]"
33 DEPEND="${CDEPEND}
34         app-text/asciidoc
35         doc? ( app-text/xmlto dev-lang/perl )
36         test? (
37                 dev-perl/Module-Install
38         )
39         virtual/pkgconfig"
40 RDEPEND="${CDEPEND}
41         dev-lang/perl
42         dev-perl/AnyEvent-I3
43         dev-perl/JSON-XS"
44
45 # Test without debug will apply optimization levels, which results
46 # in type-punned pointers - which in turn causes test failures.
47 REQUIRED_USE="test? ( debug )"
48
49 DOCS=(
50         "RELEASE-NOTES-${PV}"
51         docs
52 )
53 PATCHES=(
54         "${FILESDIR}/${PN}-musl-GLOB_TILDE.patch"
55 )
56
57 src_test() {
58         emake -C "${CBUILD}" check
59 }
60
61 src_prepare() {
62         default
63
64         cat <<- EOF > "${T}"/i3wm
65                 #!/bin/sh
66                 exec /usr/bin/i3
67         EOF
68
69         eautoreconf
70 }
71
72 src_configure() {
73         local myeconfargs=(
74                 $(use_enable debug)
75         )
76         econf "${myeconfargs[@]}"
77 }
78
79 src_compile() {
80         emake -C "${CBUILD}"
81 }
82
83 src_install() {
84         emake -C "${CBUILD}" DESTDIR="${D}" install
85         doman "${CBUILD}"/man/*.1
86
87         use doc && einstalldocs
88
89         exeinto /etc/X11/Sessions
90         doexe "${T}/i3wm"
91 }
92
93 pkg_postinst() {
94         # Only show the elog information on a new install
95         if [[ ! ${REPLACING_VERSIONS} ]]; then
96                 elog "There are several packages that you may find useful with ${PN} and"
97                 elog "their usage is suggested by the upstream maintainers, namely:"
98                 elog "  x11-misc/dmenu"
99                 elog "  x11-misc/i3status"
100                 elog "  x11-misc/i3lock"
101                 elog "Please refer to their description for additional info."
102         fi
103 }