]> Pileus Git - ~andy/sunrise/blob - dev-db/sql2class/sql2class-1.9.2.ebuild
dev-db/sql2class: Adding ~amd64 keyword
[~andy/sunrise] / dev-db / sql2class / sql2class-1.9.2.ebuild
1 # Copyright 1999-2012 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="~amd64 ~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=""
18
19 src_unpack() {
20         unpack ${A}
21         cd "${S}"
22
23         sed -i \
24                 -e 's/\(CPPFLAGS\) =/\1+=/' \
25                 -e 's/-Wall -O2 -g//' \
26                 -e 's#/usr/devel#/usr#' \
27                 -e 's/g++/$(CXX)/' \
28                 Makefile || die "sed failed"
29 }
30
31 src_compile() {
32         emake CXX="$(tc-getCXX)" || die "emake failed"
33 }
34
35 src_install() {
36         dobin sql2class
37         dodoc README
38 }
39
40 pkg_postinst() {
41         elog "You might want to emerge one of the following packages as well:"
42         elog "-> dev-db/mysqlwrapped ... to use the generated code with a MySQL-DB"
43         elog "-> dev-db/sqlitewrapped ... to use the generated code with SQLite"
44 }