From 653e9ff9ac03dd4f7c5c2196280b3137bcc49043 Mon Sep 17 00:00:00 2001 From: Adrian Panella Date: Tue, 3 Jan 2017 15:23:51 -0600 Subject: [PATCH 1/3] node: bump version and tweak config Bump version to 6.11.0 Add ICU dependency when using i18n Tweak fpu configs Signed-off-by: Adrian Panella --- lang/node/Makefile | 74 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/lang/node/Makefile b/lang/node/Makefile index 4d72ffa88..42fea4f16 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v4.4.5 +PKG_VERSION:=v6.11.0 PKG_RELEASE:=2 - PKG_SOURCE:=node-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION} -PKG_MD5SUM:=376140907bbe362f36065a30af04f020 +PKG_HASH:=02ba35391edea2b294c736489af01954ce6e6c39d318f4423ae6617c69ef0a51 HOST_BUILD_DEPENDS:=python/host PKG_BUILD_DEPENDS:=python/host + PKG_INSTALL:=1 PKG_USE_MIPS16:=0 @@ -24,7 +24,8 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=John Crispin -PKG_LICENSE:= +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -35,7 +36,7 @@ define Package/node SUBMENU:=Node.js TITLE:=Node.js is a platform built on Chrome's JavaScript runtime URL:=http://nodejs.org/ - DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +zlib + DEPENDS:=+libstdcpp +libopenssl +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt +NODEJS_ICU:icu endef define Package/node/description @@ -57,27 +58,69 @@ define Package/node-npm/description NPM is the package manager for NodeJS endef -CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))) +define Package/node/config + menu "Module Selection" + + config NODEJS_ICU + bool "enable i18n features" + default n + + endmenu +endef + +NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -MAKE_VARS += \ - DESTCPU=$(CPU) +MAKE_VARS+= \ + DESTCPU=$(NODEJS_CPU) -CONFIGURE_ARGS= \ - --dest-cpu=$(CPU) \ +CONFIGURE_ARGS:= \ + --dest-cpu=$(NODEJS_CPU) \ --dest-os=linux \ --without-snapshot \ --shared-zlib \ --shared-openssl \ --prefix=/usr -ifneq ($(findstring arm,$(ARCH)),) +ifneq ($(findstring arm,$(NODEJS_CPU)),) +ifeq ($(CONFIG_SOFT_FLOAT),y) +CONFIGURE_ARGS+= with-arm-float-abi=softfp +else + +CONFIGURE_ARGS+= --with-arm-float-abi=hard + +ifneq ($(findstring vfp,$(CONFIG_CPU_TYPE)),) +ARM_FPU=vfp +endif + +ifneq ($(findstring vfpv3,$(CONFIG_CPU_TYPE)),) +ARM_FPU=vfpv3 +endif + +ifneq ($(findstring vfpv3-d16,$(CONFIG_CPU_TYPE)),) +ARM_FPU=vfpv3-d16 +endif + +ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),) +ARM_FPU=neon +endif + +CONFIGURE_ARGS+= --with-arm-fpu=$(ARM_FPU) +endif +endif + +ifneq ($(findstring mips,$(NODEJS_CPU)),) +ifeq ($(CONFIG_SOFT_FLOAT),y) CONFIGURE_ARGS+= \ - $(if $(CONFIG_SOFT_FLOAT),--with-arm-float-abi=soft,--with-arm-float-abi=hard) + --with-mips-float-abi=soft +endif endif -ifneq ($(findstring mips,$(ARCH)),) +ifeq ($(CONFIG_NODEJS_ICU),y) CONFIGURE_ARGS+= \ - $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft,--with-mips-float-abi=hard) + --with-intl=system-icu +else +CONFIGURE_ARGS+= \ + --with-intl=none endif HOST_CONFIGURE_VARS:= @@ -85,6 +128,7 @@ HOST_CONFIGURE_VARS:= HOST_CONFIGURE_ARGS:= \ --dest-os=linux \ --without-snapshot \ + --shared-zlib \ --prefix=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_CMD:=python ./configure From 162c6a70c92cc139d815e76c3a8068b8cb7f6386 Mon Sep 17 00:00:00 2001 From: Adrian Panella Date: Wed, 16 Aug 2017 20:50:29 -0500 Subject: [PATCH 2/3] node: bump version and add maintainer Signed-off-by: Adrian Panella --- lang/node/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/node/Makefile b/lang/node/Makefile index 42fea4f16..637f5fb96 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v6.11.0 +PKG_VERSION:=v6.11.2 PKG_RELEASE:=2 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION} -PKG_HASH:=02ba35391edea2b294c736489af01954ce6e6c39d318f4423ae6617c69ef0a51 +PKG_HASH:=04af4992238b19124ea56f1bcfda36827613a24eb3b00fc3b50f261a415a26e4 HOST_BUILD_DEPENDS:=python/host PKG_BUILD_DEPENDS:=python/host @@ -23,7 +23,7 @@ PKG_USE_MIPS16:=0 HOST_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1 -PKG_MAINTAINER:=John Crispin +PKG_MAINTAINER:=John Crispin , Adrian Panella PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From 2a42edabdbc0b33a7923fc4306dd57391df07286 Mon Sep 17 00:00:00 2001 From: Adrian Panella Date: Thu, 17 Aug 2017 01:06:13 -0500 Subject: [PATCH 3/3] node: fix path patch Signed-off-by: Adrian Panella --- lang/node/patches/003-path.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch index 01a71c6a3..7938c804b 100644 --- a/lang/node/patches/003-path.patch +++ b/lang/node/patches/003-path.patch @@ -1,12 +1,13 @@ --- a/lib/module.js +++ b/lib/module.js -@@ -453,7 +453,8 @@ Module._initPaths = function() { - homeDir = process.env.HOME; +@@ -625,7 +625,8 @@ + } else { + prefixDir = path.resolve(process.execPath, '..', '..'); } - -- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; -+ var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'), -+ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')]; +- var paths = [path.resolve(prefixDir, 'lib', 'node')]; ++ var paths = [path.resolve(prefixDir, 'lib', 'node'), ++ path.resolve(prefixDir, 'lib', 'node_modules')]; if (homeDir) { paths.unshift(path.resolve(homeDir, '.node_libraries')); + \ No newline at end of file