commit:     9bc6011e77ddb755de023f8ce105e51be2b850cd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 11:40:51 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=9bc6011e

app-crypt/sequoia-sqv: Sync to sequoia-chameleon-gnupg, modernize

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.
Use shell-completion.eclass.

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

 app-crypt/sequoia-sqv/metadata.xml                |  3 +
 app-crypt/sequoia-sqv/sequoia-sqv-1.3.0-r1.ebuild | 78 +++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/app-crypt/sequoia-sqv/metadata.xml 
b/app-crypt/sequoia-sqv/metadata.xml
index e9179a09ed8d..fbb758e281e3 100644
--- a/app-crypt/sequoia-sqv/metadata.xml
+++ b/app-crypt/sequoia-sqv/metadata.xml
@@ -12,4 +12,7 @@
        <upstream>
                <remote-id type="gitlab">sequoia-pgp/sequoia-sqv</remote-id>
        </upstream>
+       <use>
+               <flag name="botan">Use <pkg>dev-libs/botan</pkg> as crypto 
provider.</flag>
+       </use>
 </pkgmetadata>

diff --git a/app-crypt/sequoia-sqv/sequoia-sqv-1.3.0-r1.ebuild 
b/app-crypt/sequoia-sqv/sequoia-sqv-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..f95f02fbf78b
--- /dev/null
+++ b/app-crypt/sequoia-sqv/sequoia-sqv-1.3.0-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+LLVM_COMPAT=( {17..20} )
+RUST_MIN_VER="1.79.0"
+
+inherit cargo llvm-r1 shell-completion
+
+DESCRIPTION="A simple OpenPGP signature verification program"
+HOMEPAGE="https://sequoia-pgp.org/ https://gitlab.com/sequoia-pgp/sequoia-sqv";
+SRC_URI="
+       
https://gitlab.com/sequoia-pgp/sequoia-sqv/-/archive/v${PV}/${PN}-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}
+
+LICENSE="GPL-2+"
+# Dependent crate licenses
+LICENSE+="
+       Apache-2.0 BSD Boost-1.0 CC0-1.0 ISC LGPL-2+ MIT Unicode-3.0
+       || ( GPL-2 GPL-3 LGPL-3 )
+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="botan"
+
+DEPEND="
+       botan? ( dev-libs/botan:3= )
+       !botan? ( dev-libs/openssl:= )
+"
+RDEPEND="${DEPEND}"
+# Needed for bindgen
+BDEPEND="
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+       ')
+       virtual/pkgconfig
+"
+
+QA_FLAGS_IGNORED="usr/bin/sqv"
+
+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"
+
+       local myfeatures=(
+               $(usex botan crypto-{botan,openssl})
+       )
+
+       cargo_src_configure --no-default-features
+}
+
+src_install() {
+       cargo_src_install
+
+       newbashcomp "${asset_dir}"/shell-completions/sqv.bash sqv
+       dozshcomp "${asset_dir}"/shell-completions/_sqv
+       dofishcomp "${asset_dir}"/shell-completions/sqv.fish
+
+       doman "${asset_dir}"/man-pages/sqv.1
+}

Reply via email to