dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / x11-wm / xmonad / xmonad-0.11-r3.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.3.1
7
8 CABAL_FEATURES="bin lib profile haddock hscolour hoogle"
9 inherit haskell-cabal
10
11 DESCRIPTION="A tiling window manager"
12 HOMEPAGE="https://xmonad.org/"
13 SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0/${PV}"
17 KEYWORDS="~amd64 ~ppc64 ~x86"
18 IUSE="+default-term no-autorepeat-keys"
19
20 RDEPEND="dev-haskell/extensible-exceptions:=[profile?]
21                 dev-haskell/mtl:=[profile?]
22                 >=dev-haskell/utf8-string-0.3:=[profile?]
23                 >=dev-haskell/x11-1.5:=[profile?]
24                 <dev-haskell/x11-1.7:=[profile?]
25                 >=dev-lang/ghc-6.10.4:="
26 DEPEND="${RDEPEND}
27                 >=dev-haskell/cabal-1.6"
28 PDEPEND="default-term? ( x11-terms/xterm )
29         x11-apps/xmessage
30 "
31
32 SAMPLE_CONFIG="xmonad.hs"
33 SAMPLE_CONFIG_LOC="man"
34
35 src_prepare() {
36         epatch "$FILESDIR"/${P}-ghc-7.10.patch
37         epatch "$FILESDIR"/${P}-sample.patch
38         use no-autorepeat-keys && epatch "$FILESDIR"/${PN}-check-repeat.patch
39
40         cabal_chdeps \
41                 "utf8-string >= 0.3 && < 0.4" "utf8-string >= 0.3 && < 1.1"
42
43         # allow user patches
44         epatch_user
45 }
46
47 src_install() {
48         cabal_src_install
49
50         echo -e "#!/bin/sh\n/usr/bin/xmonad" > "${T}/${PN}"
51         exeinto /etc/X11/Sessions
52         doexe "${T}/${PN}"
53
54         insinto /usr/share/xsessions
55         doins "${FILESDIR}/${PN}.desktop"
56
57         doman man/xmonad.1
58         dohtml man/xmonad.1.html
59
60         dodoc CONFIG README
61 }
62
63 pkg_postinst() {
64         haskell-cabal_pkg_postinst
65
66         elog "A sample ${SAMPLE_CONFIG} configuration file can be found here:"
67         elog "    /usr/share/${PF}/ghc-$(ghc-version)/${SAMPLE_CONFIG_LOC}/${SAMPLE_CONFIG}"
68         elog "The parameters in this file are the defaults used by xmonad."
69         elog "To customize xmonad, copy this file to:"
70         elog "    ~/.xmonad/${SAMPLE_CONFIG}"
71         elog "After editing, use 'mod-q' to dynamically restart xmonad "
72         elog "(where the 'mod' key defaults to 'Alt')."
73         elog ""
74         elog "Read the README or man page for more information, and to see "
75         elog "other possible configurations go to:"
76         elog "    http://haskell.org/haskellwiki/Xmonad/Config_archive"
77         elog "Please note that many of these configurations will require the "
78         elog "x11-wm/xmonad-contrib package to be installed."
79 }