summaryrefslogtreecommitdiff
blob: 73b6849dfa77ccbc87e8a2476b55142a0aa2c70a (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

DESCRIPTION="R language addon for postgresql database"
HOMEPAGE="http://www.joeconway.com/plr/"
SRC_URI="http://www.joeconway.com/plr/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="dev-lang/R
	>=dev-db/postgresql-8.3"
DEPEND="${RDEPEND}"

S=${WORKDIR}/contrib/${PN}

src_unpack() {
	unpack ${A}
	# the build system wants 'contrib' to be part of the path
	mkdir "${WORKDIR}/contrib"
	mv "${WORKDIR}/${PN}" "${S}"
}

src_compile() {
	USE_PGXS=1 emake -j1
}

src_install() {
	USE_PGXS=1 emake -j1 DESTDIR="${D}" install
}

pkg_postinst() {
	elog "PL/R has been built against the currently eselected version of PostgreSQL."
	ewarn "If you want to install PL/R for other versions of postgres, please use eselect"
	ewarn "to select the other version and then re-emerge this package."
	elog "For instructions on how to add PL/R to your postgresql database(s), please visit"
	elog "http://www.joeconway.com/plr/doc/plr-install.html"
}