diff options
author | Sam James <sam@gentoo.org> | 2022-12-11 00:25:26 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-11 22:50:23 +0000 |
commit | bc63dc594a7c8c8f9c9ffaeff8f7bcc6c3c826a8 (patch) | |
tree | a61fbcd2ffaee029f696db220b57808a0a884d17 /net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild | |
parent | sys-kernel/gentoo-sources: drop 5.10.150 (diff) | |
download | gentoo-bc63dc594a7c8c8f9c9ffaeff8f7bcc6c3c826a8.tar.gz gentoo-bc63dc594a7c8c8f9c9ffaeff8f7bcc6c3c826a8.tar.bz2 gentoo-bc63dc594a7c8c8f9c9ffaeff8f7bcc6c3c826a8.zip |
net-libs/rustls-ffi: new package, add 0.9.1
Bug: https://bugs.gentoo.org/885099
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild')
-rw-r--r-- | net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild b/net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild new file mode 100644 index 000000000000..04494aab9d3a --- /dev/null +++ b/net-libs/rustls-ffi/rustls-ffi-0.9.1.ebuild @@ -0,0 +1,123 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + ansi_term-0.12.1 + atty-0.2.14 + autocfg-1.1.0 + base64-0.13.1 + bitflags-1.3.2 + bumpalo-3.11.1 + cbindgen-0.19.0 + cc-1.0.77 + cfg-if-1.0.0 + clap-2.34.0 + fastrand-1.8.0 + hashbrown-0.12.3 + heck-0.3.3 + hermit-abi-0.1.19 + indexmap-1.9.2 + instant-0.1.12 + itoa-1.0.4 + js-sys-0.3.60 + libc-0.2.138 + log-0.4.17 + num_enum-0.5.7 + num_enum_derive-0.5.7 + once_cell-1.16.0 + proc-macro-crate-1.2.1 + proc-macro2-1.0.47 + quote-1.0.21 + redox_syscall-0.2.16 + remove_dir_all-0.5.3 + ring-0.16.20 + rustls-0.20.4 + rustls-pemfile-0.2.1 + rustversion-1.0.9 + ryu-1.0.11 + sct-0.7.0 + serde-1.0.149 + serde_derive-1.0.149 + serde_json-1.0.89 + spin-0.5.2 + strsim-0.8.0 + syn-1.0.105 + tempfile-3.3.0 + textwrap-0.11.0 + thiserror-1.0.37 + thiserror-impl-1.0.37 + toml-0.5.9 + unicode-ident-1.0.5 + unicode-segmentation-1.10.0 + unicode-width-0.1.10 + untrusted-0.7.1 + vec_map-0.8.2 + wasm-bindgen-0.2.83 + wasm-bindgen-backend-0.2.83 + wasm-bindgen-macro-0.2.83 + wasm-bindgen-macro-support-0.2.83 + wasm-bindgen-shared-0.2.83 + web-sys-0.3.60 + webpki-0.22.0 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-x86_64-pc-windows-gnu-0.4.0 +" + +inherit cargo multilib-minimal rust-toolchain + +DESCRIPTION="C-to-rustls bindings" +HOMEPAGE="https://github.com/rustls/rustls-ffi" +SRC_URI="https://github.com/rustls/rustls-ffi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" $(cargo_crate_uris)" + +# From cargo-ebuild (note that webpki is also just ISC) +LICENSE="|| ( MIT Apache-2.0 ) BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016" +# For Ring (see its LICENSE) +LICENSE+=" ISC openssl SSLeay MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" + +BDEPEND="dev-util/cargo-c" + +QA_FLAGS_IGNORED="usr/lib.*/librustls.*" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.1-cargo-c.patch + "${FILESDIR}"/${PN}-0.9.1-tests-32-bit.patch +) + +src_prepare() { + default + + multilib_copy_sources +} + +multilib_src_compile() { + local cargoargs=( + --library-type=cdylib + --prefix=/usr + --libdir="/usr/$(get_libdir)" + --target="$(rust_abi)" + ) + + cargo cbuild "${cargoargs[@]}" || die "cargo cbuild failed" +} + +multilib_src_test() { + cargo_src_test --target="$(rust_abi)" +} + +multilib_src_install() { + local cargoargs=( + --library-type=cdylib + --prefix=/usr + --libdir="/usr/$(get_libdir)" + --target="$(rust_abi)" + --destdir="${ED}" + ) + + cargo cinstall "${cargoargs[@]}" || die "cargo cinstall failed" +} |