commit:     24c64028156027ab1e38ee7d8c678f61e0ece049
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 24 22:02:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 24 22:03:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24c64028

app-crypt/sequoia-sop: new package, add 0.37.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/sequoia-sop/Manifest                  |   2 +
 app-crypt/sequoia-sop/metadata.xml              |  14 ++++
 app-crypt/sequoia-sop/sequoia-sop-0.37.1.ebuild | 100 ++++++++++++++++++++++++
 3 files changed, 116 insertions(+)

diff --git a/app-crypt/sequoia-sop/Manifest b/app-crypt/sequoia-sop/Manifest
new file mode 100644
index 000000000000..540c94600053
--- /dev/null
+++ b/app-crypt/sequoia-sop/Manifest
@@ -0,0 +1,2 @@
+DIST sequoia-sop-0.37.1-crates.tar.xz 21683460 BLAKE2B 
86cf4669505798e8635f3a1bc9316c85a7b78d6d3043202aa123cc10a590b71cdc7ffcff990924d78ff64dc69fd37f74e8d637e3ea736c288765954ea30c5257
 SHA512 
3e998786ae27bdd9e3f14a96e302923f44c8121372ce5a46316e95fb1e6fd49260f71fd92bea4420f49f344bc1f46216aeb1c8ee5bf71ccbf145a966ba1ada74
+DIST sequoia-sop-v0.37.1.tar.bz2 97426 BLAKE2B 
62fa85c913f3c467e82b7cda6d0917ac8f0b23c22005ce7056bab1446d3c137c0f9877a6e440156e44b5c57c7525b973ed02adae04de2de6f12ab56ac1dabf2d
 SHA512 
05876efb38f5dd037b40c02611e364524635e255957d06396e05ec15d5cedc8097962e08261e8ab469970878fa6d4a63f75166c85f9cb5629656effe5105ba7c

diff --git a/app-crypt/sequoia-sop/metadata.xml 
b/app-crypt/sequoia-sop/metadata.xml
new file mode 100644
index 000000000000..cb097ae22d8d
--- /dev/null
+++ b/app-crypt/sequoia-sop/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <name>Sam James</name>
+               <email>[email protected]</email>
+       </maintainer>
+       <upstream>
+               <remote-id type="gitlab">sequoia-pgp/sequoia</remote-id>
+               <remote-id type="gitlab">sequoia-pgp/sequoia-sop</remote-id>
+               
<changelog>https://gitlab.com/sequoia-pgp/sequoia-sop/-/tags</changelog>
+               
<bugs-to>https://gitlab.com/sequoia-pgp/sequoia-sop/-/issues</bugs-to>
+       </upstream>
+</pkgmetadata>

diff --git a/app-crypt/sequoia-sop/sequoia-sop-0.37.1.ebuild 
b/app-crypt/sequoia-sop/sequoia-sop-0.37.1.ebuild
new file mode 100644
index 000000000000..496ed47b7ae6
--- /dev/null
+++ b/app-crypt/sequoia-sop/sequoia-sop-0.37.1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+LLVM_COMPAT=( {16..20} )
+
+inherit cargo llvm-r1 shell-completion
+
+DESCRIPTION="Implementation of the Stateless OpenPGP Command Line Interface 
using Sequoia"
+HOMEPAGE="https://sequoia-pgp.org/ https://gitlab.com/sequoia-pgp/sequoia-sop";
+SRC_URI="https://gitlab.com/sequoia-pgp/sequoia-sop/-/archive/v${PV}/${PN}-v${PV}.tar.bz2";
+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 MPL-2.0 Unicode-3.0
+       Unicode-DFS-2016
+       || ( GPL-2 GPL-3 LGPL-3 )
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+QA_FLAGS_IGNORED="usr/bin/sqop"
+
+COMMON_DEPEND="
+       app-arch/bzip2
+       dev-db/sqlite:3
+       dev-libs/gmp:=
+       dev-libs/nettle:=
+       dev-libs/openssl:=
+"
+DEPEND="
+       ${COMMON_DEPEND}
+       dev-libs/capnproto
+"
+RDEPEND="
+       ${COMMON_DEPEND}
+"
+# Clang needed for bindgen
+BDEPEND="
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+       ')
+       virtual/pkgconfig
+"
+
+pkg_setup() {
+       llvm-r1_pkg_setup
+       rust_pkg_setup
+}
+
+src_compile() {
+       # 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
+
+       cargo_src_compile
+}
+
+src_configure() {
+       # TODO: Wire up other crypto backends?
+       # 
https://gitlab.com/sequoia-pgp/sequoia/-/tree/main/openpgp#crypto-backends
+       local myfeatures=(
+               cli
+       )
+
+       cargo_src_configure
+}
+
+src_install() {
+       cargo_src_install
+
+       doman "${asset_dir}"/man-pages/*.1
+
+       local completion_dir="${asset_dir}"/shell-completions
+       newbashcomp "${completion_dir}"/sqop.bash sqop
+       dozshcomp "${completion_dir}"/_sqop
+       dofishcomp "${completion_dir}"/sqop.fish
+}

Reply via email to