Skip to content

Commit d3052fb

Browse files
authored
Merge pull request #73 from huseyinkozan/node-v6.10.3
Node v6.10.3
2 parents 40b2b46 + 59ca9c9 commit d3052fb

File tree

6 files changed

+163
-49
lines changed

6 files changed

+163
-49
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The resulting sysupgrade image is
2020

2121
In general we suggest to prepare a build-server with the following command:
2222
```
23-
sudo apt-get install make gcc g++ subversion unzip libncurses5-dev libncursesw5-dev ncurses-doc zlib1g-dev libssl-dev gettext --yes
23+
sudo apt-get install make gcc g++ subversion unzip libncurses5-dev libncursesw5-dev ncurses-doc zlib1g-dev libssl-dev gettext gawk --yes
2424
```
2525

2626
### Related OpenWrt documentation

config.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ PACKAGES += mjpg-streamer
5757
PACKAGES += madplay
5858

5959
# JavaScript
60+
PACKAGES += libicu
6061
PACKAGES += node
6162
PACKAGES += tessel-app
6263

package/node/node/Makefile

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=node
4-
PKG_VERSION:=v4.5.0
4+
PKG_VERSION:=v6.10.3
55
PKG_RELEASE:=1
66

7-
PKG_SOURCE:=node-$(PKG_VERSION).tar.gz
7+
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
88
PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}/
9-
PKG_SHA256SUM:=74ced83b8d890d90e2a8b0d54b0d0e9b5e01d6fd6148cec6e9911ff6eaf0cf21
9+
PKG_SHA256SUM:=82262a703e61164e09170a14d88b1726720651b0c7ee87a277654247b21b5388
10+
11+
# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile
12+
# {
13+
HOST_BUILD_DEPENDS:=python/host
14+
PKG_BUILD_DEPENDS:=python/host
15+
PKG_INSTALL:=1
16+
PKG_USE_MIPS16:=0
17+
18+
HOST_BUILD_PARALLEL:=1
19+
# }
1020

1121
PKG_BUILD_PARALLEL:=1
12-
PKG_BUILD_DEPENDS:=
1322

1423
include $(INCLUDE_DIR)/package.mk
1524

@@ -35,24 +44,58 @@ define Package/npm
3544
URL:=https://npmjs.org/
3645
endef
3746

47+
# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile
48+
# {
49+
CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))
50+
51+
MAKE_VARS += \
52+
DESTCPU=$(CPU)
53+
# }
54+
3855
ifeq ($(ARCH),i386)
3956
DEST_CPU=ia32
4057
else
4158
DEST_CPU=$(ARCH)
4259
endif
4360

4461

45-
CONFIGURE_ARGS = --dest-cpu=$(DEST_CPU) --dest-os=linux \
46-
--shared-openssl --shared-openssl-includes="$(STAGING_DIR)/usr/include" --shared-openssl-libpath="$(STAGING_DIR)/usr/lib" \
47-
--shared-zlib --shared-zlib-includes="$(STAGING_DIR)/usr/include" --shared-zlib-libpath="$(STAGING_DIR)/usr/lib" \
48-
--v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5" \
49-
--without-snapshot
62+
CONFIGURE_ARGS = \
63+
--dest-cpu=$(DEST_CPU) \
64+
--dest-os=linux \
65+
--without-snapshot \
66+
--shared-zlib \
67+
--shared-openssl \
68+
--prefix=/usr \
69+
--v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5 --optimize_for_size" \
70+
--without-inspector \
71+
--without-dtrace \
72+
--without-intl
5073

5174
ifeq ($(ARCH),mipsel)
5275
CONFIGURE_ARGS += \
53-
--with-mips-arch-variant=r2 --with-mips-fpu-mode=fp32 --with-mips-float-abi=soft
76+
--with-mips-arch-variant=r2 \
77+
--with-mips-fpu-mode=fp32 \
78+
--with-mips-float-abi=soft
5479
endif
5580

81+
# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile
82+
# {
83+
HOST_CONFIGURE_VARS:=
84+
85+
HOST_CONFIGURE_ARGS:= \
86+
--dest-os=linux \
87+
--without-snapshot \
88+
--with-intl=none \
89+
--prefix=$(STAGING_DIR_HOSTPKG)
90+
91+
HOST_CONFIGURE_CMD:=python ./configure
92+
93+
define Build/InstallDev
94+
$(INSTALL_DIR) $(1)/usr/include
95+
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
96+
endef
97+
# }
98+
5699
define Package/node/install
57100
mkdir -p $(1)/usr/bin
58101
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/Release/node $(1)/usr/bin/node
@@ -66,4 +109,3 @@ endef
66109

