# Maintainer: Maksim Bondarenkov # Contributor: Sarah Ottinger _realname=sccache pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=0.14.0 pkgrel=1 pkgdesc='Shared compilation cache (mingw-w64)' arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url="https://github.com/mozilla/sccache" msys2_repository_url='https://github.com/mozilla/sccache' msys2_references=( 'archlinux: sccache' 'purl: pkg:cargo/sccache' ) license=('spdx:Apache-2.0') depends=("${MINGW_PACKAGE_PREFIX}-zstd") makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-openssl") options=('!strip') source=("https://github.com/mozilla/sccache/archive/v$pkgver/${_realname}-${pkgver}.tar.gz" "zstd-sys.tar.gz::https://crates.io/api/v1/crates/zstd-sys/2.0.10+zstd.1.5.6/download" "link-zstd-dynamically.patch") sha256sums=('f2f194874e6b435896201655432f623d749f5583256f773743c376a6d06cede5' 'c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa' '48f4900ceb02d3aaf9a1020f33d56629156e96759f456c0e7ca18bfcf910767b') _env() { export OPENSSL_NO_VENDOR=1 export PKG_CONFIG_ALL_DYNAMIC=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export WINAPI_NO_BUNDLED_LIBRARIES=1 export RUSTFLAGS="${RUSTFLAGS/+crt-static/-crt-static}" } prepare() { cd "${_realname}-${pkgver}" patch -d ../zstd-sys-2.0.10+zstd.1.5.6 -i ../link-zstd-dynamically.patch cat >> Cargo.toml <