dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / x11-wm / xmonad / xmonad-0.12.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 # ebuild generated by hackport 0.4.6.9999
7 #hackport: flags: -generatemanpage,-testing
8
9 CABAL_FEATURES="bin lib profile haddock hoogle hscolour test-suite"
10 inherit haskell-cabal
11
12 DESCRIPTION="A tiling window manager"
13 HOMEPAGE="https://xmonad.org/"
14 SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0/${PV}"
18 KEYWORDS="~amd64 ~ppc64 ~x86"
19 IUSE="+default-term no-autorepeat-keys"
20
21 RESTRICT=test # fails test on ghc-8 (assert has different text of exception)
22
23 RDEPEND="dev-haskell/data-default:=[profile?]
24         dev-haskell/extensible-exceptions:=[profile?]
25         dev-haskell/mtl:=[profile?]
26         dev-haskell/setlocale:=[profile?]
27         >=dev-haskell/utf8-string-0.3:=[profile?] <dev-haskell/utf8-string-1.1:=[profile?]
28         >=dev-haskell/x11-1.5:=[profile?] <dev-haskell/x11-1.7:=[profile?]
29         >=dev-lang/ghc-7.4.1:=
30 "
31 DEPEND="${RDEPEND}
32         >=dev-haskell/cabal-1.8
33         test? ( >=dev-haskell/quickcheck-2 )
34 "
35 PDEPEND="default-term? ( x11-terms/xterm )
36         x11-apps/xmessage
37 "
38
39 SAMPLE_CONFIG="xmonad.hs"
40 SAMPLE_CONFIG_LOC="man"
41
42 src_prepare() {
43         use no-autorepeat-keys && epatch "$FILESDIR"/${PN}-0.12-check-repeat.patch
44
45         # allow user patches
46         epatch_user
47 }
48
49 src_configure() {
50         haskell-cabal_src_configure \
51                 --flag=-generatemanpage \
52                 --flag=-testing
53 }
54
55 src_install() {
56         cabal_src_install
57
58         echo -e "#!/bin/sh\n/usr/bin/xmonad" > "${T}/${PN}"
59         exeinto /etc/X11/Sessions
60         doexe "${T}/${PN}"
61
62         insinto /usr/share/xsessions
63         doins "${FILESDIR}/${PN}.desktop"
64
65         doman man/xmonad.1
66         dohtml man/xmonad.1.html
67
68         dodoc CONFIG README.md CHANGES.md
69 }
70
71 pkg_postinst() {
72         haskell-cabal_pkg_postinst
73
74         elog "A sample ${SAMPLE_CONFIG} configuration file can be found here:"
75         elog "    /usr/share/${PF}/ghc-$(ghc-version)/${SAMPLE_CONFIG_LOC}/${SAMPLE_CONFIG}"
76         elog "The parameters in this file are the defaults used by xmonad."
77         elog "To customize xmonad, copy this file to:"
78         elog "    ~/.xmonad/${SAMPLE_CONFIG}"
79         elog "After editing, use 'mod-q' to dynamically restart xmonad "
80         elog "(where the 'mod' key defaults to 'Alt')."
81         elog ""
82         elog "Read the README or man page for more information, and to see "
83         elog "other possible configurations go to:"
84         elog "    http://haskell.org/haskellwiki/Xmonad/Config_archive"
85         elog "Please note that many of these configurations will require the "
86         elog "x11-wm/xmonad-contrib package to be installed."
87 }