summaryrefslogtreecommitdiff
blob: 4d38bd3b1403d3b816c68a88496476d661b7b404 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/aspell/aspell-0.33.7.1-r2.ebuild,v 1.4 2002/08/16 02:42:01 murphy Exp $

inherit libtool

MY_P=${PN}-.33.7.1
S=${WORKDIR}/${MY_P}
DESCRIPTION="A spell checker replacement for ispell"
SRC_URI="http://download.sourceforge.net/aspell/${MY_P}.tar.gz mirror://sourceforge/aspell/aspell-.33-fix2.diff"
HOMEPAGE="http://aspell.sourceforge.net"

DEPEND=">=app-text/pspell-0.12
	>=sys-libs/ncurses-5.2"

SLOT="0"
LICENSE="LGPL-2"
KEYWORDS="x86 ppc sparc sparc64"

#
# These flags a reset here because too much optimisation can cause aspell's
# compilation process to break.  Moreover, these must be set before ./configure
# otherwise it breaks again.  A very fragile build process, really.
#
CXXFLAGS="-O3"
CFLAGS=${CXXFLAGS}

# needed to compile

pkg_setup() {
	if [ -e /lib/libc-2.2.5.so ] && [ `gcc -dumpversion` == "2.95.3" ]; then
		if [ ! -f /etc/aspell/aspell.conf ]; then
			mkdir -p /etc/aspell
			touch /etc/aspell/aspell.conf
		fi
		if [ ! -f /root/.aspell.conf ]; then
			touch /root/.aspell.conf
		fi
	fi
}

src_unpack() {

	unpack ${MY_P}.tar.gz
	cd ${S}
	patch -p0 < ${DISTDIR}/aspell-.33-fix2.diff
}

src_compile() {
	# 
	# These two lines are here again to prevent breaking the compilation
	#
	elibtoolize

	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/aspell \
		--host=${CHOST} \
		--enable-doc-dir=/usr/share/doc/${P} || die
	
	# cp data/Makefile data/Makefile.orig
	# sed 's:aspell --lang=english:& --dict-dir=.:' \
	# 	data/Makefile.orig > data/Makefile
	
	emake || die

}

src_install () {

	make DESTDIR=${D} install || die
	cd ${D}/usr/share/doc/${P}
	dohtml -r man-html
	docinto text
	dodoc man-text
	cd ${S}
	
	dodoc README* TODO

}