diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
| commit | 059831534c7e884f0a607ed86b582fd00d821731 (patch) | |
| tree | 76bcb67a78f8aa2654fd34c2ad801a62136b0170 /.github/scripts/build-boost-macos.sh | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
New upstream version 3.2.0~rc1+dfsgupstream/3.2.0_rc1+dfsg
Diffstat (limited to '.github/scripts/build-boost-macos.sh')
| -rwxr-xr-x | .github/scripts/build-boost-macos.sh | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/.github/scripts/build-boost-macos.sh b/.github/scripts/build-boost-macos.sh index 06e9de1a..c3b876f0 100755 --- a/.github/scripts/build-boost-macos.sh +++ b/.github/scripts/build-boost-macos.sh @@ -1,15 +1,16 @@ #!/usr/bin/env bash set -euo pipefail -if [ "$#" -ne 4 ]; then - echo "Usage: build-boost-macos.sh VERSION ARCH DEPLOYMENT_TARGET PREFIX" >&2 +if [ "$#" -ne 5 ]; then + echo "Usage: build-boost-macos.sh VERSION SOURCE_SHA256 ARCH DEPLOYMENT_TARGET PREFIX" >&2 exit 2 fi version="$1" -arch="$2" -deployment_target="$3" -prefix="$4" +source_sha256="$2" +arch="$3" +deployment_target="$4" +prefix="$5" version_underscores=${version//./_} boost_arch=x86 @@ -17,7 +18,25 @@ if [ "$arch" = "arm64" ]; then boost_arch=arm fi +sha256_file() { + if command -v shasum >/dev/null 2>&1; then + shasum -a 256 "$1" | awk '{print $1}' + elif command -v sha256sum >/dev/null 2>&1; then + sha256sum "$1" | awk '{print $1}' + else + echo "No SHA-256 tool found; expected shasum or sha256sum" >&2 + return 1 + fi +} + curl -L --fail --retry 5 --retry-delay 10 -o boost.tar.bz2 "https://archives.boost.io/release/${version}/source/boost_${version_underscores}.tar.bz2" +actual_sha256="$(sha256_file boost.tar.bz2)" +if [ "$actual_sha256" != "$source_sha256" ]; then + echo "::error::Boost source SHA-256 mismatch" >&2 + echo "Expected: ${source_sha256}" >&2 + echo "Actual: ${actual_sha256}" >&2 + exit 1 +fi tar -xjf boost.tar.bz2 cd "boost_${version_underscores}" |
