mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-09-19 22:08:32 +00:00
v8 & nodejs: fix v8, and nodejs to use shared lib
This commit is contained in:
parent
3b63403ef9
commit
87fd91c872
|
@ -14,7 +14,7 @@ pkgdesc='Evented I/O for V8 javascript'
|
|||
arch=('i686' 'x86_64' 'arm')
|
||||
url='http://nodejs.org/'
|
||||
license=('MIT')
|
||||
depends=('python2')
|
||||
depends=('python2' 'v8')
|
||||
checkdepends=('curl') # curl used for check()
|
||||
optdepends=('openssl: TLS support')
|
||||
options=('!emptydirs')
|
||||
|
@ -38,29 +38,13 @@ build() {
|
|||
# we're going to attept to make use of this example
|
||||
# https://github.com/joyent/node/issues/2131#issuecomment-3208846
|
||||
# https://gist.github.com/1574158
|
||||
# pathing scons
|
||||
sed -i "s/python/&2/" tools/scons/scons.py
|
||||
msg 'Selecting pre-compile of v8'
|
||||
# move up to v8
|
||||
cd deps/v8
|
||||
# run the scons script directly...
|
||||
if [ "$CARCH" == "arm" ]; then
|
||||
msg 'pre-compiling v8 for v5'
|
||||
# we need to override the arch (last one will be used) because
|
||||
# v8 thinks armv5te can use unaligned.. the kirkwood can't!
|
||||
CCFLAGS="$CCFLAGS -march=armv5t" ;
|
||||
export CCFLAGS ;
|
||||
../../tools/scons/scons.py arch=arm armeabi=soft mode=release snapshot=off
|
||||
fi
|
||||
if [ "$CARCH" == "armv7h" ]; then
|
||||
msg 'pre-compiling v8 for v7'
|
||||
../../tools/scons/scons.py arch=arm armeabi=hard mode=release snapshot=off vfp3=on
|
||||
fi
|
||||
# go back to the node source directory
|
||||
cd ../../
|
||||
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
--prefix=/usr \
|
||||
--shared-v8 \
|
||||
--shared-v8-libpath=/usr/lib \
|
||||
--shared-v8-includes=/usr/include \
|
||||
--without-snapshot
|
||||
|
||||
make
|
||||
}
|
||||
|
|
48
community/v8/PKGBUILD
Normal file
48
community/v8/PKGBUILD
Normal file
|
@ -0,0 +1,48 @@
|
|||
# $Id: PKGBUILD 62986 2012-01-30 06:42:07Z tdziedzic $
|
||||
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
|
||||
# Contributor: tocer <tocer.deng@gmail.com>
|
||||
|
||||
pkgname=v8
|
||||
pkgver=3.6.6.20
|
||||
pkgrel=1
|
||||
plugrel=1
|
||||
pkgdesc='A fast and modern javascript engine'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://code.google.com/p/v8'
|
||||
license=('BSD')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('subversion' 'scons')
|
||||
|
||||
build() {
|
||||
_source="http://v8.googlecode.com/svn/tags/${pkgver}"
|
||||
svn checkout "$_source" "${srcdir}/v8-${pkgver}"
|
||||
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
if [ "$CARCH" == "arm" ]; then
|
||||
msg 'pre-compiling v8 for v5'
|
||||
# we need to override the arch (last one will be used) because
|
||||
# v8 thinks armv5te can use unaligned.. the kirkwood can't!
|
||||
CCFLAGS="$CCFLAGS -march=armv5t" ;
|
||||
export CCFLAGS ;
|
||||
CARCH_V8="armeabi=soft"
|
||||
fi
|
||||
if [ "$CARCH" == "armv7h" ]; then
|
||||
CARCH_V8="armeabi=hard vfpv3=on"
|
||||
fi
|
||||
|
||||
scons mode=release library=shared arch=arm snapshot=off $CARCH_V8
|
||||
scons d8 arch=arm $CARCH_V8
|
||||
|
||||
find include -type f \
|
||||
-exec install -Dm644 {} ${pkgdir}/usr/{} \;
|
||||
rm -rf ${pkgdir}/usr/include/.svn
|
||||
|
||||
install -Dm755 d8 "${pkgdir}/usr/bin/d8"
|
||||
install -Dm755 libv8.so "${pkgdir}/usr/lib/libv8.so"
|
||||
|
||||
# install license
|
||||
install -d ${pkgdir}/usr/share/licenses/v8
|
||||
install -m644 LICENSE* \
|
||||
${pkgdir}/usr/share/licenses/v8
|
||||
}
|
Loading…
Reference in a new issue