commit:     d799afbdd901c75356a1519770dd669745242ff5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 12:13:49 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 12:35:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d799afbd

app-crypt/sequoia-sq: Sync to sequoia-chameleon-gnupg

Sync changes from app-crypt/sequoia-chameleon-gnupg, notably switch
the default backend to OpenSSL (since it supports more algorithms),
with the option of using Botan instead.  Add missing RUST_MIN_VER.

Closes: https://bugs.gentoo.org/961614
Closes: https://bugs.gentoo.org/938144
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/44402
Closes: https://github.com/gentoo/gentoo/pull/44402
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-crypt/sequoia-sq/metadata.xml               |  3 +
 app-crypt/sequoia-sq/sequoia-sq-1.3.1-r1.ebuild | 95 +++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/app-crypt/sequoia-sq/metadata.xml 
b/app-crypt/sequoia-sq/metadata.xml
index 8754f119be91..462517b1fbbe 100644
--- a/app-crypt/sequoia-sq/metadata.xml
+++ b/app-crypt/sequoia-sq/metadata.xml
@@ -15,4 +15,7 @@
                
<changelog>https://gitlab.com/sequoia-pgp/sequoia-sq/-/tags</changelog>
                
<bugs-to>https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues</bugs-to>
        </upstream>
+       <use>
+               <flag name="botan">Use <pkg>dev-libs/botan</pkg> as crypto 
provider.</flag>
+       </use>
 </pkgmetadata>

diff --git a/app-crypt/sequoia-sq/sequoia-sq-1.3.1-r1.ebuild 
b/app-crypt/sequoia-sq/sequoia-sq-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..68bea9a8377d
--- /dev/null
+++ b/app-crypt/sequoia-sq/sequoia-sq-1.3.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+LLVM_COMPAT=( {16..20} )
+RUST_MIN_VER="1.79.0"
+
+inherit cargo llvm-r1 shell-completion
+
+DESCRIPTION="CLI of the Sequoia OpenPGP implementation"
+HOMEPAGE="https://sequoia-pgp.org/ https://gitlab.com/sequoia-pgp/sequoia-sq";
+SRC_URI="https://gitlab.com/sequoia-pgp/sequoia-sq/-/archive/v${PV}/${PN}-v${PV}.tar.bz2";
+SRC_URI+=" 
https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz";
+S="${WORKDIR}"/${PN}-v${PV}
+
+LICENSE="LGPL-2.1+"
+# Dependent crate licenses
+LICENSE+="
+       Apache-2.0 BSD Boost-1.0 CC0-1.0 ISC LGPL-2+ MIT MIT-0 MPL-2.0
+       Unicode-3.0
+       || ( GPL-2 GPL-3 LGPL-3 )
+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+IUSE="botan"
+
+COMMON_DEPEND="
+       app-arch/bzip2
+       dev-db/sqlite:3
+       dev-libs/openssl:=
+       botan? ( dev-libs/botan:3= )
+"
+DEPEND="
+       ${COMMON_DEPEND}
+       dev-libs/capnproto
+"
+RDEPEND="
+       ${COMMON_DEPEND}
+"
+# Clang needed for bindgen
+BDEPEND="
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+       ')
+       virtual/pkgconfig
+"
+
+QA_FLAGS_IGNORED="usr/bin/sq"
+
+pkg_setup() {
+       llvm-r1_pkg_setup
+       rust_pkg_setup
+}
+
+src_configure() {
+       # Set this here so that it doesn't change if we run tests
+       # and cause a recompilation.
+       asset_dir="${T}"/assets
+       export ASSET_OUT_DIR="${asset_dir}"
+
+       # Setting CARGO_TARGET_DIR is required to have the build system
+       # create the bash and zsh completion files.
+       export CARGO_TARGET_DIR="${S}/target"
+
+       # 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
+}
+
+src_install() {
+       cargo_src_install
+
+       doman "${asset_dir}"/man-pages/*.1
+
+       local completion_dir="${asset_dir}"/shell-completions
+       newbashcomp "${completion_dir}"/sq.bash sq
+       dozshcomp "${completion_dir}"/_sq
+       dofishcomp "${completion_dir}"/sq.fish
+}

Reply via email to