aboutsummaryrefslogtreecommitdiff
path: root/extra/ccache/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-10-20 15:08:47 +0300
committerCem Keylan <cem@ckyln.com>2020-10-20 15:08:47 +0300
commit27e99351ba6a71145d11a37a9ea564e038eb786e (patch)
tree4211f02f06898eb4d14e961984d5b0dec812d192 /extra/ccache/build
parent000bb28c6c7c3bd59424f0cb3650d5612915c4a8 (diff)
downloadrepository-27e99351ba6a71145d11a37a9ea564e038eb786e.tar.gz
ccache: bump to 4.0
Diffstat (limited to 'extra/ccache/build')
-rwxr-xr-xextra/ccache/build21
1 files changed, 12 insertions, 9 deletions
diff --git a/extra/ccache/build b/extra/ccache/build
index 1b063cc2..d78718ae 100755
--- a/extra/ccache/build
+++ b/extra/ccache/build
@@ -1,18 +1,21 @@
#!/bin/sh -e
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var
+export DESTDIR=$1
+export LDFLAGS="$LDFLAGS -static"
-make
+TEST=OFF
+[ "$CPT_TEST" ] && TEST=ON
-install -Dm 755 ccache "$1/usr/bin/ccache"
-install -Dm 644 doc/ccache.1 "$1/usr/share/man/man1/ccache.1"
+cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_TESTING=$TEST \
+ -DZSTD_LIBRARY=/usr/lib/libzstd.a
-mkdir -p "$1/usr/lib/ccache/bin"
+cmake --build build
+cmake --install build
+mkdir -p "$1/usr/lib/ccache/bin"
triplet=$(cc -dumpmachine)
for link in cc gcc g++ cpp c++ "$triplet-cc" "$triplet-gcc" \