From ba62c21747f7c02337526b74f358978830ecc66f Mon Sep 17 00:00:00 2001 From: WarheadsSE Date: Thu, 26 Jan 2012 21:19:01 -0500 Subject: [PATCH] adding community-nodejs & patch for v5 --- community/nodejs/PKGBUILD | 68 ++++++++++++++++++++++++++++ community/nodejs/nodejs-armv5t.patch | 30 ++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 community/nodejs/PKGBUILD create mode 100644 community/nodejs/nodejs-armv5t.patch diff --git a/community/nodejs/PKGBUILD b/community/nodejs/PKGBUILD new file mode 100644 index 000000000..b9c81cc27 --- /dev/null +++ b/community/nodejs/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Thomas Dziedzic < gostrc at gmail > +# Contributor: James Campos +# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com > +# Contributor: Dongsheng Cai +# Contributor: Masutu Subric +# Contributor: TIanyi Cui +# Contributor: Jason Plum + +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: diff --git a/community/nodejs/nodejs-armv5t.patch b/community/nodejs/nodejs-armv5t.patch new file mode 100644 index 000000000..21345f245 --- /dev/null +++ b/community/nodejs/nodejs-armv5t.patch @@ -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'],