net-vpn/rathole: fix build with OpenSSL 4

Signed-off-by: Zakk <zakk@gentoozh.org>
This commit is contained in:
Zakk committed 2026-11-07 17:15:50 +11:00
1 parent a6e95d1709
commit 397d3d86cf
2 files changed
+21

No files matched your search

+2
View File
@@ -1,2 +1,4 @@
DIST openssl-0.10.82.crate 316901 BLAKE2B 7cffdd2c625972e2c6865966d34c3364d669eae88fbc101854a3c75a38136c6e268c25ed15de5269bd5c9b596db6ee69a79fbcd17e5c190bc33169c37c85a505 SHA512 c51c27e30a0c3e1e01c11d9dff22e1d9e46a07b447429023f34762401d67bdb6fe0330c7a8f96b43455e53e336fc25a04499354a57ff43f23e15b82c76682a3c
DIST openssl-sys-0.9.118.crate 76886 BLAKE2B 90a17ea44bf497c1b2655bc599c5773ca5cd0cb8b911151ed60706c38dacfeb619785a0ad941d6d2859a61072b9db7e48e2c8ca8878f9a163536d5eab1abfff8 SHA512 02f5ae2fa9be8c83e7c2315022215e595f2c89df216775220657b8a25cb31cacf438c7c07dc1bd225cee7b4acca838b309f5dc5e12f4ef9d128eb730232cfb96
DIST rathole-0.5.0-crates.tar.xz 20181840 BLAKE2B 38b829a5175a3e4ffcc291c61260381726ca47f143f67cd7e9e8feb5c03000ff4cd372c8705ee4517ece4559856bf5bb790dec82d38708ae390bb71258f23bab SHA512 418cf9117065c91757da890a94e9871b1032aa19bdb735e12447a73d73da4fc0b5d226c238c1f0f186d95c48d0f61ee284934b475b40ab2611fe01eda03a468f
DIST rathole-0.5.0.tar.gz 298402 BLAKE2B 14e838f709645245696178c26c0643d60dbb472fcf522a4dc21d34a25948cf39a6989a3044710a3af14f8c85bb21e6139218d03868d1d83f6eada6ca40156dfe SHA512 0b4da8e3a95624d2e03a0682eecc098ea5d615bd47080f4a13d8248ee4358faecb81298feb2499084d55415cce01b4bc3fcb8a8d5c41677f2c3ceaa131fd4915
+19
View File
@@ -5,7 +5,10 @@
EAPI=8
# vendored openssl-0.10.57 and openssl-sys-0.9.93 don't support openssl-4
CRATES="
openssl@0.10.82
openssl-sys@0.9.118
"
inherit cargo systemd
@@ -15,6 +18,7 @@ HOMEPAGE="https://github.com/rathole-org/rathole"
SRC_URI="
https://codeload.github.com/rathole-org/rathole/tar.gz/v${PV} -> ${P}.tar.gz
https://minio.dream-universe.org/posts/distfiles/${P}-crates.tar.xz
${CARGO_CRATE_URIS}
"
LICENSE="Apache-2.0"
@@ -32,6 +36,21 @@ BDEPEND="virtual/pkgconfig"
PATCHES=("${FILESDIR}/${P}-fix-rust-1.80.patch")
src_prepare() {
default
local crate sum
for crate in openssl-0.10.82 openssl-sys-0.9.118; do
sum=$(sha256sum "${DISTDIR}"/${crate}.crate | cut -d' ' -f1)
sed -i -e "/^name = \"${crate%-*}\"$/,/^checksum/{" \
-e "s/^version = .*/version = \"${crate##*-}\"/" \
-e "s/^checksum = .*/checksum = \"${sum}\"/" \
-e "}" Cargo.lock || die
done
# openssl-0.10.82 no longer depends on once_cell
sed -i -e '/^name = "openssl"$/,/^]/{/"once_cell",/d}' Cargo.lock || die
}
src_install(){
keepdir /etc/rathole
dobin $(cargo_target_dir)/rathole