blob: ce82d41497b12271918af8cb6ba8c4e0d773f145 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/mkpkg
# description: GN meta-build system
# url: https://gn.googlesource.com/gn
# Depends on: python3 ninja clang
name=gn
version=0.2324
_commit=304bbef6c7e9a86630c12986b99c8654eb7fe648
release=1
source=(https://gn.googlesource.com/gn/+archive/${_commit}.tar.gz)
sha256sums=(
"63785159210399064a164aaabf2adcaf4289e068c68976cd7bffa3aa9fd14e6b"
)
build() {
cd "$SRC"
export CC=clang
export CXX=clang++
export AR=llvm-ar
export LDFLAGS="-fuse-ld=lld"
# Gentoo gn-gen-r8: comment out hardcoded -O3/-g, remove -pipe
sed -i "/cflags.append('-O3')/s/^/#/;
/cflags.append('-g')/s/^/#/;
/ldflags.append('-O3')/s/^/#/;
/options.no_strip/s/^/#/;
/'-pipe',/d;
/'-Wno-format',/d;
/'-Wno-strict-aliasing',/d" build/gen.py
# Fix ninja regen loop: the +archive tarball gives all files
# identical timestamps. Set them all to the past so gen.py
# outputs (build.ninja) will be strictly newer.
find . -type f -exec touch -t 200001010000 {} +
python3 build/gen.py \
--no-last-commit-position \
--no-static-libstdc++ \
--no-strip \
--allow-warnings
printf '%s\n' \
'#ifndef OUT_LAST_COMMIT_POSITION_H_' \
'#define OUT_LAST_COMMIT_POSITION_H_' \
'#define LAST_COMMIT_POSITION_NUM 2324' \
"#define LAST_COMMIT_POSITION \"2324 (${_commit})\"" \
'#endif' \
> out/last_commit_position.h
ninja -C out gn
install -Dm755 out/gn "$PKG/usr/bin/gn"
}
signify() {
untrusted comment: public key
RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}
# vim: filetype=sh
|