2018-09-07 19:27:30 +10:00
|
|
|
# Description: Masquerade directory to use ccache with clang.
|
2021-02-17 20:53:22 +11:00
|
|
|
# URL: https://ccache.dev/
|
2018-09-07 19:27:30 +10:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: ccache clang
|
|
|
|
|
|
|
|
name=clang-ccache-bindings
|
2022-10-01 13:49:39 +02:00
|
|
|
version=15
|
2020-05-02 14:10:29 +10:00
|
|
|
release=1
|
2018-09-07 19:27:30 +10:00
|
|
|
source=()
|
|
|
|
|
|
|
|
build() {
|
|
|
|
install -d $PKG/usr/lib/ccache
|
|
|
|
|
2021-02-17 20:53:22 +11:00
|
|
|
local clang0="$(clang --version | awk '/version/ { split($3,i,"."); print i[1]"."i[2] }')"
|
|
|
|
local clang1="${clang0:0:2}"
|
2018-09-07 19:27:30 +10:00
|
|
|
|
2020-12-13 01:28:44 +11:00
|
|
|
if [ -z "$clang0" ]; then
|
2018-09-07 19:27:30 +10:00
|
|
|
echo 'Failed to find clang version'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
|
2019-11-28 23:05:15 +11:00
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
|
2018-09-07 19:27:30 +10:00
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
|
|
|
|
}
|