mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added extra/gn
This commit is contained in:
parent
be1d285a69
commit
7b4c8161d0
2 changed files with 71 additions and 0 deletions
50
extra/gn/PKGBUILD
Normal file
50
extra/gn/PKGBUILD
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - strip -fstack-clash-protection from CFLAGS
|
||||
|
||||
pkgname=gn
|
||||
pkgver=0.2042.2ecd43a1
|
||||
_commit=2ecd43a10266bd091c98e6dcde507c64f6a0dad3
|
||||
pkgrel=1
|
||||
pkgdesc="Meta-build system that generates build files for Ninja"
|
||||
arch=('x86_64')
|
||||
url="https://gn.googlesource.com/gn/"
|
||||
license=('BSD')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('clang' 'ninja' 'python' 'git')
|
||||
source=(git+https://gn.googlesource.com/gn#commit=$_commit)
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd $pkgname
|
||||
echo 0.$(git rev-list --count initial-commit..).$(git rev-parse --short=8 HEAD)
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname
|
||||
# clang-13: error: argument unused during compilation: '-fstack-clash-protection' [-Werror,-Wunused-command-line-argument]
|
||||
CFLAGS=${CFLAGS/-fstack-clash-protection/}
|
||||
CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/}
|
||||
./build/gen.py
|
||||
ninja -C out
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $pkgname
|
||||
./out/gn_unittests
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname
|
||||
install -D out/gn "$pkgdir/usr/bin/gn"
|
||||
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" docs/*
|
||||
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles"
|
||||
cp -r misc/vim/{autoload,ftdetect,ftplugin,syntax} \
|
||||
"$pkgdir/usr/share/vim/vimfiles/"
|
||||
install -Dm644 -t "$pkgdir/usr/share/emacs/site-lisp" misc/emacs/gn-mode.el
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
21
extra/gn/chromium-gn-version.sh
Executable file
21
extra/gn/chromium-gn-version.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
readonly CURL='curl -s --compressed'
|
||||
|
||||
gn_revision_from_chrome_version() {
|
||||
$CURL "https://chromium.googlesource.com/chromium/src/+/$1/DEPS?format=TEXT" \
|
||||
| base64 -d | grep -Po "'gn_version': 'git_revision:\K[^']*"
|
||||
}
|
||||
|
||||
{
|
||||
echo channel version gn_revision
|
||||
echo ------- ------- -----------
|
||||
while read -r channel version; do
|
||||
echo "$channel $version $(gn_revision_from_chrome_version "$version")"
|
||||
done < <(
|
||||
$CURL https://omahaproxy.appspot.com/json \
|
||||
| jq -r '.[] | select ( .os == "linux" ) | .versions | .[] | "\(.channel) \(.version)"'
|
||||
)
|
||||
} | column -t
|
Loading…
Reference in a new issue