mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 19:24:37 +08:00
61 lines
1.6 KiB
Bash
61 lines
1.6 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
|
|
pkgbase=v8
|
|
pkgname=('v8' 'v8-src')
|
|
pkgver=3.25.28.12
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
depends=('gcc-libs' 'readline')
|
|
url="http://code.google.com/p/v8/"
|
|
license=('BSD')
|
|
makedepends=('python2' 'subversion')
|
|
source=(https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz)
|
|
# http://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.bz2
|
|
md5sums=('9ee3c2da7617f021adee2b1bc44e9e19')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
make dependencies
|
|
|
|
# The world isn't ready for python3
|
|
export PYTHON=python2
|
|
find build/ test/ tools/ src/ -type f \
|
|
-exec sed -e 's_^#!/usr/bin/env python$_&2_' \
|
|
-e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \
|
|
-e 's_^#!/usr/bin/python$_&2_' \
|
|
-e "s_'python'_'python2'_" -i {} \;
|
|
sed -i 's/python /python2 /' Makefile
|
|
|
|
make x64.release library=shared console=readline werror=no
|
|
}
|
|
|
|
package_v8() {
|
|
pkgdesc="V8 is Google's open source JavaScript engine."
|
|
depends=('glibc' 'gcc-libs' 'readline')
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}/out/x64.release"
|
|
|
|
install -D -m755 lib.target/libv8.so \
|
|
"${pkgdir}/usr/lib/libv8.so"
|
|
|
|
install -D -m755 d8 \
|
|
"${pkgdir}/usr/bin/d8"
|
|
}
|
|
|
|
package_v8-src() {
|
|
pkgdesc="V8 is Google's open source JavaScript engine. (Source package)"
|
|
|
|
install -d "${pkgdir}/usr/src/"
|
|
tar -zxvf "${srcdir}/${pkgver}.tar.gz" \
|
|
-C "${pkgdir}/usr/src/" \
|
|
--exclude-vcs
|
|
|
|
# Remove the version number from the source folder name
|
|
mv "${pkgdir}/usr/src/${pkgbase}-${pkgver}" \
|
|
"${pkgdir}/usr/src/${pkgbase}"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|