2024-09-02 23:58:57 +02:00
|
|
|
# Copyright 2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
# Autogenerated by pycargoebuild 0.13.1
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
CRATES=" "
|
|
|
|
|
2024-09-03 00:35:04 +02:00
|
|
|
inherit cargo rust-toolchain
|
2024-09-02 23:58:57 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
https://herbizarre.swordarmor.fr/garbage/${P}-vendor.tar.xz
|
|
|
|
"
|
|
|
|
S="${WORKDIR}/libsignal-${PV}/rust/bridge/ffi"
|
|
|
|
|
|
|
|
LICENSE="AGPL-3"
|
|
|
|
# Dependent crate licenses
|
|
|
|
LICENSE+=" AGPL-3 Apache-2.0 BSD-2 BSD ISC MIT Unicode-DFS-2016"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
IUSE="debug"
|
|
|
|
|
|
|
|
BDEPEND="
|
|
|
|
dev-libs/protobuf
|
|
|
|
sys-devel/clang
|
|
|
|
"
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
default
|
|
|
|
cargo_gen_config
|
|
|
|
ln -s "${WORKDIR}/vendor/" "${WORKDIR}/libsignal-${PV}/vendor" || die
|
2024-09-03 00:08:33 +02:00
|
|
|
sed -i "${ECARGO_HOME}/config.toml" -e '/source.crates-io/d' || die
|
|
|
|
sed -i "${ECARGO_HOME}/config.toml" -e '/replace-with = "gentoo"/d' || die
|
|
|
|
sed -i "${ECARGO_HOME}/config.toml" -e '/local-registry = "\/nonexistent"/d' || die
|
|
|
|
cat "${WORKDIR}/vendor/vendor-config.toml" >> "${ECARGO_HOME}/config.toml" || die
|
2024-09-02 23:58:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
if use debug; then
|
|
|
|
TARGET=debug
|
|
|
|
else
|
|
|
|
TARGET=release
|
|
|
|
fi
|
|
|
|
|
2024-09-03 00:35:04 +02:00
|
|
|
dolib.a "${WORKDIR}/${P/-ffi/}/target/$(rust_abi)/${TARGET}/${PN/-/_}.a"
|
2024-09-02 23:58:57 +02:00
|
|
|
}
|