# Contributor: TBK # Maintainer: Lauren N. Liberda pkgname=gn pkgver=0_git20230709 pkgrel=2 _commit=fae280eabe5d31accc53100137459ece19a7a295 pkgdesc="Meta-build system that generates build files for Ninja" arch="all" url="https://gn.googlesource.com/gn" license="BSD-3-Clause" depends="samurai" makedepends="python3" # gitiles has no clones source="https://dev.alpinelinux.org/archive/gn/gn-$_commit.tar.xz lfs64.patch " builddir="$srcdir/gn" _disturl="dev.alpinelinux.org:/archive/gn/" snapshot() { clean deps mkdir -p "$srcdir" && cd "$srcdir" git clone https://gn.googlesource.com/gn ( cd gn git checkout -q $_commit python3 ./build/gen.py ) rm -rf gn/.git tar c gn | xz -T0 -9 -e -vv - > "$SRCDEST"/gn-$_commit.tar.xz rsync --progress -La "$SRCDEST"/gn-$_commit.tar.xz $_disturl } build() { unset CFLAGS # all sources C++ but passes both CXXFLAGS="$CXXFLAGS -flto=auto" \ python3 ./build/gen.py \ --no-last-commit-position \ --no-static-libstdc++ \ --no-strip \ --allow-warnings ninja -C out } check() { ./out/gn_unittests } package() { install -Dm755 out/gn "$pkgdir"/usr/bin/gn } sha512sums=" 6fbad655f8fa070051efa27d5339ca1ba598964ee7687ab849d0393a96558dbd0e2ee0e2df9c53c609c30a2ff1afc7b9ea9379234ec8a72c48f12017037be1d5 gn-fae280eabe5d31accc53100137459ece19a7a295.tar.xz 1f0268a380a4d6f67446c6c3fe5c898c7241dde2881a790b86cabd68836aefffa776d85e323088b093c839965f3a076fcaf12ecaf022b1731cdfdfc2015330da lfs64.patch "