5743963242
New dependency cmake Changed compression algorithm from Deflate (zlib) to Zstandard, zstd will be used if installed, else it'll compile ccache staticly with a local zstd copy Changed hash algorithm from MD4 to BLAKE3 Improved cache directory structure Changed the default cache directory location to follow the XDG base directory specification The CCACHE_DIR environment variable still overrides the default location just like before The cache directory structure has changed compared to previous versions (more details below). This means that ccache 4.0 will not share cache results with earlier versions. It is however safe to run ccache 4.0 and earlier versions against the same cache directory: cache bookkeeping, statistics and cleanup are backward compatible, with the minor exception that some statistics counters incremented by ccache 4.0 won’t be visible when running ccache -s with an older version https://ccache.dev/releasenotes.html#_ccache_4_0
38 lines
1008 B
Plaintext
38 lines
1008 B
Plaintext
# Description: A fast compiler cache.
|
|
# URL: https://ccache.dev/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: cmake
|
|
# Optional: clang-ccache-bindings asciidoc zstd
|
|
|
|
name=ccache
|
|
version=4.0
|
|
release=1
|
|
source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz
|
|
ccache.1
|
|
ccache-man.patch)
|
|
|
|
build() {
|
|
# https://github.com/ccache/ccache/issues/684
|
|
patch -d $name-$version -p1 -i $SRC/ccache-man.patch
|
|
|
|
cmake -S$name-$version -Bbuild \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DZSTD_FROM_INTERNET="$(prt-get isinst zstd &> /dev/null && echo OFF || echo ON)"
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
# install bundled man page else generate it with asciidoc
|
|
if [ ! -e '/usr/bin/asciidoc' ]; then
|
|
install -d $PKG/usr/share/man/man1
|
|
install -m 644 $SRC/ccache.1 $PKG/usr/share/man/man1/
|
|
fi
|
|
|
|
install -d $PKG/usr/lib/ccache
|
|
|
|
for c in cc gcc g++ cpp c++; do
|
|
ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
|
|
done
|
|
}
|