mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 18:17:14 +08:00
71 lines
2.1 KiB
Bash
71 lines
2.1 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakraos.org
|
|
#
|
|
|
|
pkgname=v8
|
|
# use http://omahaproxy.appspot.com/ to find stable v8 version
|
|
pkgver=3.30.33.15
|
|
pkgrel=1
|
|
pkgdesc='Fast and modern Javascript engine'
|
|
arch=('x86_64')
|
|
url='http://code.google.com/p/v8'
|
|
license=('BSD')
|
|
depends=('readline' 'icu')
|
|
makedepends=('python2' 'ninja')
|
|
provides=('v8-src')
|
|
conflicts=('v8-src')
|
|
replaces=('v8-src')
|
|
# unfortunately https://github.com/$pkgname/$pkgname does not contain all tags
|
|
source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver-lite.tar.bz2
|
|
v8.pc)
|
|
sha256sums=('b17a6e7a04ec86a2b908eee1a0415f676a91fa81c8b8b3e7f8755d2053787aa4'
|
|
'2b054309df9af9fb2e3e14527e88360b44745649b4866e592fb357ac90935f5d')
|
|
|
|
prepare() {
|
|
cd v8-$pkgver
|
|
|
|
find build/ test/ tools/ src/ -type f -exec \
|
|
sed -e 's_^#!/usr/bin/env python$_&2_' \
|
|
-e 's_^#!/usr/bin/python$_&2_' \
|
|
-e "s_'python'_'python2'_" -i {} \;
|
|
|
|
sed 's/\bpython\b/python2/' -i Makefile build/gyp/gyp
|
|
|
|
sed "s/@VERSION@/$pkgver/g" -i "$srcdir/v8.pc"
|
|
}
|
|
|
|
build() {
|
|
cd v8-$pkgver
|
|
|
|
build/gyp_v8 -Dv8_enable_i18n_support=1 -Duse_system_icu=1 -Dconsole=readline -Dcomponent=shared_library -Dv8_target_arch=x64 -Dwerror= -f ninja
|
|
|
|
ninja -C out/Release all # or target 'v8 d8' if you do not need tests
|
|
}
|
|
|
|
check() {
|
|
cd v8-$pkgver
|
|
|
|
# the test fails https://code.google.com/p/v8/issues/detail?id=2899
|
|
rm test/intl/collator/default-locale.js
|
|
|
|
tools/run-tests.py --no-presubmit --outdir=out --buildbot --arch=x64 --mode=Release # --progress=dots
|
|
}
|
|
|
|
package() {
|
|
cd v8-$pkgver
|
|
|
|
install -Dm755 out/Release/d8 "$pkgdir"/usr/bin/d8
|
|
install -Dm755 out/Release/lib/libv8.so "$pkgdir"/usr/lib/libv8.so
|
|
|
|
# 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/lib/pkgconfig
|
|
install -m644 "$srcdir/v8.pc" "$pkgdir"/usr/lib/pkgconfig
|
|
|
|
install -d "$pkgdir"/usr/share/licenses/v8
|
|
install -m644 LICENSE* "$pkgdir"/usr/share/licenses/v8
|
|
}
|