54 lines
1.7 KiB
Bash
54 lines
1.7 KiB
Bash
# Template file for 'ccache'
|
|
pkgname=ccache
|
|
version=4.2
|
|
revision=1
|
|
bootstrap=yes
|
|
build_style=cmake
|
|
configure_args="-DENABLE_TESTING=OFF"
|
|
makedepends="libzstd-devel zlib-devel"
|
|
short_desc="Fast C/C++ Compiler Cache"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://ccache.samba.org/"
|
|
changelog="https://ccache.dev/releasenotes.html"
|
|
distfiles="https://github.com/ccache/ccache/releases/download/v${version}/${pkgname}-${version}.tar.xz"
|
|
checksum=2f14b11888c39778c93814fc6843fc25ad60ff6ba4eeee3dff29a1bad67ba94f
|
|
|
|
if [ -z "$CHROOT_READY" ]; then
|
|
hostmakedepends="cmake-bootstrap"
|
|
export CMAKE_GENERATOR="Unix Makefiles"
|
|
make_cmd="make"
|
|
else
|
|
hostmakedepends="asciidoc perl"
|
|
fi
|
|
|
|
if [ -n "$CHROOT_READY" ] && [ -n "$XBPS_CHECK_PKGS" ]; then
|
|
configure_args+=" -DENABLE_TESTING=ON"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
fi
|
|
|
|
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}
|
|
for x in arm-linux-gnueabi arm-linux-gnueabihf armv7l-linux-gnueabihf \
|
|
arm-linux-musleabihf armv7l-linux-musleabihf aarch64-linux-gnu \
|
|
i686-pc-linux-gnu aarch64-linux-musl i686-linux-musl \
|
|
mips-linux-musl mips-linux-muslhf mipsel-linux-musl mipsel-linux-muslhf \
|
|
powerpc-linux-gnu powerpc-linux-musl \
|
|
powerpcle-linux-gnu powerpcle-linux-musl \
|
|
powerpc64-linux-gnu powerpc64-linux-musl \
|
|
powerpc64le-linux-musl powerpc64le-linux-gnu; do
|
|
ln -sfr ${DESTDIR}/usr/bin/ccache ${DESTDIR}/usr/lib/ccache/bin/${x}-${f}
|
|
done
|
|
done
|
|
}
|