commit:     0963a35c8089910c9f97901b7fb2cdb3e3c244ef
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 23 07:05:49 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jul 23 07:13:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0963a35c

app-shells/atuin: add USE=system-sqlite, drop empty CRATES

Using system sqlite turns out to have a significant performance
impact. Until the actual cause is found, use the bundled sqlite per
default.

Also remove the empty CRATES definition.

Bug: https://bugs.gentoo.org/959120
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../atuin/{atuin-18.6.1-r1.ebuild => atuin-18.6.1-r2.ebuild}   |  9 +++++----
 .../atuin/{atuin-18.7.1-r1.ebuild => atuin-18.7.1-r2.ebuild}   | 10 +++++-----
 app-shells/atuin/metadata.xml                                  |  1 +
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/app-shells/atuin/atuin-18.6.1-r1.ebuild 
b/app-shells/atuin/atuin-18.6.1-r2.ebuild
similarity index 93%
rename from app-shells/atuin/atuin-18.6.1-r1.ebuild
rename to app-shells/atuin/atuin-18.6.1-r2.ebuild
index c2c0b9fd42ba..f72fc1b1fd49 100644
--- a/app-shells/atuin/atuin-18.6.1-r1.ebuild
+++ b/app-shells/atuin/atuin-18.6.1-r2.ebuild
@@ -3,7 +3,6 @@
 
 EAPI=8
 
-CRATES=" "
 RUST_MIN_VER="1.86"
 
 inherit cargo greadme shell-completion systemd
@@ -19,14 +18,14 @@ LICENSE="MIT"
 LICENSE+=" Apache-2.0 BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 openssl"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 ~riscv"
-IUSE="+client +daemon server test +sync"
+IUSE="+client +daemon server system-sqlite test +sync"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="
        || ( client server )
        sync? ( client )
        test? ( client server sync )
 "
-DEPEND="dev-db/sqlite:3"
+DEPEND="system-sqlite? ( dev-db/sqlite:3 )"
 RDEPEND="${DEPEND}
        server? ( acct-user/atuin )
 "
@@ -39,7 +38,9 @@ GREADME_DISABLE_AUTOFORMAT=1
 DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md )
 
 src_configure() {
-       export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
+       # Using system-sqlite has a negative performance impact
+       # see https://bugs.gentoo.org/959120
+       use system-sqlite && export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
        local myfeatures=(
                $(usev client)
                $(usev daemon)

diff --git a/app-shells/atuin/atuin-18.7.1-r1.ebuild 
b/app-shells/atuin/atuin-18.7.1-r2.ebuild
similarity index 93%
rename from app-shells/atuin/atuin-18.7.1-r1.ebuild
rename to app-shells/atuin/atuin-18.7.1-r2.ebuild
index ea768df96754..6a870c271e00 100644
--- a/app-shells/atuin/atuin-18.7.1-r1.ebuild
+++ b/app-shells/atuin/atuin-18.7.1-r2.ebuild
@@ -3,8 +3,6 @@
 
 EAPI=8
 
-CRATES=" "
-
 RUST_MIN_VER="1.86"
 
 inherit cargo greadme shell-completion systemd
@@ -20,14 +18,14 @@ LICENSE="MIT"
 LICENSE+=" Apache-2.0 BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 openssl"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~riscv"
-IUSE="+client +daemon server test +sync"
+IUSE="+client +daemon server system-sqlite test +sync"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="
        || ( client server )
        sync? ( client )
        test? ( client server sync )
 "
-DEPEND="dev-db/sqlite:3"
+DEPEND="system-sqlite? ( dev-db/sqlite:3 )"
 RDEPEND="${DEPEND}
        server? ( acct-user/atuin )
 "
@@ -40,7 +38,9 @@ GREADME_DISABLE_AUTOFORMAT=1
 DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md )
 
 src_configure() {
-       export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
+       # Using system-sqlite has a negative performance impact
+       # see https://bugs.gentoo.org/959120
+       use system-sqlite && export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
        local myfeatures=(
                $(usev client)
                $(usev daemon)

diff --git a/app-shells/atuin/metadata.xml b/app-shells/atuin/metadata.xml
index 5271e50033b0..3c953dac4127 100644
--- a/app-shells/atuin/metadata.xml
+++ b/app-shells/atuin/metadata.xml
@@ -18,6 +18,7 @@
                <flag name="daemon">Enable the autin background daemon on the 
client</flag>
                <flag name="server">Enable the autin server</flag>
                <flag name="sync">Enable the server-sync feature in the autin 
client</flag>
+               <flag name="system-sqlite">Use the system SQLite instead of the 
bundled one. WARNING: enabling this has a negative performance impact 
(https://bugs.gentoo.org/959120)</flag>
        </use>
        <upstream>
                <remote-id type="github">atuinsh/atuin</remote-id>

Reply via email to