contrib/gn/Pkgfile

30 lines
1010 B
Plaintext
Raw Normal View History

2020-06-15 11:25:35 +02:00
# Description: Meta-build system that generates build files for Ninja
# URL: https://gn.googlesource.com/gn
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: python3 ninja clang
name=gn
version=20200520
release=1
2020-06-17 23:49:19 +02:00
source=(https://nullvoid.de/crux/distfiles/$name-$version.tar.gz)
# because this ALWAYS changes it's signature! -.-
#https://gn.googlesource.com/gn/+archive/2c801de70b8ed3c8e404245d61d32a3d61b328d0.tar.gz)
2020-06-15 11:25:35 +02:00
build() {
2020-06-17 23:49:19 +02:00
[[ -e /usr/bin/clang && -e /usr/bin/clang++ ]] && export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib
2020-06-15 11:25:35 +02:00
unset CFLAGS
2020-11-03 19:19:50 +01:00
/usr/bin/python3 build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++
2020-06-15 11:25:35 +02:00
export CXXFLAGS=+" -std=c++17"
cat >out/last_commit_position.h <<-EOF
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM ${version}
#define LAST_COMMIT_POSITION "${version}"
#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
ninja -C out gn
install -D out/gn $PKG/usr/bin/gn
}