summaryrefslogtreecommitdiff
blob: 1951c495a882cf85dcf182a6779d01c8889139ec (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/gforth/gforth-0.6.1.ebuild,v 1.4 2004/03/14 02:29:17 mr_bones_ Exp $

IUSE="emacs"

inherit elisp

DESCRIPTION="GNU Forth is a fast and portable implementation of the ANSI Forth language"
HOMEPAGE="http://www.gnu.org/software/gforth"
SRC_URI="http://www.complang.tuwien.ac.at/forth/gforth/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

DEPEND="virtual/glibc
	emacs? ( virtual/emacs )"

SITEFILE=50gforth-gentoo.el

src_unpack() {
	unpack ${A}
	cd ${S} && patch -p0 <${FILESDIR}/gforth.el-gentoo.patch || die
}

src_compile() {
	econf --enable-force-reg --without-debug || die "./configure failed"
	make XCFLAGS="" ENGINE_FLAGS="" || die

	use emacs && emacs --batch -f batch-byte-compile --no-site-file --no-init-file *.el
}

src_install () {
	make install libdir=${D}/usr/lib \
		infodir=${D}/usr/share/info \
		mandir=${D}/usr/share/man \
		datadir=${D}/usr/share \
		bindir=${D}/usr/bin \
		install || die

	dodoc AUTHORS BUGS COPYING* ChangeLog NEWS* README* ToDo doc/glossaries.doc doc/*.ps

	if use emacs
	then
		elisp-install ${PN} *.el *.elc
		elisp-site-file-install ${FILESDIR}/${SITEFILE}
	fi
}

pkg_postinst() {
	use emacs && elisp-site-regen
}

pkg_postrm() {
	use emacs && elisp-site-regen
}