From 5087f37a4d9063896fce9cf625aa2479bc540b94 Mon Sep 17 00:00:00 2001 From: Crucible Date: Thu, 15 Oct 2026 17:23:01 -0500 Subject: Publish srcux candidate 0000000660-20261015-172104 --- dev-db/postgresql/Manifest | 2 +- dev-db/postgresql/postgresql-19_beta4.ebuild | 479 --------------------------- dev-db/postgresql/postgresql-19_rc1.ebuild | 479 +++++++++++++++++++++++++++ dev-db/turso/Manifest | 4 +- dev-db/turso/turso-0.4.3-r1.ebuild | 75 ----- dev-db/turso/turso-0.8.2.ebuild | 75 +++++ 6 files changed, 557 insertions(+), 557 deletions(-) delete mode 100644 dev-db/postgresql/postgresql-19_beta4.ebuild create mode 100644 dev-db/postgresql/postgresql-19_rc1.ebuild delete mode 100644 dev-db/turso/turso-0.4.3-r1.ebuild create mode 100644 dev-db/turso/turso-0.8.2.ebuild (limited to 'dev-db') diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest index e42e3e4ae28a..40ead8e1caef 100644 --- a/dev-db/postgresql/Manifest +++ b/dev-db/postgresql/Manifest @@ -3,4 +3,4 @@ DIST postgresql-15.19.tar.bz2 23452545 BLAKE2B 25c9e7e11f298f73482182202c61dec8d DIST postgresql-16.15.tar.bz2 25181309 BLAKE2B 36d2c2cdcdac4e562664840995f7345567e5548142b809cc540de9d2d7cfc88659b02372e1b80e7bb0503fcaa10b3a95e2677438f60040c6474aa77ee3c4be9d SHA512 093dd8b8968560b4dc7cef670dcb9d2eaa54befc835b5c631714003525e58f0362fabebef5a996a3c70ad69b9c5c62d8210f3debac7d90b22df4186814c0151f DIST postgresql-17.11.tar.bz2 21787224 BLAKE2B 00904ef605eb119999829c100ebaaf728b8c4405b97782ab97718f30c93b2f5d1dfb8895db962ff12c3b2f690220f57b156bb22e02374490145640e97c15b6a0 SHA512 caf6acf22d21856d95899cf6f2b7bd2ad8018e6d32d59fe28b3010edb1faf259124fee4a163f8d0a9e5307e12b98287266e040ff6cfc0b1f60e65b96e10458b2 DIST postgresql-18.6.tar.bz2 22632314 BLAKE2B 657fd161eb581608cf73f6f649b6a35dbf034ff64c578c17f94d49c72ac9cd8ea7280425dd24ba4d7550c044bfebe78f0ebc534a1df4cfe2b634a6e4f765aa51 SHA512 5855d11be61a594e4dcdfa4ab4de1432caa86a8d50e1b1334ea2989439b46139612c53d00ba6330cba4d7d8b78a9e2176e1a2b6c5454814b5fa49dd54de72eb1 -DIST postgresql-19beta4.tar.bz2 23559888 BLAKE2B 1cf487070441bb15f28a4e1dc94f8e6a1c8be69b4084a36f6f480627acca85707d3b3b5554bf6f3ab3cc928985205a3e9d4eacd53314ca0f5bab3f95f726a171 SHA512 45b9941b3c434bd7f0ba7060726d7dcbf9715c3f4a2b3e551f8033312eb6d799be3924badc53e57f56d613e29909e15380fe7a315b53fb7394c7b5a3b1d8bc21 +DIST postgresql-19rc1.tar.bz2 23831435 BLAKE2B 41e04b6aae897fc74d01a71d8244c01e8deeaa307c69ff4ac7bfa56de8657b037a6ef500144a071ccb43b0dd1af27636e6e233826129dbfd053fb78b8ba6b089 SHA512 dc71c30d1604dd952586b5aab90b58f119fdd3423c1ee6e113ab53ede28fa7ff4006bc0e120c61569b28aa83e0bb9851e6b205215872f20c3d34dc41109d92aa diff --git a/dev-db/postgresql/postgresql-19_beta4.ebuild b/dev-db/postgresql/postgresql-19_beta4.ebuild deleted file mode 100644 index ba0f0351ab95..000000000000 --- a/dev-db/postgresql/postgresql-19_beta4.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{13..14} ) -LLVM_COMPAT=( {16..23} ) -LLVM_OPTIONAL=1 - -inherit dot-a flag-o-matic linux-info llvm-r2 pam python-single-r1 systemd tmpfiles - -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -MY_PV=${PV/_/} -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" -S="${WORKDIR}/${PN}-${MY_PV}" -LICENSE="POSTGRESQL GPL-2" -SLOT=$(ver_cut 1) - -KEYWORDS="" - -IUSE="debug doc +icu kerberos ldap llvm +numa nls oauth pam perl python - +readline selinux +server systemd ssl static-libs tcl uuid +uring - xml zlib +zstd" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -acct-group/postgres -acct-user/postgres -app-arch/lz4 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( app-crypt/mit-krb5 ) -ldap? ( net-nds/openldap:= ) -llvm? ( $(llvm_gen_dep ' - llvm-core/clang:${LLVM_SLOT} - llvm-core/llvm:${LLVM_SLOT} - ') ) -numa? ( sys-process/numactl ) -oauth? ( net-misc/curl[adns] ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) -tcl? ( >=dev-lang/tcl-8:0= ) -uring? ( sys-libs/liburing ) -xml? ( dev-libs/libxml2:= dev-libs/libxslt ) -zlib? ( virtual/zlib:= ) -zstd? ( app-arch/zstd ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -sys-devel/bison -app-alternatives/lex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -selinux? ( sec-policy/selinux-postgresql ) -" - -# Docbook, XML, and XSLT are needed to generate manpages and -# any documentation that may be elected. -BDEPEND=" -app-text/docbook-dsssl-stylesheets -app-text/docbook-sgml-dtd:4.5 -app-text/docbook-xml-dtd:4.5 -app-text/docbook-xsl-stylesheets -dev-libs/libxml2 -dev-libs/libxslt -" - -pkg_setup() { - use llvm && llvm-r2_pkg_setup - - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-18.0-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - default - eapply_user -} - -src_configure() { - lto-guarantee-fat - - # Fails to build with C23, fallback to the old default in < GCC 15 - # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2 - append-cflags -std=gnu17 - - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - local myconf="\ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - --with-lz4 \ - $(use_enable debug) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with numa libnuma) \ - $(use_with oauth libcurl) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - $(use_with uring liburing) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_with zstd) \ - $(use_enable nls)" - - econf ${myconf} -} - -src_compile() { - emake - emake -C contrib - emake -C doc -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc HISTORY - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - strip-lto-bytecode "${ED}" - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set - # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. - local old_ctype=${LC_CTYPE} - export LC_CTYPE=${LC_COLLATE} - emake check - export LC_CTYPE=${old_ctype} - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-19_rc1.ebuild b/dev-db/postgresql/postgresql-19_rc1.ebuild new file mode 100644 index 000000000000..ba0f0351ab95 --- /dev/null +++ b/dev-db/postgresql/postgresql-19_rc1.ebuild @@ -0,0 +1,479 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +LLVM_COMPAT=( {16..23} ) +LLVM_OPTIONAL=1 + +inherit dot-a flag-o-matic linux-info llvm-r2 pam python-single-r1 systemd tmpfiles + +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="https://www.postgresql.org/" + +MY_PV=${PV/_/} +SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" +S="${WORKDIR}/${PN}-${MY_PV}" +LICENSE="POSTGRESQL GPL-2" +SLOT=$(ver_cut 1) + +KEYWORDS="" + +IUSE="debug doc +icu kerberos ldap llvm +numa nls oauth pam perl python + +readline selinux +server systemd ssl static-libs tcl uuid +uring + xml zlib +zstd" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" +>=app-eselect/eselect-postgresql-2.0 +acct-group/postgres +acct-user/postgres +app-arch/lz4 +sys-apps/less +virtual/libintl +icu? ( dev-libs/icu:= ) +kerberos? ( app-crypt/mit-krb5 ) +ldap? ( net-nds/openldap:= ) +llvm? ( $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') ) +numa? ( sys-process/numactl ) +oauth? ( net-misc/curl[adns] ) +pam? ( sys-libs/pam ) +perl? ( >=dev-lang/perl-5.8:= ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +server? ( systemd? ( sys-apps/systemd ) ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uring? ( sys-libs/liburing ) +xml? ( dev-libs/libxml2:= dev-libs/libxslt ) +zlib? ( virtual/zlib:= ) +zstd? ( app-arch/zstd ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +sys-devel/bison +app-alternatives/lex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +selinux? ( sec-policy/selinux-postgresql ) +" + +# Docbook, XML, and XSLT are needed to generate manpages and +# any documentation that may be elected. +BDEPEND=" +app-text/docbook-dsssl-stylesheets +app-text/docbook-sgml-dtd:4.5 +app-text/docbook-xml-dtd:4.5 +app-text/docbook-xsl-stylesheets +dev-libs/libxml2 +dev-libs/libxslt +" + +pkg_setup() { + use llvm && llvm-r2_pkg_setup + + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + # Rely on $PATH being in the proper order so that the correct + # install program is used for modules utilizing PGXS in both + # hardened and non-hardened environments. (Bug #528786) + sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die + + use server || eapply "${FILESDIR}/${PN}-18.0-no-server.patch" + + if use pam ; then + sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + default + eapply_user +} + +src_configure() { + lto-guarantee-fat + + # Fails to build with C23, fallback to the old default in < GCC 15 + # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2 + append-cflags -std=gnu17 + + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + local myconf="\ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + --with-lz4 \ + $(use_enable debug) \ + $(use_with icu) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with llvm) \ + $(use_with numa libnuma) \ + $(use_with oauth libcurl) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ + $(use_with tcl) \ + $(use_with uring liburing) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + $(use_with zstd) \ + $(use_enable nls)" + + econf ${myconf} +} + +src_compile() { + emake + emake -C contrib + emake -C doc +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc HISTORY + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + serverman=( + initdb + pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} + pg_{test_{fsync,timing},upgrade,waldump} + post{gres,master} + ) + for m in ${serverman[@]} ; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + # Create slot specific man pages + local bn f mansec slotted_name + for mansec in 1 3 7 ; do + local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" + + mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" + pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ + -delete + strip-lto-bytecode "${ED}" + + # Make slot specific links to programs + local f bn + for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ + -mindepth 1 -maxdepth 1) + do + bn=$(basename "${f}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service-9.6-r1" | \ + systemd_newunit - ${PN}-${SLOT}.service + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + fi + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + + if [[ -n ${REPLACING_VERSIONS} ]] ; then + ewarn "If your system is using 'pg_stat_statements' and you are running a" + ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" + ewarn "the following command after upgrading:" + ewarn + ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" + fi + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" + mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" + chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + if use server && [[ ${UID} -ne 0 ]] ; then + # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set + # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. + local old_ctype=${LC_CTYPE} + export LC_CTYPE=${LC_COLLATE} + emake check + export LC_CTYPE=${old_ctype} + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/turso/Manifest b/dev-db/turso/Manifest index fcddc8f8f73c..6d6fb8927419 100644 --- a/dev-db/turso/Manifest +++ b/dev-db/turso/Manifest @@ -1,7 +1,7 @@ DIST syntect-64644ffe064457265cbcee12a0c1baf9485ba6ee.gh.tar.gz 957024 BLAKE2B 46a84baedfc9923e4be3f70caa5f32d197659afe5a1c018fe03a473e175c56d60a321ca0378b52173076ff89df365f845d8d23997eaef6bf8082634497fbd031 SHA512 f6a4bd70e294046953923052734f8021ea64a7ef83965dcc13ba60f96fea6d4ad21c68bde71eb245cfd00d080f3decf9911eed85ad360b8d5185e0d018811f97 -DIST turso-0.4.3-crates.tar.xz 35783112 BLAKE2B 4a3e09dad6f4a745cd53f075ba240c8edecedde81c0ab31908baae548bbc59c09a93b250cabee1e9f1e00b05c54dd98653d5a949568b89689fd534c1ae488c44 SHA512 1aa25d89e0626639a53cfbd0f8671548eb2ad2ffd0271b7510fc932adbbf5f124ce9515321b700738eaa5fbb84fcf9392bfe396175efa229224c13289a7653d0 -DIST turso-0.4.3.tar.gz 10390925 BLAKE2B 9492c23b2c0d8a1b1df74c506904ad12f7025ce452494d18d4aa9566758763b7d18997dd9df623d3f6e7ac207ba7e4b7ec8cab9f615f79041436225ba57a3db3 SHA512 6703be79b3aa7cf987f1555d86a20c0a94bc3fe4b4a6ff3d794063286c9fb3dd44e46232b3c03b47b8425b929d65cd69fec8f2437b41b67366ccaa42978f7bd5 DIST turso-0.4.4-crates.tar.xz 35793496 BLAKE2B 370e8ba8a4aaeb9192b88f0ef5132b83c0c3ca9a23a18694940832a954189d706abb178df097694b5de4aa3d31e477366c5d0173b0b028ff01df243718160c93 SHA512 d14f6beccdb7ff5177cc76499f5f2c5d4cc7bc59bf79c25296e118a80eb903156cdd4ea40a30bbfe7bf09fb451775fc5e755a2a1a189b825cbf498868645cd25 DIST turso-0.4.4.tar.gz 10396585 BLAKE2B 59dd725764ebbdc84095bf3a667fa7346c4d4fadf7a897a4b960fc913545c1ac3fd6002ca8bac29f3cbc0d8f97b17aa39747cdf548ad789434f60889025b442f SHA512 92df963ab4ac71d89b36f565c2adca550d9306095f2f8736f8a368f7ec9fc1162bdac798a8490667a9ad22159dcc71c83f73f453904358891e8091c18bae2a2f DIST turso-0.6.0-crates.tar.xz 45926300 BLAKE2B cd05c5a0f7cd75a8a44052fddcd891c40df6650c4067cd1fe23e3fb9b53148e9db9eee3975197d78199765ac60435142dd14849eb1571686105bd9b9109c5acd SHA512 7b8b4e58734b6f9996a6f5faae2cc337a49166756464f4914bbfdc3ac89337dfc5931adbc307b6dcd197b016558083a356bab405c1fca6ad2102563990da88b5 DIST turso-0.6.0.tar.gz 10975048 BLAKE2B bffc08146c5b69da1e62741bf276bee1932c842cb36b90ceabcf2f97c66bbea63aa4922c0ae4f5cc1b3614fbdb518de1a0fe2265b92c07833b8e9668b584d9b5 SHA512 08a5ced4e7123ac5a30cbd88d6c02633d9b149ef7a224868213f9a7d25313bf1ef4c0c198180324e34c317b89f4180cf26c2a6905df1e751e7293612ae2d32eb +DIST turso-0.8.2-crates.tar.xz 51450472 BLAKE2B 97a0d2d80d91c43bfc35132fea6225559268d1a9c0fea242afacb55511812814d1828345f67150fdb62db8e769959e247eeaf9521f4f97cf2b8e035430d2fed1 SHA512 e791c88e418f87332972128fa06987182d448aa54bbd5a5f2bece5b1844c2fe7398a5cc74367fa8f679c4a06d07cbc7e76ecbbaa5401f9b39202cb5fd3e31ca3 +DIST turso-0.8.2.tar.gz 16798917 BLAKE2B b68938ef56e7c407d8daa58e0f11c9cada75d9666d112c8b8cafb5fd2035ca92eaa71d51105473e0aa0711bfc5626fca8026287a89ffc37947a2c9027d325ba2 SHA512 e4a8a005e82b316553eec00edba9392724a6dd640e2a654fe86861d0826c88bed1cec97bcf0e5674d4347d2b779782b397ac08ba3679586978f0b0629c932f0f diff --git a/dev-db/turso/turso-0.4.3-r1.ebuild b/dev-db/turso/turso-0.4.3-r1.ebuild deleted file mode 100644 index df8dad87861e..000000000000 --- a/dev-db/turso/turso-0.4.3-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2024-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -RUST_MIN_VER="1.85.0" - -declare -A GIT_CRATES=( - [syntect]="https://github.com/trishume/syntect;64644ffe064457265cbcee12a0c1baf9485ba6ee;syntect-%commit%" -) - -inherit cargo linux-info - -DESCRIPTION="Turso Database is an in-process OLTP database engine library with a CLI" -HOMEPAGE="https://github.com/tursodatabase/turso" -SRC_URI=" - https://github.com/tursodatabase/${PN}/releases/download/v${PV}/source.tar.gz -> ${P}.tar.gz - https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz - ${CARGO_CRATE_URIS} -" - -S="${WORKDIR}/${PN}_cli-${PV}" - -LICENSE="MIT" -# Dependent crate licenses -LICENSE+=" - Apache-2.0 Apache-2.0-with-LLVM-exceptions Boost-1.0 CC0-1.0 CDDL - GPL-2.0-with-bison-exception MIT MPL-2.0 Unicode-DFS-2016 -" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+uring" - -DEPEND=" - >=dev-libs/libgit2-0.99:= - dev-libs/oniguruma:= -" -RDEPEND="${DEPEND}" - -pkg_setup() { - CONFIG_CHECK="~IO_URING" - WARNING_IO_URING="The USE flag 'uring' needs the option IO_URING to be enabled." - - use uring && linux-info_pkg_setup - rust_pkg_setup -} - -src_configure() { - # high magic to allow system-libs - export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 - export RUSTONIG_SYSTEM_LIBONIG=1 - export LIBGIT2_NO_VENDOR=1 - - local myfeatures=( - "mimalloc" - $(usev uring io_uring) - ) - cargo_src_configure --no-default-features -} - -src_compile() { - cargo_src_compile --package "${PN}_cli" --bin "tursodb" -} - -src_install() { - cargo_src_install --path cli - - local DOCS=( - CHANGELOG.md - CONTRIBUTING.md - README.md - ) - - einstalldocs -} diff --git a/dev-db/turso/turso-0.8.2.ebuild b/dev-db/turso/turso-0.8.2.ebuild new file mode 100644 index 000000000000..14b1ee0d8080 --- /dev/null +++ b/dev-db/turso/turso-0.8.2.ebuild @@ -0,0 +1,75 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +RUST_MIN_VER="1.88.0" + +declare -A GIT_CRATES=( + [syntect]="https://github.com/trishume/syntect;64644ffe064457265cbcee12a0c1baf9485ba6ee;syntect-%commit%" +) + +inherit cargo linux-info + +DESCRIPTION="Turso Database is an in-process OLTP database engine library with a CLI" +HOMEPAGE="https://github.com/tursodatabase/turso" +SRC_URI=" + https://github.com/tursodatabase/${PN}/releases/download/v${PV}/source.tar.gz -> ${P}.tar.gz + https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz + ${CARGO_CRATE_URIS} +" + +S="${WORKDIR}/${PN}_cli-${PV}" + +LICENSE="MIT" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions Boost-1.0 CC0-1.0 CDDL + GPL-2.0-with-bison-exception MIT MPL-2.0 Unicode-DFS-2016 +" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+uring" + +DEPEND=" + >=dev-libs/libgit2-0.99:= + dev-libs/oniguruma:= +" +RDEPEND="${DEPEND}" + +pkg_setup() { + CONFIG_CHECK="~IO_URING" + WARNING_IO_URING="The USE flag 'uring' needs the option IO_URING to be enabled." + + use uring && linux-info_pkg_setup + rust_pkg_setup +} + +src_configure() { + # high magic to allow system-libs + export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 + export RUSTONIG_SYSTEM_LIBONIG=1 + export LIBGIT2_NO_VENDOR=1 + + local myfeatures=( + "mimalloc" + $(usev uring io_uring) + ) + cargo_src_configure --no-default-features +} + +src_compile() { + cargo_src_compile --package "${PN}_cli" --bin "tursodb" +} + +src_install() { + cargo_src_install --path cli + + local DOCS=( + CHANGELOG.md + CONTRIBUTING.md + README.md + ) + + einstalldocs +} -- cgit v1.3