2023-08-27 17:49:40 +02:00
|
|
|
# Description: Masquerade directory to use ccache with clang
|
2021-02-17 20:53:22 +11:00
|
|
|
# URL: https://ccache.dev/
|
2023-08-27 17:49:40 +02:00
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2018-09-07 19:27:30 +10:00
|
|
|
# Depends on: ccache clang
|
|
|
|
|
|
|
|
name=clang-ccache-bindings
|
2024-10-18 14:58:26 +02:00
|
|
|
version=19
|
2020-05-02 14:10:29 +10:00
|
|
|
release=1
|
2018-09-07 19:27:30 +10:00
|
|
|
source=()
|
|
|
|
|
|
|
|
build() {
|
2023-08-27 17:49:40 +02:00
|
|
|
install -d $PKG/usr/lib/ccache
|
2018-09-07 19:27:30 +10:00
|
|
|
|
2023-08-27 17:49:40 +02:00
|
|
|
local clang0="$(clang --version | awk -F'[ .]' '/version/ { print $3"."$4 }')"
|
|
|
|
local clang1="${clang0:0:2}"
|
2018-09-07 19:27:30 +10:00
|
|
|
|
2023-08-27 17:49:40 +02:00
|
|
|
if [ -z "$clang0" ]; then
|
|
|
|
echo 'Failed to find clang version'
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-09-07 19:27:30 +10:00
|
|
|
|
2023-08-27 17:49:40 +02:00
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
|
2018-09-07 19:27:30 +10:00
|
|
|
}
|