Add gnu-smalltalk.
[gentoo-soor-overlay.git] / dev-lang / gnu-smalltalk / gnu-smalltalk-3.0.2.ebuild
blob582a6bd674f345a92f517df8235b4c07ae9b6d07
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI="1"
7 inherit elisp-common flag-o-matic eutils
9 DESCRIPTION="GNU Smalltalk"
10 HOMEPAGE="http://smalltalk.gnu.org"
11 SRC_URI="http://ftp.gnu.org/gnu/smalltalk/smalltalk-${PV}.tar.gz"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="emacs jit +gmp gtk preempt +readline tk"
17 DEPEND="sys-libs/gdbm
18 sys-apps/debianutils
19 dev-libs/libsigsegv
20 emacs? ( virtual/emacs )
21 readline? ( sys-libs/readline )
22 tk? ( dev-lang/tk )
23 gtk? ( x11-libs/gtk+:2 )
24 gmp? ( dev-libs/gmp )"
25 RDEPEND="${DEPEND}"
27 S="${WORKDIR}/smalltalk-${PV}"
29 SITEFILE=50gnu-smalltalk-gentoo.el
31 src_compile() {
32 replace-flags '-O3' '-O2'
33 econf --prefix=/usr \
34 $(use_with emacs emacs) \
35 $(use_with readline readline) \
36 $(use_with gmp gmp) \
37 $(use_with tk tcl /usr/lib) \
38 $(use_with tk tk /usr/lib) \
39 $(use_enable gtk gtk) \
40 $(use_enable jit jit) \
41 $(use_enable preempt preemption) || die "econf failed"
42 emake || die "emake failed"
43 use emacs && elisp-compile *.el
46 src_install() {
47 einstall prefix="${D}/usr" mandir="${D}/usr/share/man" \
48 infodir="${D}/usr/share/info" \
49 lispdir="${D}/usr/share/emacs/site-lisp/gnu-smalltalk" \
50 libdir="${D}/usr/lib" || die
51 # Remove libsigsegv
52 rm -rf "${D}/usr/include/sigsegv.h" \
53 "${D}/usr/include/snprintfv" \
54 "${D}/usr/share/aclocal/snprintfv.m4"
55 rm "${D}"/usr/lib/libsigsegv*
56 dodoc AUTHORS COPYING* ChangeLog NEWS README THANKS TODO
57 if use emacs; then
58 elisp-install "${PN}" *.{el,elc}
59 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
61 fperms 0444 /usr/share/smalltalk/packages.xml
64 pkg_postinst() {
65 use emacs && elisp-site-regen
68 pkg_postrm() {
69 use emacs && elisp-site-regen