aboutsummaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2024-04-05 17:41:32 -0400
committerJulien Roy <julien@jroy.ca>2024-04-05 17:41:32 -0400
commit4435babc4209a9564bd88c180e4b0b0cfdc8bdc3 (patch)
tree7482c4dc0c6730aae20cdba81404ae83188e991a /dev-db
parentmail-client/proton-mail-bin: new package, add 5.0.108.1 (diff)
downloadguru-4435babc4209a9564bd88c180e4b0b0cfdc8bdc3.tar.gz
guru-4435babc4209a9564bd88c180e4b0b0cfdc8bdc3.tar.bz2
guru-4435babc4209a9564bd88c180e4b0b0cfdc8bdc3.zip
dev-db/libpg_query: new package, add 5.1.0
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/libpg_query/Manifest1
-rw-r--r--dev-db/libpg_query/libpg_query-5.1.0.ebuild38
-rw-r--r--dev-db/libpg_query/metadata.xml25
3 files changed, 64 insertions, 0 deletions
diff --git a/dev-db/libpg_query/Manifest b/dev-db/libpg_query/Manifest
new file mode 100644
index 0000000000..c9fff90e81
--- /dev/null
+++ b/dev-db/libpg_query/Manifest
@@ -0,0 +1 @@
+DIST libpg_query-5.1.0.gh.tar.gz 4296325 BLAKE2B 0f4e80b7ad18462cdcfe8feb6fb8ddf17b0c90f96e6951d46103a1e6c5110e4a383a4742b38b3b3e1eea0fad9a1107cc1a69b296cd0890f342be8e89304d2856 SHA512 01b03c51f19bed427d1e3c0eecfe1ad8af0fcbce175e08b3fc53ba2a2cac396b85db9bc294e01ca7d0b3032d4fd966d95b3771d8133bb71fe3578a7beb6c587d
diff --git a/dev-db/libpg_query/libpg_query-5.1.0.ebuild b/dev-db/libpg_query/libpg_query-5.1.0.ebuild
new file mode 100644
index 0000000000..e7b7ac52cb
--- /dev/null
+++ b/dev-db/libpg_query/libpg_query-5.1.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PG_TARGET="16"
+MY_PV="${PG_TARGET}-${PV}"
+DESCRIPTION="C library for accessing the PostgreSQL parser outside of the server environment"
+HOMEPAGE="https://github.com/pganalyze/libpg_query"
+SRC_URI="https://github.com/pganalyze/libpg_query/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="BSD"
+SLOT="0/${PG_TARGET}"
+KEYWORDS="~amd64"
+IUSE="examples"
+
+BDEPEND="
+ dev-libs/protobuf-c
+ dev-libs/xxhash
+"
+
+src_compile() {
+ emake build
+ emake build_shared
+ use examples && emake examples
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake \
+ prefix="${ED}"/usr \
+ libdir="${ED}/usr/$(get_libdir)" \
+ install
+}
diff --git a/dev-db/libpg_query/metadata.xml b/dev-db/libpg_query/metadata.xml
new file mode 100644
index 0000000000..8e2177fbb5
--- /dev/null
+++ b/dev-db/libpg_query/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Julien Roy</name>
+ <email>julien@jroy.ca</email>
+ </maintainer>
+ <longdescription>
+C library for accessing the PostgreSQL parser outside of the server.
+
+This library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.
+
+Note that this is mostly intended as a base library for pg_query (Ruby), pg_query.go (Go), pgsql-parser (Node), psqlparse (Python) and pglast (Python 3).
+
+You can find further background to why a query's parse tree is useful here: https://pganalyze.com/blog/parse-postgresql-queries-in-ruby.html
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/pganalyze/libpg_query/issues</bugs-to>
+ <changelog>https://github.com/pganalyze/libpg_query/releases</changelog>
+ <remote-id type="github">pganalyze/libpg_query</remote-id>
+ </upstream>
+ <slots>
+ <subslots>dev-db/postgresql target version</subslots>
+ </slots>
+</pkgmetadata>