community/nodejs to 4.0.0-1

This commit is contained in:
Kevin Mihelich 2015-09-16 18:41:44 +00:00
parent 26f2efe8e2
commit 91a1192d5a
2 changed files with 12 additions and 54 deletions

View file

@ -9,7 +9,7 @@
# Contributor: Jason Plum <jplum@archlinuxarm.org>
pkgname=nodejs
pkgver=0.12.7
pkgver=4.0.0
pkgrel=1
pkgdesc='Evented I/O for V8 javascript'
arch=('i686' 'x86_64' 'arm')
@ -21,8 +21,8 @@ makedepends=('python2' 'procps-ng')
optdepends=('npm: nodejs package manager')
source=("http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz"
'arm.patch')
sha256sums=('b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d'
'37cec64b8364c1ecb13f914b44dc86eb12a72be985f78e6d07b5ced91edfe246')
sha256sums=('e110e5a066f3a6fe565ede7dd66f3727384b9b5c5fbf46f8db723d726e2f5900'
'218c1e89b50819dfe91f25fc3a1ea4143e8af2a3927d99dcae58eba1b14b4c86')
set_flags_for_arm() {
if [ "$CARCH" == "arm" ]; then
@ -48,10 +48,15 @@ prepare() {
patch -p1 -i ../arm.patch
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|python |python2 |" Makefile
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_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\
-e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\
-e "s_'python'_'python2'_" -i {} \;
find test/ -type f -exec sed 's_python _python2 _' -i {} \;
}
build() {

View file

@ -20,50 +20,3 @@ index 1d47360..9c2e376 100644
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
index adce69d..3f35a08 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -365,7 +365,7 @@ CPU::CPU() : stepping_(0),
//
// See http://code.google.com/p/android/issues/detail?id=10812
//
- // We try to correct this by looking at the 'elf_format'
+ // We try to correct this by looking at the 'elf_platform'
// field reported by the 'Processor' field, which is of the
// form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
// an ARMv6-one. For example, the Raspberry Pi is one popular
@@ -377,6 +377,17 @@ CPU::CPU() : stepping_(0),
}
delete[] processor;
}
+
+ // elf_platform moved to the model name field in Linux v3.8.
+ if (architecture_ == 7) {
+ char* processor = cpu_info.ExtractField("model name");
+ if (HasListItem(processor, "(v6l)")) {
+ architecture_ = 6;
+ } else if (HasListItem(processor, "(v5t)")) {
+ architecture_ = 5;
+ }
+ delete[] processor;
+ }
}
// Try to extract the list of CPU features from ELF hwcaps.
@@ -427,6 +438,15 @@ CPU::CPU() : stepping_(0),
architecture_ = 6;
}
+ if (architecture_ < 6) {
+ architecture_ = 5;
+ has_thumb2_ = false;
+ has_vfp_ = false;
+ has_vfp3_ = false;
+ has_vfp3_d32_ = false;
+ has_neon_ = false;
+ }
+
// We don't support any FPUs other than VFP.
has_fpu_ = has_vfp_;