2018-12-26 11:18:12 +01:00
|
|
|
# Description: Sccache is a ccache-like tool
|
|
|
|
# URL: https://github.com/mozilla/sccache
|
2023-05-23 18:25:49 +02:00
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2018-12-26 11:18:12 +01:00
|
|
|
# Depends on: rust
|
|
|
|
|
|
|
|
name=sccache
|
2023-11-27 11:57:11 +01:00
|
|
|
version=0.7.4
|
2022-05-31 23:18:49 +02:00
|
|
|
release=1
|
2021-01-23 10:15:23 +01:00
|
|
|
source=(https://github.com/mozilla/sccache/archive/v$version/$name-v$version.tar.gz)
|
2018-12-26 11:18:12 +01:00
|
|
|
|
|
|
|
build() {
|
2023-05-23 18:25:49 +02:00
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER='/usr/bin/sccache'
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
2018-12-26 11:18:12 +01:00
|
|
|
|
2023-06-03 21:53:43 +02:00
|
|
|
export CFLAGS+=' -ffat-lto-objects'
|
|
|
|
export LDFLAGS+=' -lzstd'
|
|
|
|
|
2023-05-23 18:25:49 +02:00
|
|
|
cargo build --manifest-path $name-$version/Cargo.toml --release \
|
2023-06-04 21:58:25 +02:00
|
|
|
--features native-zlib,dist-server,all
|
2023-05-23 18:25:49 +02:00
|
|
|
cargo install --path $name-$version --root $PKG/usr --no-track \
|
2023-06-03 21:53:43 +02:00
|
|
|
--frozen --offline --features native-zlib,dist-server,all
|
2018-12-26 11:18:12 +01:00
|
|
|
}
|