blob: 14d039a2dc54eaae6d79c6ee5feb14a2c8ed6947 (
plain)
1 # Description: Masquerade directory to use ccache with clang.
2 # URL: https://ccache.dev/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: ccache clang
5
6 name=clang-ccache-bindings
7 version=15
8 release=1
9 source=()
10
11 build() {
12 install -d $PKG/usr/lib/ccache
13
14 local clang0="$(clang --version | awk '/version/ { split($3,i,"."); print i[1]"."i[2] }')"
15 local clang1="${clang0:0:2}"
16
17 if [ -z "$clang0" ]; then
18 echo 'Failed to find clang version'
19 exit 1
20 fi
21
22 ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
23 ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
24 ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
25 ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
26 }
|