summaryrefslogtreecommitdiff
blob: 11823f9c19726c31d059c93ec504235b4889c67a (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/libpqpp/libpqpp-4.0-r1.ebuild,v 1.6 2004/06/29 14:58:06 agriffis Exp $

inherit eutils

DESCRIPTION="C++ wrapper for the libpq Postgresql library"
HOMEPAGE="http://gborg.postgresql.org/"
SRC_URI="ftp://gborg.postgresql.org/pub/libpqpp/stable/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="x86"
IUSE=""

DEPEND="virtual/libc
	>=sys-apps/sed-4"
RDEPEND=">=dev-db/postgresql-7.3"

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${PN}-gentoo.patch
}

src_compile() {
	sed -i \
		-e "s|^POSTGRES_HOME=/usr/local/pgsql$|POSTGRES_HOME=/usr|g" \
		Makefile
	emake || die "first"
	sed -i \
		-e "s|^POSTGRES_HOME=/usr$|POSTGRES_HOME=\${D}usr|g" \
		-e "s|^\tln -s .*$|\tln -s \$(soname) \$(POSTGRES_HOME)/lib/\$(TARGET).so|g" \
		Makefile
	emake || die "second"
}

src_install() {
	dodir /usr/lib /usr/include
	einstall install || die "Install failed"
}