59 lines
2.0 KiB
Bash
59 lines
2.0 KiB
Bash
# Template file for 'ccache'
|
|
pkgname=ccache
|
|
version=4.10.2
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DENABLE_TESTING=OFF -DREDIS_STORAGE_BACKEND=OFF
|
|
-DENABLE_DOCUMENTATION=OFF -DDEPS=LOCAL"
|
|
makedepends="libzstd-devel xxHash-devel doctest-devel"
|
|
short_desc="Fast C/C++ Compiler Cache"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://ccache.dev"
|
|
changelog="https://ccache.dev/releasenotes.html"
|
|
distfiles="https://github.com/ccache/ccache/releases/download/v${version}/ccache-${version}.tar.xz
|
|
https://github.com/ccache/ccache/releases/download/v${version}/ccache-${version}-linux-x86_64.tar.xz"
|
|
checksum="c0b85ddfc1a3e77b105ec9ada2d24aad617fa0b447c6a94d55890972810f0f5a
|
|
80cab87bd510eca796467aee8e663c398239e0df1c4800a0b5dff11dca0b4f18"
|
|
|
|
|
|
if [ -n "$XBPS_CHECK_PKGS" ]; then
|
|
makedepends+=" perl"
|
|
configure_args+=" -DENABLE_TESTING=ON"
|
|
fi
|
|
|
|
post_extract() {
|
|
mv ccache-${version}/* .
|
|
}
|
|
|
|
pre_check() {
|
|
export CC=/usr/bin/gcc
|
|
}
|
|
|
|
post_install() {
|
|
vmkdir usr/lib/ccache/bin
|
|
# clang
|
|
for f in clang clang++; do
|
|
ln -sfr ${DESTDIR}/usr/bin/ccache ${DESTDIR}/usr/lib/ccache/bin/${f}
|
|
done
|
|
# gcc
|
|
for f in gcc cc c++ g++; do
|
|
ln -sfr ${DESTDIR}/usr/bin/ccache ${DESTDIR}/usr/lib/ccache/bin/${f}
|
|
# cross compilers
|
|
for x in aarch64-linux-gnu aarch64-linux-musl arm-linux-gnueabi \
|
|
arm-linux-gnueabihf arm-linux-musleabi arm-linux-musleabihf \
|
|
arm-none-eabi armv7l-linux-gnueabihf armv7l-linux-musleabihf \
|
|
avr i686-linux-musl i686-pc-linux-gnu mips-linux-musl \
|
|
mips-linux-muslhf mipsel-linux-musl mipsel-linux-muslhf musl-gcc \
|
|
or1k-none-elf powerpc-linux-gnu powerpc-linux-musl \
|
|
powerpc64-linux-gnu powerpc64-linux-musl powerpc64le-linux-gnu \
|
|
powerpc64le-linux-musl powerpcle-linux-gnu powerpcle-linux-musl \
|
|
riscv64-linux-gnu riscv64-linux-musl x86_64-linux-gnu \
|
|
x86_64-linux-musl ; do
|
|
ln -sfr ${DESTDIR}/usr/bin/ccache ${DESTDIR}/usr/lib/ccache/bin/${x}-${f}
|
|
done
|
|
done
|
|
# pregenerated manpage to avoid bringing ruby into the build
|
|
vman ccache-${version}-linux-x86_64/ccache.1
|
|
}
|