diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-19 14:07:55 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-19 14:07:55 +0000 |
commit | d725480af7cbc67d784e5d96f973fa41e9030123 (patch) | |
tree | 620bbc21e2e1384f13394c32a7294bc1c0e8bae1 /dev-db/plr/plr-8.4.6.ebuild | |
parent | 0184387f6a748c74c5d29cddf20289dc94f05ddc (diff) |
gentoo auto-resync : 19:01:2024 - 14:07:55
Diffstat (limited to 'dev-db/plr/plr-8.4.6.ebuild')
-rw-r--r-- | dev-db/plr/plr-8.4.6.ebuild | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/dev-db/plr/plr-8.4.6.ebuild b/dev-db/plr/plr-8.4.6.ebuild new file mode 100644 index 000000000000..bb10bae54f14 --- /dev/null +++ b/dev-db/plr/plr-8.4.6.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +POSTGRES_COMPAT=( {12..16} ) +POSTGRES_USEDEP="server" + +inherit postgres-multi + +DESCRIPTION="R language extension for postgresql database" +HOMEPAGE="http://www.joeconway.com/plr/" +SRC_URI="https://github.com/postgres-plr/plr/archive/REL${PV//./_}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="dev-lang/R + ${POSTGRES_DEP}" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +REQUIRED_USE="${POSTGRES_REQ_USE}" + +S="${WORKDIR}"/contrib/${PN} + +src_unpack() { + unpack ${A} + + # the build system wants 'contrib' to be part of the path + mkdir -p "${WORKDIR}/contrib" || die + mv "${WORKDIR}/${PN}-REL${PV//./_}" "${S}" || die +} + +src_prepare() { + local BUILD_DIR="${S}" + postgres-multi_src_prepare +} + +src_compile() { + pg_src_compile() { + cd "${BUILD_DIR}" + PG_CONFIG="${ESYSROOT}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \ + USE_PGXS=1 \ + emake -j1 + } + postgres-multi_foreach pg_src_compile +} + +src_install() { + pg_src_install() { + cd "${BUILD_DIR}" + PG_CONFIG="${ESYSROOT}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \ + USE_PGXS=1 \ + emake -j1 DESTDIR="${D}" install + } + postgres-multi_foreach pg_src_install +} + +pkg_postinst() { + elog "The plr extension needs to be explicitly added (or 'created') on each database" + elog "you wish to use it with. As of postgresql-9.1 the easiest way to do this is" + elog "with the proprietary SQL statement:" + elog + elog "\tCREATE EXTENSION plr;" + elog + elog "For more info on how to add PL/R to your postgresql database(s), please visit" + elog "http://www.joeconway.com/doc/plr-install.html" +} |