sci-mathematics/maxima: import
[portage-prefix-bleeding-edge-ebuilds.git] / app-emacs / slime / slime-2.0_p20080731.ebuild
blob846ee737bc61687ceeca2ec02a8432252cefb4ec
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emacs/slime/slime-2.0_p20080731.ebuild,v 1.3 2008/08/27 08:41:25 ulm Exp $
5 EAPI="prefix"
7 inherit common-lisp elisp eutils
9 DESCRIPTION="SLIME, the Superior Lisp Interaction Mode (Extended)"
10 HOMEPAGE="http://common-lisp.net/project/slime/"
11 SRC_URI="mirror://gentoo/${P}.tar.bz2"
13 LICENSE="GPL-2 xref.lisp"
14 SLOT="0"
15 KEYWORDS="~amd64-linux ~x86-linux ~x86-macos"
16 IUSE="doc"
18 RDEPEND="virtual/commonlisp dev-lisp/cl-asdf"
19 DEPEND="${RDEPEND}
20 doc? ( virtual/texi2dvi )"
22 CLPACKAGE=swank
23 SITEFILE=70${PN}-gentoo.el
25 src_unpack() {
26 unpack ${A}
27 cd "${S}"
29 cp "${FILESDIR}"/${PV}/${SITEFILE} "${S}"
30 epatch "${FILESDIR}"/${PN}-prefix.patch
31 eprefixify "${S}"/${SITEFILE}
33 epatch "${FILESDIR}"/${PV}/module-load-gentoo.patch
34 epatch "${FILESDIR}"/${PV}/dont-call-init.patch
35 epatch "${FILESDIR}"/${PV}/inspect-presentations.patch
36 epatch "${FILESDIR}"/${PV}/fix-ecl.patch
37 epatch "${FILESDIR}"/${PV}/fix-swank-listener-hooks-contrib.patch
38 epatch "${FILESDIR}"/${PV}/fix-slime-indentation.patch
39 epatch "${FILESDIR}"/${PV}/changelog-date.patch
41 # extract date of last update from ChangeLog, bug 233270
42 SLIME_CHANGELOG_DATE=$(awk '/^[-0-9]+ / { print $1; exit; }' ChangeLog)
43 [ -n "${SLIME_CHANGELOG_DATE}" ] || die "cannot determine ChangeLog date"
45 sed -i "/(defvar \*swank-wire-protocol-version\*/s:nil:\"${SLIME_CHANGELOG_DATE}\":" swank.lisp \
46 || die "sed swank.lisp failed"
47 sed -i "s:@SLIME-CHANGELOG-DATE@:${SLIME_CHANGELOG_DATE}:" slime.el \
48 || die "sed slime.el failed"
51 src_compile() {
52 elisp-compile *.el || die "Cannot compile core Elisp files"
53 BYTECOMPFLAGS="${BYTECOMPFLAGS} -L contrib -l slime" \
54 elisp-compile contrib/*.el || die "Cannot compile contrib Elisp files"
55 emake -j1 -C doc slime.info || die "Cannot build info docs"
56 if use doc; then
57 VARTEXFONTS="${T}"/fonts \
58 emake -j1 -C doc slime.{ps,pdf} || die "emake doc failed"
62 src_install() {
63 ## install core
64 elisp-install ${PN} *.el{,c} "${FILESDIR}"/swank-loader.lisp \
65 || die "Cannot install SLIME core"
66 elisp-site-file-install "${S}"/${SITEFILE} \
67 || die "elisp-site-file-install failed"
68 cp "${FILESDIR}"/${PV}/swank.asd "${S}"
69 # remove upstream swank-loader, since it won't be used
70 rm "${S}"/swank-loader.lisp
71 insinto "${CLSOURCEROOT%/}"/swank
72 doins *.lisp "${FILESDIR}"/${PV}/swank.asd
73 dodir "${CLSYSTEMROOT}"
74 dosym "${CLSOURCEROOT%/}"/swank/swank.asd "${CLSYSTEMROOT}"
75 dosym "${SITELISP}"/${PN}/swank-version.el "${CLSOURCEROOT%/}"/swank
77 ## install contribs
78 elisp-install ${PN}/contrib/ contrib/*.{el,elc,scm,goo} \
79 || die "Cannot install contribs"
80 insinto "${CLSOURCEROOT%/}"/swank/contrib
81 doins contrib/*.lisp
83 ## install docs
84 dodoc README* ChangeLog HACKING NEWS PROBLEMS
85 newdoc contrib/README README.contrib
86 newdoc contrib/ChangeLog ChangeLog.contrib
87 doinfo doc/slime.info
88 use doc && dodoc doc/slime.{ps,pdf}