summaryrefslogtreecommitdiff
blob: b8a5bdb9d7fa1c6b3e69732a715ffe31811a5a01 (plain)
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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit elisp eutils

DESCRIPTION="SLIME, the Superior Lisp Interaction Mode (Extended)"
HOMEPAGE="http://common-lisp.net/project/slime/"
SRC_URI="https://github.com/slime/slime/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2 xref? ( xref.lisp )"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc xref"
RESTRICT=test # tests fail to contact sbcl

RDEPEND="virtual/commonlisp
	dev-lisp/asdf"
DEPEND="${RDEPEND}
	>=sys-apps/texinfo-5.1
	doc? ( virtual/texi2dvi )"

CLPACKAGE=swank
CLSYSTEMS=swank
SITEFILE=70${PN}-gentoo.el

src_prepare() {
	# Remove xref.lisp (which is non-free) unless USE flag is set
	use xref || rm -f xref.lisp
	eapply_user
}

src_compile() {
	elisp-compile *.el || die
	BYTECOMPFLAGS="${BYTECOMPFLAGS} -L contrib -l slime" \
		elisp-compile contrib/*.el lib/*.el || die
	emake -j1 -C doc slime.info || die "Cannot build info docs"

	#if use doc; then
	#	VARTEXFONTS="${T}"/fonts \
	#		emake -j1 -C doc slime.pdf || die "emake doc failed"
	#fi
}

src_install() {
	## install core
	elisp-install ${PN} *.{el,elc,lisp} || die "Cannot install SLIME core"

	## install contribs
	elisp-install ${PN}/contrib/ contrib/*.{el,elc,lisp,scm,goo} \
		|| die "Cannot install contribs"

	## install lib
	elisp-install ${PN}/lib/ lib/*.{el,elc} || die "Cannot install libs"

	## install swank
	elisp-install ${PN}/swank/ swank/*.lisp || die "Cannot install swank"

	elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
	## install docs
	dodoc README.md CONTRIBUTING.md NEWS PROBLEMS
	newdoc contrib/README.md README-contrib.md
	doinfo doc/slime.info
	use doc && dodoc doc/*.pdf
}