Skip to content

Commit

Permalink
New package: gn-0.1819.e327ffdc
Browse files Browse the repository at this point in the history
  • Loading branch information
shizonic committed Oct 18, 2020
1 parent 9d82bbf commit df45ea2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
16 changes: 16 additions & 0 deletions srcpkgs/gn/patches/gcc-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/build/gen.py b/build/gen.py
index 9353fb17b1bb..bd0fb4e6ee8c 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -338,6 +338,11 @@ def WriteGNNinja(path, platform, host, options):
if options.use_lto:
cflags.extend(['-flto', '-fwhole-program-vtables'])
ldflags.extend(['-flto', '-fwhole-program-vtables'])
+ cflags.append('-flto')
+ ldflags.append('-flto')
+ if "clang" in cxx:
+ cflags.append('-fwhole-program-vtables')
+ ldflags.append('-fwhole-program-vtables')

cflags.extend([
'-D_FILE_OFFSET_BITS=64',
33 changes: 33 additions & 0 deletions srcpkgs/gn/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Template file for 'gn'
pkgname=gn
version=0.1819.e327ffdc
revision=1
archs="x86_64 i686"
_commit=e327ffdc503815916db2543ec000226a8df45163
create_wrksrc=yes
hostmakedepends="clang ninja python"
depends="libglib-devel"
short_desc="Meta-build system that generates build files for Ninja"
maintainer="shizonic <realtiaz@gmail.com>"
license="BSD-2-Clause"
homepage="https://gn.googlesource.com/gn/"
distfiles="https://gn.googlesource.com/gn/+archive/${_commit}.tar.gz"
checksum=adbf1d25252f778f82f49d34e60096d31d5eadd83777d23317ea6dffb0e56ec7
patch_args="-Np1"

do_build() {
CFLAGS="${CFLAGS} -pthread" \
CXXFLAGS="${CXXFLAGS} -pthread" \
LDFLAGS="${LDFLAGS} -pthread" \
python build/gen.py \
--no-last-commit-position \
--use-lto \
--no-strip
ninja -C out
}

do_install() {
vbin out/gn
vdoc docs/*
vlicense LICENSE
}

0 comments on commit df45ea2

Please sign in to comment.