Gentoo Archives: gentoo-commits

From: "罗百科" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/plr/
Date: Sun, 27 Sep 2020 10:57:00
Message-Id: 1601204210.6e5293f1f31dc213a280a125ebc3babc6fd0e859.patrick@gentoo
1 commit: 6e5293f1f31dc213a280a125ebc3babc6fd0e859
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 27 10:56:36 2020 +0000
4 Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 27 10:56:50 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e5293f1
7
8 dev-db/plr: Bump, add more postgres targets
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
12
13 dev-db/plr/Manifest | 1 +
14 dev-db/plr/plr-8.4.1.ebuild | 69 +++++++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 70 insertions(+)
16
17 diff --git a/dev-db/plr/Manifest b/dev-db/plr/Manifest
18 index afd497d93f1..92687bf21aa 100644
19 --- a/dev-db/plr/Manifest
20 +++ b/dev-db/plr/Manifest
21 @@ -1 +1,2 @@
22 DIST plr-8.3.0.17.tar.gz 74017 BLAKE2B 314b4cfa2c3ca8ed31e80a72233a6dc8cdb9f3811dad6e9f3eb5147c17cdf5a039436598b0fc2b30c6702b02dd3cb2da33543764aee3199c6864aae22be875ce SHA512 d7080c62349d1dcdd17008a7be3643b54678e0f66bf721068df73057394496d025c4fe01e52945c3acf9cc21eb90241512667772ef3fe519a3c9081efe92dd40
23 +DIST plr-8.4.1.tar.gz 265142 BLAKE2B 859913ba14d3e6876eb5a3d7593346b98ab2e1b6c70d9fd9cc7e1810fe11ecb3c552305485735cf975cc41ce2de6cbd7bcf407c9e373fc4024230be797c9899a SHA512 0db407355271009bad95c21f81e544839322f0fa0a63d2abd8edbf9eab8f61e208a3e4f7083729cc8247411885197ff3569c88264db0a29b34523dc83bbed7ec
24
25 diff --git a/dev-db/plr/plr-8.4.1.ebuild b/dev-db/plr/plr-8.4.1.ebuild
26 new file mode 100644
27 index 00000000000..b78d06bcddf
28 --- /dev/null
29 +++ b/dev-db/plr/plr-8.4.1.ebuild
30 @@ -0,0 +1,69 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +POSTGRES_COMPAT=( 9.{5..6} {10..13} )
37 +POSTGRES_USEDEP="server"
38 +
39 +inherit postgres-multi
40 +
41 +DESCRIPTION="R language extension for postgresql database"
42 +HOMEPAGE="http://www.joeconway.com/plr/"
43 +SRC_URI="https://github.com/postgres-plr/plr/archive/REL${PV//./_}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64"
48 +
49 +RDEPEND="dev-lang/R
50 + ${POSTGRES_DEP}"
51 +DEPEND="${RDEPEND}
52 + virtual/pkgconfig"
53 +
54 +REQUIRED_USE="${POSTGRES_REQ_USE}"
55 +
56 +S=${WORKDIR}/contrib/${PN}
57 +
58 +src_unpack() {
59 + unpack ${A}
60 + # the build system wants 'contrib' to be part of the path
61 + mkdir -p "${WORKDIR}/contrib"
62 + mv "${WORKDIR}/${PN}-REL${PV//./_}" "${S}"
63 +}
64 +
65 +src_prepare() {
66 + local BUILD_DIR="${S}"
67 + postgres-multi_src_prepare
68 +}
69 +
70 +src_compile() {
71 + pg_src_compile() {
72 + cd "${BUILD_DIR}"
73 + PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \
74 + USE_PGXS=1 \
75 + emake -j1
76 + }
77 + postgres-multi_foreach pg_src_compile
78 +}
79 +
80 +src_install() {
81 + pg_src_install() {
82 + cd "${BUILD_DIR}"
83 + PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \
84 + USE_PGXS=1 \
85 + emake -j1 DESTDIR="${D}" install
86 + }
87 + postgres-multi_foreach pg_src_install
88 +}
89 +
90 +pkg_postinst() {
91 + elog "The plr extension needs to be explicitly added (or 'created') on each database"
92 + elog "you wish to use it with. As of postgresql-9.1 the easiest way to do this is"
93 + elog "with the proprietary SQL statement:"
94 + elog
95 + elog "\tCREATE EXTENSION plr;"
96 + elog
97 + elog "For more info on how to add PL/R to your postgresql database(s), please visit"
98 + elog "http://www.joeconway.com/doc/plr-install.html"
99 +}