]> Pileus Git - ~andy/sunrise/blob - dev-db/sql2class/sql2class-1.9.2.ebuild
dev-db/sql2class: Version bump.
[~andy/sunrise] / dev-db / sql2class / sql2class-1.9.2.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils toolchain-funcs
6
7 KEYWORDS="~x86"
8
9 DESCRIPTION="SQL C++ code generator (to use with dev-db/*wrapped packages)"
10 HOMEPAGE="http://www.alhem.net/project/sql2class/index.html"
11 SRC_URI="http://www.alhem.net/project/sql2class/${P}.tar.gz"
12 LICENSE="GPL-2"
13 SLOT="0"
14 IUSE="mysql sqlite"
15
16 DEPEND=""
17 RDEPEND="mysql? ( dev-db/mysqlwrapped )
18                 sqlite? ( dev-db/sqlitewrapped )"
19
20 src_unpack() {
21         unpack ${A}
22         cd "${S}"
23
24         sed -i \
25                 -e 's/\(CPPFLAGS\) =/\1+=/' \
26                 -e 's/-Wall -O2 -g//' \
27                 -e 's#/usr/devel#/usr#' \
28                 -e 's/g++/$(CXX)/' \
29                 Makefile || die "sed failed"
30 }
31
32 src_compile() {
33         emake CXX=$(tc-getCXX) || die "emake failed"
34 }
35
36 src_install() {
37         dobin sql2class
38         dodoc README
39 }
40
41 pkg_postinst() {
42         elog "You might want to emerge one of the following packages as well:"
43         elog "-> dev-db/mysqlwrapped ... to use the generated code with a MySQL-DB"
44         elog "-> dev-db/sqlitewrapped ... to use the generated code with SQLite"
45 }