Skip to content

Commit

Permalink
build.sh: update version for crate openssl-sys
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Cheylus <foxy@free.fr>
  • Loading branch information
lcheylus committed Nov 14, 2024
1 parent a038017 commit f745f55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ rm -f /tmp/cargo-nextest-"${VERSION}".tar.gz
mkdir -p "${WRKDIR}"/crates

# Download crate openssl-sys
echo "[*] Download sources for openssl-sys-0.9.103 crate"
echo "[*] Download sources for openssl-sys-0.9.104 crate"
cd "${WRKDIR}"
curl -sL https://crates.io/api/v1/crates/openssl-sys/0.9.103/download|tar xzf - -C crates
curl -sL https://crates.io/api/v1/crates/openssl-sys/0.9.104/download|tar xzf - -C crates

# Patch crate openssl-sys
echo "[*] Patch sources for openssl-sys-0.9.103 crate"
cd "${WRKDIR}"/crates/openssl-sys-0.9.103
echo "[*] Patch sources for openssl-sys-0.9.104 crate"
cd "${WRKDIR}"/crates/openssl-sys-0.9.104
sed -i.orig -e "/ => ('.', '.'),/h" -e "/ => ('.', '.', '.'),/h" -e "/_ => version_error(),/{g; s/(.*) =>/_ =>/; }" build/main.rs

# Download crate zstd-sys-2.0.13+zstd.1.5.6
Expand All @@ -86,7 +86,7 @@ sed -i '1s/^/#![allow(unreachable_code)]\'$'\n/' build.rs
echo "[*] Patch cargo configuration in .cargo/config.toml"

printf "\n[patch.crates-io]\n" > /tmp/cargo_config-patch.toml
printf "openssl-sys = { path = 'crates/openssl-sys-0.9.103'}\n" >> /tmp/cargo_config-patch.toml
printf "openssl-sys = { path = 'crates/openssl-sys-0.9.104'}\n" >> /tmp/cargo_config-patch.toml
printf "zstd-sys = { path = 'crates/zstd-sys-2.0.13+zstd.1.5.6' }\n" >> /tmp/cargo_config-patch.toml

cat /tmp/cargo_config-patch.toml >> "${WRKDIR}"/.cargo/config.toml
Expand Down

0 comments on commit f745f55

Please sign in to comment.