diff options
author | Tim Biermann <tbier@posteo.de> | 2020-06-15 09:25:35 +0000 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2020-06-15 09:44:01 +0000 |
commit | ca9c0b1a37296a8c98babf40c3da8356eb5abb19 (patch) | |
tree | 950af1a241548de4ff823000ab568d1101df463e /gn/Pkgfile | |
parent | 2f570865cf3a483db0c91fd9d1ed9b06d04f5453 (diff) | |
download | contrib-ca9c0b1a37296a8c98babf40c3da8356eb5abb19.tar.gz contrib-ca9c0b1a37296a8c98babf40c3da8356eb5abb19.tar.xz |
gn: initial commit, version 20200520
Diffstat (limited to 'gn/Pkgfile')
-rw-r--r-- | gn/Pkgfile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gn/Pkgfile b/gn/Pkgfile new file mode 100644 index 000000000..69c1ec161 --- /dev/null +++ b/gn/Pkgfile @@ -0,0 +1,30 @@ +# 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 +source=(https://gn.googlesource.com/gn/+archive/2c801de70b8ed3c8e404245d61d32a3d61b328d0.tar.gz) + +build() { + #[[ -e /usr/bin/clang && -e /usr/bin/clang++ && -e /usr/bin/lld ]] && export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib LDFLAGS+=' -fuse-ld=lld' || echo "Please install clang first" + unset CFLAGS + #patch -Np1 -i gn-gen-r4.patch + #patch -Np1 -i lastcommit.patch + + python3 build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++ + #python3 build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++ + 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 +} |