diff options
author | Paul Hentschel (hpmachining) | 2019-06-30 09:57:05 -0400 |
---|---|---|
committer | Paul Hentschel (hpmachining) | 2019-06-30 12:05:28 -0400 |
commit | 9fd157d74dbdde857ddbe77a1904ecdf083d373a (patch) | |
tree | a896a47172e51c971fcfb3e3fb282e2afc33ca77 | |
download | aur-v8-6.8.tar.gz |
Initial commit.
Creating versioned v8 6.8 package for building latest cbang-git and
camotics-git. Used https://github.com/JanMarvin/v8-R.git as starting
point.
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 153 | ||||
-rw-r--r-- | d8 | 3 | ||||
-rw-r--r-- | v8.pc | 11 | ||||
-rw-r--r-- | v8_libbase.pc | 10 | ||||
-rw-r--r-- | v8_libplatform.pc | 10 |
7 files changed, 235 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..81ff1b4c3766 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,40 @@ +pkgbase = v8-6.8 + pkgdesc = Fast and modern Javascript engine used in Google Chrome. + pkgver = 6.8.275.32 + pkgrel = 1 + url = https://v8.dev + arch = x86_64 + license = BSD + makedepends = clang + makedepends = clang-tools-extra + makedepends = lld + makedepends = llvm + makedepends = python2 + makedepends = python2-colorama + makedepends = python2-pylint + makedepends = python2-lazy-object-proxy + makedepends = python2-singledispatch + makedepends = python2-wrapt + makedepends = ninja + makedepends = git + makedepends = wget + depends = icu + conflicts = v8 + conflicts = v8-3.14 + conflicts = v8-3.15 + conflicts = v8-3.20 + conflicts = v8-static-gyp + conflicts = v8-static-gyp-5.4 + source = depot_tools::git+https://chromium.googlesource.com/chromium/tools/depot_tools.git + source = v8.pc + source = v8_libbase.pc + source = v8_libplatform.pc + source = d8 + sha256sums = SKIP + sha256sums = 3616bcfb15af7cd5a39bc0f223b2a52f15883a4bc8cfcfb291837c7421363d75 + sha256sums = efb37bd706e6535abfa20c77bb16597253391619dae275627312d00ee7332fa3 + sha256sums = ae23d543f655b4d8449f98828d0aff6858a777429b9ebdd2e23541f89645d4eb + sha256sums = 6abb07ab1cf593067d19028f385bd7ee52196fc644e315c388f08294d82ceff0 + +pkgname = v8-6.8 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..dc1324cee74b --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore +!v8_libbase.pc +!v8_libplatform.pc +!v8.pc +!d8 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8eb3feeffe13 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,153 @@ +# Maintainer: Paul Hentschel (hpmachining) +# Contributor: Marco Pompili <aur (at) mg.odd.red> +# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com> +# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> +# Contributor: Kaiting Chen <kaitocracy@gmail.com> +# Contributor: tocer <tocer.deng@gmail.com> +# Contributor: David Flemström <david.flemstrom@gmail.com> +# Contributor: Jan Marvin Garbuszus <jan.garbuszus@rub.de> + +pkgname=v8-6.8 +pkgver=6.8.275.32 +pkgrel=1 +pkgdesc="Fast and modern Javascript engine used in Google Chrome." +arch=('x86_64') +url="https://v8.dev" +license=('BSD') +depends=('icu') +makedepends=('clang' 'clang-tools-extra' 'lld' 'llvm' 'python2' 'python2-colorama' 'python2-pylint' 'python2-lazy-object-proxy' 'python2-singledispatch' 'python2-wrapt' 'ninja' 'git' 'wget') +conflicts=('v8' 'v8-3.14' 'v8-3.15' 'v8-3.20' 'v8-static-gyp' 'v8-static-gyp-5.4') +source=("depot_tools::git+https://chromium.googlesource.com/chromium/tools/depot_tools.git" + "v8.pc" + "v8_libbase.pc" + "v8_libplatform.pc" + "d8") +sha256sums=('SKIP' + '3616bcfb15af7cd5a39bc0f223b2a52f15883a4bc8cfcfb291837c7421363d75' + 'efb37bd706e6535abfa20c77bb16597253391619dae275627312d00ee7332fa3' + 'ae23d543f655b4d8449f98828d0aff6858a777429b9ebdd2e23541f89645d4eb' + '6abb07ab1cf593067d19028f385bd7ee52196fc644e315c388f08294d82ceff0') + + +#case "$CARCH" in +# x86_64) V8_ARCH="x64" ;; +#esac + +OUTFLD=out.gn/Release + +prepare() { + + export CC=/usr/bin/clang + export CXX=/usr/bin/clang++ + + # Switching to python2 system environment + mkdir -p bin + ln -sf /usr/bin/python2 ./bin/python + ln -sf /usr/bin/python2-config ./bin/python-config + + export PATH=${srcdir}/bin:`pwd`/depot_tools:"$PATH" + export GYP_GENERATORS=ninja + + msg "Using: `which python`" + + if [ ! -d "v8" ]; then + msg "Fetching V8 code" + yes | fetch v8 + fi + + cd $srcdir/v8 + + msg "Reset repository" + git reset --hard + + if [ -f third_party/icu/BUILD.gn.orig ] + then + msg "Restoring bundled ICU build files for syncing" + python2 $srcdir/v8/build/linux/unbundle/replace_gn_files.py --undo --system-libraries icu + fi + + msg "Syncing, this can take a while..." + $srcdir/depot_tools/gclient sync -D --force --reset + $srcdir/depot_tools/gclient sync --revision ${pkgver} + + msg "Using system libraries for ICU" + $srcdir/v8/build/linux/unbundle/replace_gn_files.py --system-libraries icu + + sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/v8.pc" + sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/v8_libbase.pc" + sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/v8_libplatform.pc" + + msg "Running GN..." + $srcdir/depot_tools/gn gen $OUTFLD \ + -vv --fail-on-unused-args \ + --args='clang_base_path="/usr/" + is_clang=true + is_asan=false + clang_use_chrome_plugins=false + is_component_build=true + is_debug=false + is_official_build=false + treat_warnings_as_errors=false + v8_enable_i18n_support=true + v8_use_external_startup_data=false + use_custom_libcxx=false + linux_use_bundled_binutils=false + use_sysroot=false' +} + +build() { + cd $srcdir/v8 + + # Fixes bug in generate_shim_headers.py that fails to create these dirs + msg "Adding icu missing folders" + mkdir -p "$OUTFLD/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode/" + mkdir -p "$OUTFLD/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode/" + + msg "Building, this will take a while..." + ninja -C $OUTFLD +} + +check() { + cd $srcdir/v8 + + msg "Testing, this will also take a while..." + tools/run-tests.py --no-presubmit \ + --outdir=out.gn \ + --buildbot \ + --arch=x64 \ + --mode=Release || true +} + +package() { + cd $srcdir/v8 + + install -d ${pkgdir}/usr/lib/v8 + + install -Dm755 $OUTFLD/cctest ${pkgdir}/usr/lib/v8/cctest + install -Dm755 $OUTFLD/d8 ${pkgdir}/usr/lib/v8/d8 + + # install -Dm755 $OUTFLD/libv8_for_testing.so ${pkgdir}/usr/lib/libv8_for_testing.so + install -Dm755 $OUTFLD/libv8_libbase.so ${pkgdir}/usr/lib/libv8_libbase.so + install -Dm755 $OUTFLD/libv8_libplatform.so ${pkgdir}/usr/lib/libv8_libplatform.so + install -Dm755 $OUTFLD/libv8.so ${pkgdir}/usr/lib/libv8.so + + install -Dm755 ${srcdir}/d8 ${pkgdir}/usr/bin/d8 + + # V8 has several header files and ideally if it had its own folder in /usr/include + # But doing it here will break all users. Ideally if they use provided pkgconfig file. + install -d ${pkgdir}/usr/include + install -Dm644 include/*.h ${pkgdir}/usr/include + + install -d ${pkgdir}/usr/include/libplatform + install -Dm644 include/libplatform/*.h ${pkgdir}/usr/include/libplatform + + install -d ${pkgdir}/usr/lib/pkgconfig + install -m644 $srcdir/v8.pc ${pkgdir}/usr/lib/pkgconfig + install -m644 $srcdir/v8_libbase.pc ${pkgdir}/usr/lib/pkgconfig + install -m644 $srcdir/v8_libplatform.pc ${pkgdir}/usr/lib/pkgconfig + + install -d ${pkgdir}/usr/share/licenses/$pkgname + install -m644 LICENSE* ${pkgdir}/usr/share/licenses/$pkgname +} + +# vim:set ts=2 sw=2 et: @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /usr/lib/v8/d8 "$@" diff --git a/v8.pc b/v8.pc new file mode 100644 index 000000000000..e839e566903c --- /dev/null +++ b/v8.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @VERSION@ +Requires: icu-uc, icu-i18n, v8_libbase = @VERSION@ +Libs: -L${libdir} -lv8 -pthread +Cflags: -I${includedir} diff --git a/v8_libbase.pc b/v8_libbase.pc new file mode 100644 index 000000000000..64c9503c00d8 --- /dev/null +++ b/v8_libbase.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Base library +Version: @VERSION@ +Libs: -L${libdir} -lv8_libbase +Cflags: -I${includedir} diff --git a/v8_libplatform.pc b/v8_libplatform.pc new file mode 100644 index 000000000000..54c697a197db --- /dev/null +++ b/v8_libplatform.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Platform library +Version: @VERSION@ +Libs: -L${libdir} -lv8_libplatform -pthread +Cflags: -I${includedir} |