void-packages/srcpkgs/gn/template
2025-04-03 02:32:49 +02:00

40 lines
1,009 B
Bash

# Template file for 'gn'
pkgname=gn
version=0.0.20250402
revision=1
_ref=6e8e0d6d4a151ab2ed9b4a35366e630c55888444
create_wrksrc=yes
hostmakedepends="python3 ninja"
short_desc="Meta-build system that generates build files for Ninja"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://gn.googlesource.com/gn"
distfiles="https://gn.googlesource.com/gn/+archive/${_ref}.tar.gz"
checksum=@a0c07348d1e6bfb3cbedb19faa9e4907aa01891ab5f7cc7a368179b188a3370f
do_configure() {
cat <<-EOF >src/gn/last_commit_position.h
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 0
#define LAST_COMMIT_POSITION "0 (${_ref})"
#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
./build/gen.py --no-last-commit-position --no-static-libstdc++ --no-strip --allow-warnings
}
do_build() {
ninja ${makejobs} -C out gn
}
do_check() {
ninja ${makejobs} -C out gn_unittests
./out/gn_unittests
}
do_install() {
vbin out/gn
vlicense LICENSE
}