blob: 85b3c943cfb6e25e311b915e14660d3786956096 (
plain)
1 # Description: Meta-build system that generates build files for Ninja
2 # URL: https://gn.googlesource.com/gn
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: python3 ninja clang
5
6 name=gn
7 version=20200520
8 release=1
9 source=(https://nullvoid.de/crux/distfiles/$name-$version.tar.gz)
10 # because this ALWAYS changes it's signature! -.-
11 #https://gn.googlesource.com/gn/+archive/2c801de70b8ed3c8e404245d61d32a3d61b328d0.tar.gz)
12
13 build() {
14 [[ -e /usr/bin/clang && -e /usr/bin/clang++ ]] && export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib
15 unset CFLAGS
16
17 /usr/bin/python3 build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++
18 export CXXFLAGS=+" -std=c++17"
19 cat >out/last_commit_position.h <<-EOF
20 #ifndef OUT_LAST_COMMIT_POSITION_H_
21 #define OUT_LAST_COMMIT_POSITION_H_
22 #define LAST_COMMIT_POSITION_NUM ${version}
23 #define LAST_COMMIT_POSITION "${version}"
24 #endif // OUT_LAST_COMMIT_POSITION_H_
25 EOF
26
27 ninja -C out gn
28 install -D out/gn $PKG/usr/bin/gn
29 }
|