gentoo-ebuilds/app-crypt/sequoia-chameleon-gnupg/sequoia-chameleon-gnupg-0.13.1-r3.ebuild
Arthur Zamarin 78a15622a8
app-crypt/sequoia-chameleon-gnupg: Stabilize 0.13.1-r3 amd64, #967161
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-12-07 11:03:50 +02:00

105 lines
2.3 KiB
Bash

# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES="
"
LLVM_COMPAT=( {18..20} )
RUST_MIN_VER="1.79.0"
inherit cargo llvm-r1 shell-completion xdg-utils
DESCRIPTION="Sequoia's reimplementation of the GnuPG interface"
HOMEPAGE="https://sequoia-pgp.org/ https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/"
SRC_URI="
https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/archive/v${PV}/${P}-v${PV}.tar.bz2
${CARGO_CRATE_URIS}
"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-crates.tar.xz"
S="${WORKDIR}"/${PN}-v${PV}-6fbe6d0fba83d5324ddf66a45cd349a458044b58
LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+="
0BSD Apache-2.0 BSD Boost-1.0 CC0-1.0 ISC LGPL-2+ MIT MPL-2.0
Unicode-3.0
|| ( GPL-2 GPL-3 LGPL-3 )
"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE="botan test"
RESTRICT="!test? ( test )"
DEPEND="
app-arch/bzip2
dev-db/sqlite:3
dev-libs/openssl:=
botan? ( dev-libs/botan:3= )
"
# gpg-agent needed for secret key operations
# https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg#gpg-sq
RDEPEND="
${DEPEND}
|| (
app-crypt/gnupg
app-crypt/freepg
)
"
# Clang needed for bindgen
BDEPEND="
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
')
test? (
app-crypt/sequoia-sq
)
virtual/pkgconfig
"
QA_FLAGS_IGNORED="usr/bin/gpg-sq usr/bin/gpgv-sq"
pkg_setup() {
llvm-r1_pkg_setup
rust_pkg_setup
}
src_configure() {
# https://wiki.gentoo.org/wiki/Project:Rust/sys_crates#bzip2-sys
mkdir "${T}/pkg-config" || die
export PKG_CONFIG_PATH=${T}/pkg-config${PKG_CONFIG_PATH+:${PKG_CONFIG_PATH}}
cat >> "${T}/pkg-config/bzip2.pc" <<-EOF || die
Name: bzip2
Version: 9999
Description:
Libs: -lbz2
EOF
local myfeatures=(
$(usex botan crypto-{botan,openssl})
)
cargo_src_configure --no-default-features
export ASSET_OUT_DIR=${T}/assets
}
src_test() {
# long temporary file paths change output wrapping which leads
# to completely confusing test failures
local -x TMPDIR=/tmp
xdg_environment_reset
RUST_BACKTRACE=full cargo_src_test -vv --no-fail-fast
}
src_install() {
cargo_src_install
doman "${T}"/assets/man-pages/*
newbashcomp "${T}"/assets/shell-completions/gpg-sq.bash gpg-sq
newbashcomp "${T}"/assets/shell-completions/gpgv-sq.bash gpgv-sq
dofishcomp "${T}"/assets/shell-completions/*.fish
dozshcomp "${T}"/assets/shell-completions/_gpg{,v}-sq
}