summaryrefslogtreecommitdiff
blob: 5394f0ed9221bc69de2fa3d1a871933a176f40ab (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/gnucash/gnucash-1.6.8.ebuild,v 1.6 2003/03/04 00:38:07 foser Exp $

inherit flag-o-matic

DESCRIPTION="A personal finance manager"
SRC_URI="http://download.sourceforge.net/${PN}/${P}.tar.gz"
HOMEPAGE="http://www.gnucash.org/"

KEYWORDS="x86 ppc"
SLOT="0"
LICENSE="GPL-2"
IUSE="nls postgres"

RDEPEND=">=gnome-base/gnome-libs-1.4.1.2-r1
	 >=dev-libs/libxml-1.8.3
	 >=gnome-extra/gtkhtml-0.14.0-r1
	 >=gnome-extra/gal-0.13-r1
	 >=gnome-extra/guppi-0.35.5-r2
	 >=gnome-base/gnome-print-0.21
	 postgres? ( dev-db/postgresql )"
DEPEND="${RDEPEND}
	>=sys-devel/perl-5
	>=dev-libs/slib-2.3.8
	>=dev-lang/swig-1.3_alpha4
	>=dev-libs/g-wrap-1.1.5
	<gnome-base/libglade-2
	media-libs/gdk-pixbuf
	<dev-util/guile-1.4.1
	gnome-base/libghttp
	nls? ( sys-devel/gettext )"

# won't configure with this
filter-flags -fomit-frame-pointer
# gnucash seems to have problems with opts (#14808)
strip-flags
filter-flag "-O3" "-O2"

src_unpack() {
	unpack ${A}

	cd ${S}/src/guile
	cp argv-list-converters.c argv-list-converters.c.old
	sed -e "s,printf,g_print,g" \
		argv-list-converters.c.old > argv-list-converters.c
	rm argv-list-converters.c.old

	# With --enable-sql (use postgres), the gnucash 1.6.8 build process fails
	# when making in src/engine.  This should fix that.  --Chouser
	cd ${S}/src/engine || die
	cp Makefile.am Makefile.am.old
	sed -e 's/^SUBDIRS *= */&. /' Makefile.am.old > Makefile.am || die
	cd ${S}
	automake || die
}

src_compile() {
	local myconf=""

	use nls      || myconf="--disable-nls"
	use postgres && myconf="$myconf --enable-sql"

	econf --enable-rpc ${myconf}

	make || die # Doesn't work with make -j 4 (hallski)
}

src_install() {
	einstall
	dodoc ABOUT-NLS AUTHORS COPYING ChangeLog HACKING NEWS README* TODO
}