-
Notifications
You must be signed in to change notification settings - Fork 139
/
ghc-mod-1.10.13.ebuild
70 lines (58 loc) · 1.51 KB
/
ghc-mod-1.10.13.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# ebuild generated by hackport 0.2.14
EAPI="4"
CABAL_FEATURES="bin"
inherit base elisp-common haskell-cabal
DESCRIPTION="Happy Haskell programming on Emacs"
HOMEPAGE="http://www.mew.org/~kazu/proj/ghc-mod/"
SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="emacs"
RDEPEND="emacs? ( virtual/emacs )"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6
dev-haskell/ghc-paths
dev-haskell/ghc-syb-utils
>=dev-haskell/hlint-1.7.1
dev-haskell/io-choice
dev-haskell/regex-posix
dev-haskell/syb
dev-haskell/transformers
>=dev-lang/ghc-7.0.1"
SITEFILE=50${PN}-gentoo.el
PATCHES=("${FILESDIR}/${PN}-1.10.12-gentoo.patch")
src_compile() {
haskell-cabal_src_compile
if use emacs ; then
pushd elisp
elisp-compile *.el || die
popd
fi
}
src_install() {
haskell-cabal_src_install
if use emacs ; then
pushd "${S}"
elisp-install ghc-mod elisp/*.{el,elc}
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
popd
fi
}
pkg_postinst() {
if use emacs ; then
elisp-site-regen
elog "To configure ghc-mod either add this one line to ~/.emacs:"
elog "(add-hook 'haskell-mode-hook (lambda () (ghc-init)))"
elog "or if you wish to use flymake, instead add this one line to ~/.emacs:"
elog "(add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))"
fi
}
pkg_postrm() {
if use emacs ; then
elisp-site-regen
fi
}