-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Template file for 'gn' | ||
pkgname=gn | ||
version=0.0.20240706 | ||
revision=1 | ||
_ref=b3a0bff47dd81073bfe67a402971bad92e4f2423 | ||
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=907cf038d586147c5708216536b6f8a8cc03c2635488f3f0b669c57faa4582a5 | ||
|
||
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 | ||
} |