mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
adding community-nodejs & patch for v5
This commit is contained in:
parent
c078116bf4
commit
ba62c21747
2 changed files with 98 additions and 0 deletions
68
community/nodejs/PKGBUILD
Normal file
68
community/nodejs/PKGBUILD
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Maintainer: Thomas Dziedzic < gostrc at gmail >
|
||||||
|
# Contributor: James Campos <james.r.campos@gmail.com>
|
||||||
|
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
|
||||||
|
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
|
||||||
|
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
|
||||||
|
# Contributor: TIanyi Cui <tianyicui@gmail.com>
|
||||||
|
# Contributor: Jason Plum <max@warheads.net>
|
||||||
|
|
||||||
|
pkgname=nodejs
|
||||||
|
pkgver=0.6.8
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Evented I/O for V8 javascript'
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url='http://nodejs.org/'
|
||||||
|
license=('MIT')
|
||||||
|
depends=('python2')
|
||||||
|
checkdepends=('curl') # curl used for check()
|
||||||
|
optdepends=('openssl: TLS support')
|
||||||
|
options=('!emptydirs')
|
||||||
|
source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz"
|
||||||
|
'nodejs-armv5t.patch')
|
||||||
|
md5sums=('9fd7baa2d27b848c3134e6ae35bb87b2'
|
||||||
|
'27eb4bfa8da9707b6b326e47e99995de')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd node-v${pkgver}
|
||||||
|
|
||||||
|
msg 'fixing for python2 name'
|
||||||
|
find -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 {} \;
|
||||||
|
find test -type f -exec sed -e "s|python |python2 |" -i {} \;
|
||||||
|
sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
|
||||||
|
sed -i "s|python |python2 |" Makefile
|
||||||
|
find test -type f -exec sed -e 's/python/&2/' -i {} \;
|
||||||
|
sed -i "s/python/&2/" configure
|
||||||
|
|
||||||
|
export PYTHON=python2
|
||||||
|
if [ "$CARCH" == "arm" ]; then
|
||||||
|
msg 'patching for armv5te' ;
|
||||||
|
patch -p1 deps/v8/SConstruct < ../nodejs-armv5t.patch ;
|
||||||
|
fi
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr
|
||||||
|
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd node-v${pkgver}
|
||||||
|
|
||||||
|
# test failures in 0.6 are known
|
||||||
|
make test || true
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd node-v${pkgver}
|
||||||
|
|
||||||
|
make DESTDIR=${pkgdir} install
|
||||||
|
|
||||||
|
# install docs as per user request
|
||||||
|
install -d ${pkgdir}/usr/share/doc/nodejs
|
||||||
|
cp -r doc/api/api/* \
|
||||||
|
${pkgdir}/usr/share/doc/nodejs
|
||||||
|
|
||||||
|
install -D -m644 LICENSE \
|
||||||
|
${pkgdir}/usr/share/licenses/nodejs/LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:set ts=2 sw=2 et:
|
30
community/nodejs/nodejs-armv5t.patch
Normal file
30
community/nodejs/nodejs-armv5t.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
--- ../node-v0.6.8/deps/v8/SConstruct.org 2012-01-26 13:57:18.000000000 -0500
|
||||||
|
+++ ../node-v0.6.8/deps/v8/SConstruct 2012-01-26 15:08:37.000000000 -0500
|
||||||
|
@@ -79,7 +79,7 @@
|
||||||
|
},
|
||||||
|
'gcc': {
|
||||||
|
'all': {
|
||||||
|
- 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
|
||||||
|
+ 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv5t'],
|
||||||
|
'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'],
|
||||||
|
},
|
||||||
|
'visibility:hidden': {
|
||||||
|
@@ -154,12 +154,12 @@
|
||||||
|
},
|
||||||
|
'armeabi:softfp' : {
|
||||||
|
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'],
|
||||||
|
- 'vfp3:on': {
|
||||||
|
- 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
|
||||||
|
- },
|
||||||
|
- 'simulator:none': {
|
||||||
|
- 'CCFLAGS': ['-mfloat-abi=softfp'],
|
||||||
|
- }
|
||||||
|
+# 'vfp3:on': {
|
||||||
|
+# 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
|
||||||
|
+# },
|
||||||
|
+# 'simulator:none': {
|
||||||
|
+# 'CCFLAGS': ['-mfloat-abi=softfp'],
|
||||||
|
+# }
|
||||||
|
},
|
||||||
|
'armeabi:hard' : {
|
||||||
|
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1'],
|
Loading…
Reference in a new issue