68 lines
1.9 KiB
Bash
68 lines
1.9 KiB
Bash
# Copyright 2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# Autogenerated by pycargoebuild 0.15.0
|
|
|
|
EAPI=8
|
|
|
|
LLVM_COMPAT=( {18..19} )
|
|
RUST_NEEDS_LLVM=1
|
|
|
|
CRATES="
|
|
"
|
|
|
|
declare -A GIT_CRATES=(
|
|
[boring-sys]='https://github.com/signalapp/boring;bb42da53b3900aea1936d41decf9403f25c4259c;boring-%commit%/boring-sys'
|
|
[boring]='https://github.com/signalapp/boring;bb42da53b3900aea1936d41decf9403f25c4259c;boring-%commit%/boring'
|
|
[curve25519-dalek-derive]='https://github.com/signalapp/curve25519-dalek;7c6d34756355a3566a704da84dce7b1c039a6572;curve25519-dalek-%commit%/curve25519-dalek-derive'
|
|
[curve25519-dalek]='https://github.com/signalapp/curve25519-dalek;7c6d34756355a3566a704da84dce7b1c039a6572;curve25519-dalek-%commit%/curve25519-dalek'
|
|
[tokio-boring]='https://github.com/signalapp/boring;bb42da53b3900aea1936d41decf9403f25c4259c;boring-%commit%/tokio-boring'
|
|
)
|
|
|
|
inherit llvm-r1 cargo
|
|
|
|
DESCRIPTION="A C ABI library which exposes Signal protocol logic"
|
|
HOMEPAGE="https://github.com/signalapp/libsignal"
|
|
SRC_URI="
|
|
https://github.com/signalapp/libsignal/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
|
|
${P}-vendor.tar.xz
|
|
"
|
|
S="${WORKDIR}/libsignal-${PV}/rust/bridge/ffi"
|
|
if [[ ${PKGBUMPING} != ${PVR} ]]; then
|
|
SRC_URI+="
|
|
"
|
|
fi
|
|
|
|
LICENSE="AGPL-3"
|
|
# Dependent crate licenses
|
|
LICENSE+="
|
|
AGPL-3 Apache-2.0 BSD-2 BSD GPL-3+ ISC MIT MPL-2.0 Unicode-3.0
|
|
"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
|
|
BDEPEND="
|
|
dev-libs/protobuf
|
|
$(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}')
|
|
"
|
|
|
|
pkg_setup() {
|
|
llvm-r1_pkg_setup
|
|
rust_pkg_setup
|
|
}
|
|
|
|
src_unpack() {
|
|
default
|
|
cargo_gen_config
|
|
ln -s "${WORKDIR}/vendor/" "${WORKDIR}/libsignal-${PV}/vendor" || die
|
|
sed -i "${ECARGO_HOME}/config.toml" \
|
|
-e '/source.crates-io/d' \
|
|
-e '/replace-with = "gentoo"/d' \
|
|
-e '/local-registry = "\/nonexistent"/d' \
|
|
|| die
|
|
cat "${FILESDIR}/vendor-config.toml" >> "${ECARGO_HOME}/config.toml" || die
|
|
}
|
|
|
|
src_install() {
|
|
dolib.a "${WORKDIR}/${P/-ffi/}/$(cargo_target_dir)/${PN/-/_}.a"
|
|
}
|