diff options
Diffstat (limited to 'dev-libs/libsignal-ffi/libsignal-ffi-0.46.0-r1.ebuild')
-rw-r--r-- | dev-libs/libsignal-ffi/libsignal-ffi-0.46.0-r1.ebuild | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/libsignal-ffi/libsignal-ffi-0.46.0-r1.ebuild b/dev-libs/libsignal-ffi/libsignal-ffi-0.46.0-r1.ebuild new file mode 100644 index 000000000..f189a660c --- /dev/null +++ b/dev-libs/libsignal-ffi/libsignal-ffi-0.46.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.13.1 + +EAPI=8 + +LLVM_COMPAT=( {18..19} ) +RUST_NEEDS_LLVM=1 + +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 + https://jroy.ca/dist/${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" + +BDEPEND=" + dev-libs/protobuf + $(llvm_gen_dep 'sys-devel/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 vendor/vendor-config.toml >> "${ECARGO_HOME}/config.toml" || die +} + +src_install() { + dolib.a "${WORKDIR}/${P/-ffi/}/$(cargo_target_dir)/${PN/-/_}.a" +} |