2015-02-12 00:02:22 +11:00
|
|
|
# Description: A fast compiler cache.
|
2019-07-27 22:23:08 +10:00
|
|
|
# URL: https://ccache.dev/
|
2014-11-10 23:25:50 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2020-10-28 23:06:41 +11:00
|
|
|
# Depends on: cmake
|
|
|
|
# Optional: clang-ccache-bindings asciidoc zstd
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
name=ccache
|
2020-10-28 23:06:41 +11:00
|
|
|
version=4.0
|
2011-01-09 12:31:32 +01:00
|
|
|
release=1
|
2020-10-28 23:06:41 +11:00
|
|
|
source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz
|
|
|
|
ccache.1
|
|
|
|
ccache-man.patch)
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
build() {
|
2020-10-28 23:06:41 +11:00
|
|
|
# https://github.com/ccache/ccache/issues/684
|
|
|
|
patch -d $name-$version -p1 -i $SRC/ccache-man.patch
|
2006-02-23 15:26:10 +00:00
|
|
|
|
2020-10-28 23:06:41 +11:00
|
|
|
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)"
|
2012-06-14 23:22:38 +10:00
|
|
|
|
2020-10-28 23:06:41 +11:00
|
|
|
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
|
2012-06-14 23:22:38 +10:00
|
|
|
|
2018-09-07 19:03:12 +10:00
|
|
|
install -d $PKG/usr/lib/ccache
|
2015-02-12 00:02:22 +11:00
|
|
|
|
2018-09-07 19:03:12 +10:00
|
|
|
for c in cc gcc g++ cpp c++; do
|
2015-02-12 00:02:22 +11:00
|
|
|
ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
|
2012-06-14 23:22:38 +10:00
|
|
|
done
|
2006-02-23 15:26:10 +00:00
|
|
|
}
|