summaryrefslogtreecommitdiff
blob: 237840f578df52a147fe1acef00cff026b4dc704 (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
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-0.8.192.ebuild,v 1.9 2003/02/13 12:21:54 vapier Exp $

IUSE="sqlite oci8 odbc postgres mysql"

inherit gnome2

S=${WORKDIR}/${P}
DESCRIPTION="gda library"
SRC_URI="ftp://ftp.gnome-db.org/pub/gnome-db/sources/v0.8.192/${P}.tar.gz
	 ftp://ftp.gnome.org/pub/gnome/2.0.0/sources/${PN}/${P}.tar.gz"
HOMEPAGE="http://www.gnome.org/gnome-db"
SLOT="0"
LICENSE="GPL-2 LGPL-2"
KEYWORDS="x86 sparc  ppc"

DEPEND=">=dev-libs/glib-2.0.4
	>=dev-libs/libxml2-2.4.23
	>=gnome-base/oaf-0.6.8
	>=gnome-base/gconf-1.2.0
	>=dev-libs/libxslt-1.0.19
	>=dev-libs/popt-1.6.3
	>=sys-libs/zlib-1.1.4
	mysql? ( >=dev-db/mysql-3.23.51 )
	postgres? ( >=dev-db/postgresql-7.2.1 )
	odbc? ( >=dev-db/unixODBC-2.0.6 )
	sqlite? ( >=dev-db/sqlite-2.4.2 )"

src_compile() {

	local myconf 

	if [ "`use mysql`" ]
	then
		myconf="--with-mysql=/usr"
	else
		myconf="--without-mysql"
	fi

  	if [ "`use postgres`" ]
	then
    		myconf="$myconf --with-postgres=/usr"
	else
		myconf="$myconf --without-postgres"
  	fi

  	if [ "`use odbc`" ]
	then
    		myconf="$myconf --with-odbc"
	else
		myconf="$myconf --without-odbc"
  	fi

	if [ "`use sqlite`" ]
	then
		myconf="$myconf --with-sqlite=/usr"
	else
		myconf="$myconf --without-sqlite"
	fi

	if [ !"`use oci8`" ]
	then
	    myconf="$myconf --without-oracle"
    fi

	econf $myconf || die "configure failed"

	# Doesn't work with -j 4 (hallski)
	make LDFLAGS="-lncurses" LIBREADLINE="-lreadline -lncurses" \
		|| die "make failed"
}

src_install() {

	cd ${S}/doc
	cp Makefile Makefile.old
	sed -e "s:scrollkeeper-update.*::g" Makefile.old > Makefile
	rm Makefile.old
	cd ${S}

	make  prefix=${D}/usr \
	      sysconfdir=${D}/etc \
	      localstatedir=${D}/var/lib \
	      INSTALLMAN3DIR=${D}/usr/share/man/man3 \
	      GDA_oafinfodir=${D}/usr/share/oaf \
              idldir=${D}/usr/share/idl/libgda \
              dtddir=${D}/usr/share/libgda/dtd \
              datadir=${D}/usr/share \
	      install || die

	dodoc AUTHORS COPYING.* ChangeLog NEWS README
}