# Copyright 2024-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Autogenerated by pycargoebuild 0.13.1 EAPI=8 CRATES=" addr2line@0.24.2 adler2@2.0.0 aead@0.5.2 aes-gcm-siv@0.11.1 aes-gcm@0.10.3 aes@0.8.4 aho-corasick@1.1.3 android-tzdata@0.1.1 android_system_properties@0.1.5 anes@0.1.6 anstream@0.6.18 anstyle-parse@0.2.6 anstyle-query@1.1.2 anstyle-wincon@3.0.7 anstyle@1.0.10 anyhow@1.0.97 argon2@0.5.3 arrayvec@0.7.6 asn1@0.21.0 asn1_derive@0.21.0 assert_cmd@2.0.16 assert_matches@1.5.0 async-compression@0.4.22 async-trait@0.1.88 atomic-take@1.1.0 atomic-waker@1.1.2 auto_enums@0.8.7 autocfg@1.4.0 axum-core@0.5.2 axum@0.8.4 backtrace@0.3.74 base64@0.21.7 base64@0.22.1 base64ct@1.6.0 bincode@1.3.3 bindgen@0.72.0 bit-set@0.8.0 bit-vec@0.8.0 bitflags@2.9.0 bitstream-io@1.10.0 blake2@0.10.6 block-buffer@0.10.4 block-padding@0.3.3 breakpad-symbols@0.22.2 bstr@1.11.3 bumpalo@3.17.0 byteorder@1.5.0 bytes@1.10.1 cachemap2@0.3.0 cast@0.3.0 cbc@0.1.2 cc@1.2.18 cesu8@1.1.0 cexpr@0.6.0 cfg-if@1.0.0 chacha20@0.9.1 chacha20poly1305@0.10.1 chrono@0.4.40 ciborium-io@0.2.2 ciborium-ll@0.2.2 ciborium@0.2.2 cipher@0.4.4 circular@0.3.0 clang-sys@1.8.1 clap-stdin@0.6.0 clap@4.5.35 clap_builder@4.5.35 clap_derive@4.5.32 clap_lex@0.7.4 cmake@0.1.48 colorchoice@1.0.3 combine@4.6.7 const-oid@0.9.6 const-str@0.6.2 convert_case@0.4.0 core-foundation-sys@0.8.7 core-foundation@0.10.0 core-models@0.0.3 cpufeatures@0.2.17 crc32fast@1.4.2 criterion-plot@0.5.0 criterion@0.5.1 crossbeam-deque@0.8.6 crossbeam-epoch@0.9.18 crossbeam-utils@0.8.21 crunchy@0.2.3 crypto-common@0.1.6 ctr@0.9.2 darling@0.20.11 darling_core@0.20.11 darling_macro@0.20.11 data-encoding@2.8.0 debugid@0.8.0 der@0.7.9 deranged@0.4.0 derive-where@1.2.7 derive_builder@0.20.2 derive_builder_core@0.20.2 derive_builder_macro@0.20.2 derive_more-impl@2.0.1 derive_more@0.99.19 derive_more@2.0.1 derive_utils@0.15.0 diff@0.1.13 difflib@0.4.0 digest@0.10.7 dir-test-macros@0.4.1 dir-test@0.4.1 displaydoc@0.2.5 doc-comment@0.3.3 downcast-rs@1.2.1 dyn-clonable-impl@0.9.2 dyn-clonable@0.9.2 dyn-clone@1.0.19 ed25519-dalek@2.1.1 ed25519@2.2.3 either@1.15.0 encoding_rs@0.8.35 enum-as-inner@0.6.1 env_filter@0.1.3 env_logger@0.11.8 equivalent@1.0.2 errno@0.3.11 fastrand@2.3.0 fiat-crypto@0.2.9 fixedbitset@0.5.7 flate2@1.1.1 fnv@1.0.7 foreign-types-macros@0.2.3 foreign-types-shared@0.3.1 foreign-types@0.5.0 form_urlencoded@1.2.1 fs_extra@1.3.0 fslock@0.2.1 futures-channel@0.3.31 futures-core@0.3.31 futures-executor@0.3.31 futures-io@0.3.31 futures-macro@0.3.31 futures-sink@0.3.31 futures-task@0.3.31 futures-util@0.3.31 futures@0.3.31 generic-array@0.14.7 getrandom@0.2.15 getrandom@0.3.2 ghash@0.5.1 gimli@0.31.1 glob@0.3.2 h2@0.3.26 h2@0.4.8 half@2.4.1 hashbrown@0.12.3 hashbrown@0.15.2 hax-lib-macros-types@0.2.0 hax-lib-macros-types@0.3.1 hax-lib-macros@0.2.0 hax-lib-macros@0.3.1 hax-lib@0.2.0 hax-lib@0.3.1 headers-core@0.2.0 headers@0.3.9 heck@0.5.0 hermit-abi@0.5.0 hex@0.4.3 hickory-proto@0.24.4 hkdf@0.12.4 hmac@0.12.1 home@0.5.9 hpke-rs-crypto@0.3.0 hpke-rs@0.3.0 http-body-util@0.1.3 http-body@0.4.6 http-body@1.0.1 http@0.2.12 http@1.3.1 httparse@1.10.1 httpdate@1.0.3 hyper-timeout@0.5.2 hyper-util@0.1.11 hyper@0.14.32 hyper@1.6.0 iana-time-zone-haiku@0.1.2 iana-time-zone@0.1.63 icu_collections@1.5.0 icu_locid@1.5.0 icu_locid_transform@1.5.0 icu_locid_transform_data@1.5.1 icu_normalizer@1.5.0 icu_normalizer_data@1.5.1 icu_properties@1.5.1 icu_properties_data@1.5.1 icu_provider@1.5.0 icu_provider_macros@1.5.0 ident_case@1.0.1 idna@1.0.3 idna_adapter@1.2.0 indexmap@1.9.3 indexmap@2.9.0 inout@0.1.4 intmap@3.1.0 ipnet@2.11.0 is-terminal@0.4.16 is_terminal_polyfill@1.70.1 itertools@0.10.5 itertools@0.14.0 itoa@1.0.15 jiff-static@0.2.5 jiff@0.2.5 jni-sys@0.3.0 jni@0.21.1 js-sys@0.3.77 json5@0.4.1 lazy_static@1.5.0 libc@0.2.171 libcrux-hacl-rs@0.0.2 libcrux-hkdf@0.0.2 libcrux-hmac@0.0.2 libcrux-intrinsics@0.0.2 libcrux-intrinsics@0.0.3 libcrux-macros@0.0.2 libcrux-ml-kem@0.0.2 libcrux-platform@0.0.2 libcrux-sha2@0.0.2 libcrux-sha3@0.0.2 libcrux-sha3@0.0.3 libcrux-traits@0.0.2 libloading@0.8.6 libz-sys@1.1.22 linkme-impl@0.3.33 linkme@0.3.33 linux-raw-sys@0.4.15 linux-raw-sys@0.9.3 litemap@0.7.4 log-panics@2.1.0 log@0.4.27 macro_rules_attribute-proc_macro@0.2.0 macro_rules_attribute@0.2.0 matchers@0.2.0 matchit@0.8.4 mediasan-common@0.5.3 memchr@2.7.4 memmap2@0.9.5 mime@0.3.17 mime_guess@2.0.5 minidump-common@0.22.2 minidump-processor@0.22.1 minidump-unwind@0.22.2 minidump@0.22.2 minimal-lexical@0.2.1 miniz_oxide@0.8.7 mio@1.0.3 mp4san-derive@0.5.3 mp4san@0.5.3 multer@2.1.0 multimap@0.10.0 neon-macros@1.1.1 neon@1.1.1 nom-derive-impl@0.10.1 nom-derive@0.10.1 nom@7.1.3 nonzero_ext@0.3.0 nu-ansi-term@0.50.1 num-bigint@0.4.6 num-conv@0.1.0 num-derive@0.4.2 num-integer@0.1.46 num-traits@0.2.19 num_enum@0.7.3 num_enum_derive@0.7.3 object@0.36.7 once_cell@1.21.3 oorandom@11.1.5 opaque-debug@0.3.1 openssl-macros@0.1.1 openssl-probe@0.1.6 partial-default-derive@0.1.0 partial-default@0.1.0 password-hash@0.5.0 paste@1.0.15 pastey@0.1.0 pem@3.0.5 percent-encoding@2.3.1 pest@2.8.0 pest_derive@2.8.0 pest_generator@2.8.0 pest_meta@2.8.0 petgraph@0.7.1 phf@0.11.3 phf_codegen@0.11.3 phf_generator@0.11.3 phf_shared@0.11.3 pin-project-internal@1.1.10 pin-project-lite@0.2.16 pin-project@1.1.10 pin-utils@0.1.0 pkcs8@0.10.2 pkg-config@0.3.32 plotters-backend@0.3.7 plotters-svg@0.3.7 plotters@0.3.7 poly1305@0.8.0 polyval@0.6.2 portable-atomic-util@0.2.4 portable-atomic@1.11.0 powerfmt@0.2.0 ppv-lite86@0.2.21 predicates-core@1.0.9 predicates-tree@1.0.12 predicates@3.1.3 pretty_assertions@1.4.1 prettyplease@0.2.32 proc-macro-crate@3.3.0 proc-macro-error-attr2@2.0.0 proc-macro-error-attr@1.0.4 proc-macro-error2@2.0.1 proc-macro-error@1.0.4 proc-macro2@1.0.94 procfs-core@0.17.0 proptest@1.7.0 prost-build@0.13.5 prost-derive@0.13.5 prost-types@0.13.5 prost@0.13.5 protobuf-codegen@3.7.2 protobuf-json-mapping@3.7.2 protobuf-parse@3.7.2 protobuf-support@3.7.2 protobuf@3.7.2 quick-error@1.2.3 quote@1.0.40 r-efi@5.2.0 rand@0.8.5 rand@0.9.0 rand_chacha@0.3.1 rand_chacha@0.9.0 rand_core@0.6.4 rand_core@0.9.3 rand_xorshift@0.4.0 range-map@0.2.0 rangemap@1.5.1 rayon-core@1.12.1 rayon@1.10.0 rcgen@0.13.2 regex-automata@0.4.9 regex-syntax@0.8.5 regex@1.11.1 ring@0.17.14 rustc-demangle@0.1.24 rustc-hash@2.1.1 rustc_version@0.4.1 rusticata-macros@4.1.0 rustix@0.38.44 rustix@1.0.5 rustls-native-certs@0.8.1 rustls-pemfile@2.2.0 rustls-pki-types@1.11.0 rustls-platform-verifier-android@0.1.1 rustls-platform-verifier@0.5.1 rustls-webpki@0.102.8 rustls-webpki@0.103.1 rustls@0.22.4 rustls@0.23.25 rustversion@1.0.20 rusty-fork@0.3.0 ryu@1.0.20 same-file@1.0.6 schannel@0.1.27 scoped-tls@1.0.1 scopeguard@1.2.0 scroll@0.12.0 scroll_derive@0.12.1 security-framework-sys@2.14.0 security-framework@3.2.0 semver@1.0.26 send_wrapper@0.6.0 serde@1.0.219 serde_derive@1.0.219 serde_json@1.0.140 serde_urlencoded@0.7.1 serde_with@3.12.0 serde_with_macros@3.12.0 sha1@0.10.6 sha1_smol@1.0.1 sha2-asm@0.6.4 sha2@0.10.8 sharded-slab@0.1.7 shlex@1.3.0 signature@2.2.0 siphasher@1.0.1 slab@0.4.9 smallvec@1.15.0 smart-default@0.7.1 snow@0.10.0 socket2@0.5.9 socks5-proto@0.4.1 socks5-server@0.10.1 sorted-vec@0.8.6 spin@0.9.8 spki@0.7.3 stable_deref_trait@1.2.0 static_assertions@1.1.0 strsim@0.11.1 strum@0.27.1 strum_macros@0.27.1 subtle@2.6.1 syn-mid@0.6.0 syn@1.0.109 syn@2.0.100 sync_wrapper@1.0.2 synstructure@0.13.1 tempfile@3.19.1 termtree@0.5.1 test-case-core@3.3.1 test-case-macros@3.3.1 test-case@3.3.1 test-log-macros@0.2.17 test-log@0.2.17 testing_logger@0.1.1 thiserror-impl@1.0.69 thiserror-impl@2.0.12 thiserror@1.0.69 thiserror@2.0.12 thread_local@1.1.8 time-core@0.1.4 time-macros@0.2.22 time@0.3.41 tinystr@0.7.6 tinytemplate@1.2.1 tinyvec@1.9.0 tinyvec_macros@0.1.1 tls-parser@0.12.2 tokio-macros@2.5.0 tokio-rustls@0.25.0 tokio-socks@0.5.2 tokio-stream@0.1.17 tokio-tungstenite@0.21.0 tokio-tungstenite@0.27.0 tokio-util@0.7.14 tokio@1.45.0 toml_datetime@0.6.8 toml_edit@0.22.24 tonic-build@0.13.1 tonic@0.13.1 tower-layer@0.3.3 tower-service@0.3.3 tower@0.5.2 tracing-attributes@0.1.28 tracing-core@0.1.33 tracing-log@0.2.0 tracing-subscriber@0.3.20 tracing@0.1.41 try-lock@0.2.5 tungstenite@0.21.0 tungstenite@0.27.0 typenum@1.18.0 ucd-trie@0.1.7 unarray@0.1.4 unicase@2.8.1 unicode-ident@1.0.18 unicode-xid@0.2.6 universal-hash@0.5.1 untrusted@0.9.0 url@2.5.4 utf-8@0.7.6 utf16_iter@1.0.5 utf8_iter@1.0.4 utf8parse@0.2.2 uuid@1.16.0 valuable@0.1.1 vcpkg@0.2.15 version_check@0.9.5 visibility@0.1.1 wait-timeout@0.2.1 walkdir@2.5.0 want@0.3.1 warp@0.3.7 wasi@0.11.0+wasi-snapshot-preview1 wasi@0.14.2+wasi-0.2.4 wasm-bindgen-backend@0.2.100 wasm-bindgen-macro-support@0.2.100 wasm-bindgen-macro@0.2.100 wasm-bindgen-shared@0.2.100 wasm-bindgen@0.2.100 web-sys@0.3.77 webpki-root-certs@0.26.8 webpsan@0.5.3 which@4.4.2 winapi-i686-pc-windows-gnu@0.4.0 winapi-util@0.1.9 winapi-x86_64-pc-windows-gnu@0.4.0 winapi@0.3.9 windows-core@0.61.0 windows-implement@0.60.0 windows-interface@0.59.1 windows-link@0.1.1 windows-result@0.3.2 windows-strings@0.4.0 windows-sys@0.45.0 windows-sys@0.52.0 windows-sys@0.59.0 windows-targets@0.42.2 windows-targets@0.52.6 windows_aarch64_gnullvm@0.42.2 windows_aarch64_gnullvm@0.52.6 windows_aarch64_msvc@0.42.2 windows_aarch64_msvc@0.52.6 windows_i686_gnu@0.42.2 windows_i686_gnu@0.52.6 windows_i686_gnullvm@0.52.6 windows_i686_msvc@0.42.2 windows_i686_msvc@0.52.6 windows_x86_64_gnu@0.42.2 windows_x86_64_gnu@0.52.6 windows_x86_64_gnullvm@0.42.2 windows_x86_64_gnullvm@0.52.6 windows_x86_64_msvc@0.42.2 windows_x86_64_msvc@0.52.6 winnow@0.7.4 wit-bindgen-rt@0.39.0 write16@1.0.0 writeable@0.5.5 x25519-dalek@2.0.1 yansi@1.0.1 yasna@0.5.2 yoke-derive@0.7.5 yoke@0.7.5 zerocopy-derive@0.8.24 zerocopy@0.8.24 zerofrom-derive@0.1.5 zerofrom@0.1.5 zeroize@1.8.1 zeroize_derive@1.4.2 zerovec-derive@0.10.3 zerovec@0.10.4 " declare -A GIT_CRATES=( [boring-sys]='https://github.com/signalapp/boring;81d4aa19ac6c5af99238ff0bf9328b381ccebcdd;boring-%commit%/boring-sys' [boring]='https://github.com/signalapp/boring;81d4aa19ac6c5af99238ff0bf9328b381ccebcdd;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' [spqr]='https://github.com/signalapp/SparsePostQuantumRatchet;99a759a3fd40cd9304459fb007fcf177db9ed207;SparsePostQuantumRatchet-%commit%' [tokio-boring]='https://github.com/signalapp/boring;81d4aa19ac6c5af99238ff0bf9328b381ccebcdd;boring-%commit%/tokio-boring' ) LLVM_COMPAT=( {18..20} ) RUST_MIN_VER="1.85.0" inherit cargo llvm-r2 BSSL_COMMIT="44b3df6f03d85c901767250329c571db405122d5" DESCRIPTION="C ABI library which exposes Signal protocol logic" HOMEPAGE="https://github.com/signalapp/libsignal" SRC_URI=" https://github.com/signalapp/libsignal/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz https://github.com/google/boringssl/archive/${BSSL_COMMIT}.tar.gz -> boringssl-${COMMIT:0:7}.tar.gz ${CARGO_CRATE_URIS} " S="${WORKDIR}/libsignal-${PV}/rust/bridge/ffi" LICENSE="AGPL-3" # Dependent crate licenses LICENSE+=" AGPL-3 Apache-2.0 BSD GPL-3+ ISC MIT MPL-2.0 Unicode-3.0" SLOT="0" KEYWORDS="~amd64" # https://bugs.gentoo.org/927382 BDEPEND=" dev-build/cmake dev-libs/protobuf $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}') " pkg_setup() { llvm-r2_pkg_setup rust_pkg_setup } src_unpack() { cargo_src_unpack local bssl_submodule=( "${WORKDIR}"/boring-*/boring-sys/deps/boringssl ) rmdir "${bssl_submodule[@]}" || die mv "${WORKDIR}/boringssl-${BSSL_COMMIT}" "${bssl_submodule[@]}" || die # borrowed from net-im/gurk-rs local crate_patches crate crate_uri commit crate_dir host for crate in curve25519-dalek boring{,-sys}; do IFS=';' read -r crate_uri commit crate_dir host \ <<< "${GIT_CRATES["${crate}"]}" : "${crate_dir:=${crate}-%commit%}" crate_patches+="${crate} = { path = \"${WORKDIR}/${crate_dir//%commit%/${commit}}\" };;" done printf -- "[patch.crates-io]\\n%s" "${crate_patches//;;/$'\n'}" \ >> "${CARGO_HOME}/config.toml" || die } src_install() { dolib.a "${WORKDIR}"/libsignal-${PV}/$(cargo_target_dir)/libsignal_ffi.a einstalldocs }