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@gentoo.org>
This commit is contained in:
Florian Schmaus 2025-07-23 09:05:49 +02:00
parent 8a7047a098
commit 0963a35c80
No known key found for this signature in database
GPG Key ID: 2239A7E8F5852052
3 changed files with 11 additions and 9 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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>