opt/ccache/Pkgfile

35 lines
1.0 KiB
Plaintext
Raw Normal View History

2023-08-27 17:49:50 +02:00
# Description: A fast compiler cache
2019-07-27 14:23:08 +02:00
# URL: https://ccache.dev/
2023-08-27 17:49:50 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on:
2023-08-30 18:16:39 +02:00
# Optional: asciidoctor clang-ccache-bindings gcc-fortran-ccache-bindings hiredis mingw-ccache-bindings
2006-02-23 16:26:10 +01:00
name=ccache
2023-12-31 09:35:49 +01:00
version=4.9
2022-03-05 17:28:35 +01:00
release=1
2023-08-27 17:49:50 +02:00
source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz)
2006-02-23 16:26:10 +01:00
build() {
2023-08-27 17:49:50 +02:00
prt-get isinst hiredis && PKGMK_CCACHE+=' -D REDIS_STORAGE_BACKEND=ON' || PKGMK_CCACHE+=' -D REDIS_STORAGE_BACKEND=OFF'
2022-10-20 10:17:38 +02:00
2023-08-27 17:49:50 +02:00
cmake -S $name-$version -B build -G Ninja $PKGMK_CCACHE \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D ENABLE_IPO=ON \
-D HIREDIS_FROM_INTERNET=OFF \
-D ZSTD_FROM_INTERNET=OFF \
-D ENABLE_TESTING=OFF
2023-08-27 17:49:50 +02:00
cmake --build build
DESTDIR=$PKG cmake --install build
2023-08-27 17:49:50 +02:00
install -d $PKG/usr/lib/ccache
2023-08-27 17:49:50 +02:00
for c in cc gcc g++ cpp c++; do
ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
done
2006-02-23 16:26:10 +01:00
}