Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions recipes/nodejs/nodejs4.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,23 @@ def map_dest_cpu(target_arch, d):
elif re.match('arm64$', target_arch): return 'arm'
return target_arch

ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}"
ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
'--with-arm-fpu=vfp', d), d), d)}"
ARCHFLAGS ?= ""

GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "


do_configure () {
export LD="${CXX}"
alias g++="${CXX}"
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
./configure --prefix="${prefix}" \
--dest-cpu="${@map_dest_cpu(d.getVar('TARGET_ARCH', True), d)}" \
--dest-os=linux ${ARCHFLAGS}
--dest-os=linux ${ARCHFLAGS}
unalias g++
}

Expand Down
74 changes: 2 additions & 72 deletions recipes/nodejs/nodejs5.inc
Original file line number Diff line number Diff line change
@@ -1,72 +1,2 @@
DESCRIPTION = "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine"
HOMEPAGE = "http://nodejs.org"

INC_PR = "r0"
PR = "${INC_PR}.0"

PROVIDES = "node"
RPROVIDES_${PN} = "node"
RCONFLICTS_${PN} = "iojs"

SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz;name=src"

S = "${WORKDIR}/node-v${PV}"

# v8 errors out if you have set CCACHE
CCACHE = ""

def map_dest_cpu(target_arch, d):
import re
if re.match('p(pc|owerpc)(|64)', target_arch): return 'ppc'
elif re.match('i.86$', target_arch): return 'ia32'
elif re.match('x86_64$', target_arch): return 'x64'
elif re.match('arm64$', target_arch): return 'arm'
return target_arch

ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}"
ARCHFLAGS ?= ""

GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "

do_configure () {
export LD="${CXX}"
alias g++="${CXX}"
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
./configure --prefix="${prefix}" \
--dest-cpu="${@map_dest_cpu(d.getVar('TARGET_ARCH', True), d)}" \
--dest-os=linux ${ARCHFLAGS}
unalias g++
}

do_compile () {
export LD="${CXX}"
alias g++="${CXX}"
make ${PARALLEL_MAKE} BUILDTYPE=Release
unalias g++
}

do_install () {
oe_runmake DESTDIR=${D} install
}

do_install_append_class-native() {
# make sure we use node from PATH instead of absolute path to sysroot
sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js
}

do_install_append_class-target() {
# make sure we use node from PATH instead of absolute path to sysroot
sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js
}

PACKAGES =+ "${PN}-npm"
FILES_${PN}-npm = "${libdir}/node_modules ${bindir}/npm"
RDEPENDS_${PN}-npm = "bash python-compiler python-shell python-datetime python-subprocess python-multiprocessing python-crypt python-textutils python-netclient python-misc"

PACKAGES =+ "${PN}-dtrace"
FILES_${PN}-dtrace = "${libdir}/dtrace"

PACKAGES =+ "${PN}-systemtap"
FILES_${PN}-systemtap = "${datadir}/systemtap"

BBCLASSEXTEND = "native"
# Currently Node.js 5.x can be built exactly the same way as Node.js 4.x
require nodejs4.inc