67110
$(eval $(call BuildPackage,node))
68111
$(eval $(call BuildPackage,npm))
69-

package/node/node/patches/010-uclib_execinfo.patch

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#
2+
# Copyright (C) 2008 OpenWrt.org
3+
#
4+
# This is free software, licensed under the GNU General Public License v2.
5+
# See /LICENSE for more information.
6+
#
7+
# Taken from github.com/tobiaswaldvogel/openwrt-addpack/blob/master/libicu/Makefile
8+
9+
include $(TOPDIR)/rules.mk
10+
11+
PKG_NAME:=icu
12+
PKG_VERSION:=57.1
13+
PKG_RELEASE:=1
14+
15+
PKG_SOURCE:=icu4c-57_1-src.tgz
16+
PKG_SOURCE_URL:=http://download.icu-project.org/files/icu4c/$(PKG_VERSION)/
17+
PKG_BUILD_DIR:=$(BUILD_DIR)/icu
18+
PKG_FIXUP:=libtool,no-autoreconf
19+
PKG_INSTALL=1
20+
21+
include $(INCLUDE_DIR)/package.mk
22+
include $(INCLUDE_DIR)/host-build.mk
23+
24+
define Package/libicu
25+
SECTION:=libs
26+
CATEGORY:=Libraries
27+
TITLE:=ICU library for software internationalization
28+
URL:=http://icu-project.org
29+
DEPENDS:=+glib2
30+
endef
31+
32+
define Package/libicu/description
33+
ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode
34+
and Globalization support for software applications.
35+
endef
36+
37+
MAKE_PATH:=source
38+
39+
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/icu
40+
41+
#define Host/Prepare
42+
# mkdir -p $(HOST_BUILD_DIR)
43+
#endef
44+
45+
46+
define Host/Compile
47+
$(MAKE) -C $(HOST_BUILD_DIR)/source all install
48+
endef
49+
50+
51+
52+
# Specify what needs to be done to prepare for building the package.
53+
# In our case, we need to copy the source files to the build directory.
54+
# This is NOT the default. The default uses the PKG_SOURCE_URL and the
55+
# PKG_SOURCE which is not defined here to download the source from the web.
56+
# In order to just build a simple program that we have just written, it is
57+
# much easier to do it this way.
58+
#define Build/Prepare
59+
# $(call Build/Prepare/Default)
60+
# $(CP) -a $(PKG_BUILD_DIR)/source/* $(PKG_BUILD_DIR)/
61+
#endef
62+
63+
define Build/Prepare
64+
mkdir -p $(HOST_BUILD_DIR)
65+
$(call Host/Prepare/Default)
66+
$(call Host/Configure/Default,,,source)
67+
$(call Host/Compile)
68+
$(call Build/Prepare/Default)
69+
endef
70+
71+
define Build/Configure
72+
# mkdir -p $(HOST_BUILD_DIR)
73+
# $(call Host/Prepare/Default)
74+
# $(call Host/Configure/Default,,,source)
75+
# $(call Host/Compile)
76+
$(call Build/Configure/Default, \
77+
--with-cross-build=$(HOST_BUILD_DIR)/source,, \
78+
source \
79+
)
80+
endef
81+
82+
#define Build/InstallDev
83+
# $(INSTALL_DIR) $(1)/usr/lib
84+
# $(CP) \
85+
# $(PKG_INSTALL_DIR)/usr/lib/*.so* \
86+
# $(1)/usr/lib/
87+
#
88+
# $(INSTALL_DIR) $(1)/usr/bin
89+
# $(INSTALL_DATA) \
90+
# $(PKG_INSTALL_DIR)/usr/bin/* \
91+
# $(1)/usr/bin/
92+
#
93+
# $(INSTALL_DIR) $(1)/usr/include
94+
# $(CP) \
95+
# $(PKG_INSTALL_DIR)/usr/include/* \
96+
# $(1)/usr/include/
97+
#endef
98+
99+
define Package/libicu/install
100+
$(INSTALL_DIR) $(1)/usr/lib
101+
# $(CP) \
102+
# $(PKG_INSTALL_DIR)/usr/lib/*.so* \
103+
# $(1)/usr/lib/
104+
endef
105+
106+
$(eval $(call HostBuild))
107+
$(eval $(call BuildPackage,libicu))

0 commit comments

Comments
 (0)