blob: 50b3969a1744beec1d6624868122783ebcf225ba (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-0.2.96-r2.ebuild,v 1.6 2002/12/09 04:22:40 manson Exp $
IUSE="odbc postgres mysql"
S=${WORKDIR}/${P}
DESCRIPTION="gda lib"
SRC_URI="ftp://ftp.gnome-db.org/pub/gnome-db/sources/latest/${P}.tar.gz
ftp://ftp.gnome.org/pub/GNOME/stable/sources/${PN}/${P}.tar.gz"
HOMEPAGE="http://www.gnome.org/gnome-db"
SLOT="0"
LICENSE="GPL-2 LGPL-2"
KEYWORDS="x86 sparc ppc"
RDEPEND="virtual/glibc
>=gnome-base/gconf-1.0.4-r2
<gnome-base/gconf-1.1
>=gnome-base/oaf-0.6.6-r1
>=gnome-base/bonobo-1.0.9-r1
>=dev-libs/libxslt-1.0.1
>=sys-libs/gdbm-1.8.0
>=sys-libs/readline-4.1
>=dev-perl/CORBA-ORBit-0.4.3
>=dev-db/sqlite-2.0.8
mysql? ( >=dev-db/mysql-3.23.26 )
postgres? ( >=dev-db/postgresql-7.1 )
odbc? ( >=dev-db/unixODBC-2.0.6 )"
# ldap support is currently broken (this fixes bug #4019)
# ldap? ( >=net-nds/openldap-1.2.11 )"
# stroke@gentoo.org
DEPEND="${RDEPEND}
>=app-text/scrollkeeper-0.2-r3
sys-apps/which"
src_unpack() {
unpack ${A}
cd ${S}
patch -p1 < ${FILESDIR}/${P}-gentoo.patch || die "Patch for gcc-3.1 failed"
}
src_compile() {
local myconf
if [ "`use mysql`" ]
then
myconf="--with-mysql=/usr"
fi
# if [ "`use ldap`" ]
# then
# myconf="$myconf --with-ldap=/usr"
# fi
#
# LDAP support is currently broken
myconf="$myconf --without-ldap"
if [ "`use odbc`" ]
then
myconf="$myconf --with-odbc"
fi
if [ "`use postgres`" ]
then
myconf="$myconf --with-postgres=/usr"
fi
# Wierd one, it dont detect bonobo. If someone could have a look
# and fix if i havent gotten to it yet.
# myconf="$myconf --disable-bonobotest"
# Do not compile buildin sqlite
cp configure configure.orig
grep -v sqlite configure.orig >configure
chmod +x configure
./configure --host=${CHOST} \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/lib \
$myconf || die
# Build and use an external version of sqlite since some versions
# of libgda have a bug where the buildin do not compile.
# Also cant hurt to use the latest version of sqlite :)
mv ${S}/providers/gda-default-server/gda-default.h \
${S}/gda-default.h.orig
sed -e 's/\"build_sqlite\/sqlite\.h\"/<sqlite.h>/' \
${S}/gda-default.h.orig > \
${S}/providers/gda-default-server/gda-default.h || die
ln -s /usr/lib/libsqlite.a \
${S}/providers/gda-default-server/sqlite/libsqlite.a
mv providers/gda-default-server/Makefile \
providers/gda-default-server/Makefile.orig
grep -v '= sqlite' providers/gda-default-server/Makefile.orig > \
providers/gda-default-server/Makefile
# Doesn't work with -j 4 (hallski)
make LDFLAGS="-lncurses" LIBREADLINE="-lreadline -lncurses" || die
}
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 \
install || die
# Not needed as we build sqlite seperately
# dobin providers/gda-default-server/build_sqlite/{lemon,sqlite}
dodoc AUTHORS COPYING.* ChangeLog NEWS README
}
pkg_postinst() {
echo ">>> Updating Scrollkeeper database..."
scrollkeeper-update >/dev/null 2>&1
}
pkg_postrm() {
echo ">>> Updating Scrollkeeper database..."
scrollkeeper-update >/dev/null 2>&1
}
|