nodejs: new package
PATCH 1/1 nodejs: new package
--- package/Config.in | 1 + package/nodejs/Config.in | 19 +++++++++++++++++ package/nodejs/nodejs.mk | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ package/python/python.mk | 1 - 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 package/nodejs/Config.in create mode 100644 package/nodejs/nodejs.mk
package/Config.in +1 -0
@@ -263,6 +263,7 @@ source "package/xavante/Config.in" endmenu endif source "package/microperl/Config.in" +source "package/nodejs/Config.in" source "package/php/Config.in" source "package/python/Config.in" if BR2_PACKAGE_PYTHON
package/nodejs/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +config BR2_PACKAGE_NODEJS + bool "nodejs" + select BR2_PACKAGE_OPENSSL + help + Event-driven I/O server-side JavaScript environment based on V8. + + http://nodejs.org/ + +config BR2_PACKAGE_NODEJS_NPM + bool "nodejs npm" + depends on BR2_PACKAGE_NODEJS + help + Enable npm (Node Package Manager). + +config BR2_PACKAGE_NODEJS_WAF + bool "nodejs waf" + depends on BR2_PACKAGE_NODEJS + help + Enable node-waf for building native modules.
package/nodejs/nodejs.mk new file +54 -0
54 lines not on this page · raw message
package/python/python.mk +0 -1
@@ -27,7 +27,6 @@ HOST_PYTHON_CONF_OPT += \ --disable-gdbm \ --disable-bsddb \ --disable-test-modules \ - --disable-bz2 \ --disable-ssl HOST_PYTHON_MAKE_ENV = \
Signature · 1 line
1.7.11.3
PATCH 1/1 nodejs: new package
Hello,
Le Sat, 11 Aug 2012 16:11:35 +1000,
Jonathan Liu <[email protected]> a ?crit :
package/nodejs/Config.in line 3
Quoted 3 lines
package/nodejs/Config.in new file +3
-0+config BR2_PACKAGE_NODEJS + bool "nodejs" + select BR2_PACKAGE_OPENSSL
I know nothing about nodejs. Is OpenSSL support absolutely mandatory?
package/nodejs/Config.in line 7
Quoted 4 lines
package/nodejs/Config.in new file +4
-0+ help + Event-driven I/O server-side JavaScript environment based on V8. + + http://nodejs.org/
if BR2_PACKAGE_NODEJS
package/nodejs/Config.in line 11
Quoted 4 lines
package/nodejs/Config.in new file +4
-0+ +config BR2_PACKAGE_NODEJS_NPM + bool "nodejs npm" + depends on BR2_PACKAGE_NODEJS
Thanks to the if above, you can drop this depends on.
package/nodejs/Config.in line 17
Quoted 6 lines
package/nodejs/Config.in new file +6
-0+ help + Enable npm (Node Package Manager). + +config BR2_PACKAGE_NODEJS_WAF + bool "nodejs waf" + depends on BR2_PACKAGE_NODEJS
Ditto.
Review
Quoted 2 lines
(quoted diff) +2
-0+ help + Enable node-waf for building native modules.
endif
Quoted 6 lines
package/nodejs/nodejs.mk new file +0
-0
package/nodejs/nodejs.mk line 9
Quoted 9 lines
package/nodejs/nodejs.mk new file +9
-0@@ -0,0 +1,54 @@ +############################################################# +# +# nodejs +# +############################################################# +NODEJS_VERSION = 0.8.6 +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz +NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) +NODEJS_INSTALL_STAGING = YES
Does NodeJS contains libraries required by other packages?
Quoted 7 lines
package/nodejs/nodejs.mk new file +7
-0+NODEJS_DEPENDENCIES = host-python +NODEJS_LICENSE = MIT + +define NODEJS_CONFIGURE_CMDS + (cd $(@D); rm -rf config.cache; \ + $(TARGET_CONFIGURE_ARGS) \ + $(TARGET_CONFIGURE_OPTS) \
package/nodejs/nodejs.mk line 26
Quoted 10 lines
package/nodejs/nodejs.mk new file +10
-0+ PATH="$(HOST_DIR)/usr/bin:$(PATH)" \ + ./configure \ + --prefix=/usr \ + --without-snapshot \ + $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \ + $(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \ + --without-dtrace \ + --without-etw \ + ) +endef
I haven't looked at the nodejs source code, but looking at this, it seems like it is using a conventional autoconf based build system. Can you use the autotools-package infrastructure instead of redefining all the configure/build/install steps manually?
package/python/python.mk HOST_PYTHON_CONF_OPT += \ · line 32
Quoted 12 lines
package/python/python.mk +0
-1@@ -27,7 +27,6 @@ HOST_PYTHON_CONF_OPT += \ --disable-gdbm \ --disable-bsddb \ --disable-test-modules \ - --disable-bz2 \ --disable-ssl HOST_PYTHON_MAKE_ENV = \
This should be in a separate patch, with an explanation on why it is necessary.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 nodejs: new package
Hello Jonathan,
Please keep the list Cc'ed for our exchanges, thanks!
Le Sun, 12 Aug 2012 11:16:15 +1000,
Jonathan Liu <[email protected]> a ?crit :
Quoted 8 lines
Quoted 4 lines
package/nodejs/Config.in line 3
Quoted 3 lines
package/nodejs/Config.in new file +3
-0+config BR2_PACKAGE_NODEJS + bool "nodejs" + select BR2_PACKAGE_OPENSSLI know nothing about nodejs. Is OpenSSL support absolutely mandatory?
If I remember correctly, Node.js already bundles a copy of OpenSSL so this dependency can be removed.
I can add an option to enable/disable built-in SSL support in the Node.js build.
It would be better if Node.js could use the OpenSSL version that is in Buildroot rather than its own internal one. It avoids having two copies of OpenSSL on the target system.
And yes, if the SSL support can be enabled/disabled easily, it would be
great: OpenSSL is a fairly heavy dependency.
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
package/nodejs/nodejs.mk new file +2
-0@@ -0,0 +1,54 @@ +############################################################# +#Quoted 8 lines
package/nodejs/nodejs.mk line 9
Quoted 7 lines
package/nodejs/nodejs.mk new file +7
-0+# nodejs +# +############################################################# +NODEJS_VERSION = 0.8.6 +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz +NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) +NODEJS_INSTALL_STAGING = YESDoes NodeJS contains libraries required by other packages?
Quoted 3 lines
The headers and node-waf binary are needed to build 3rd party native modules. I figured it may be useful if someone wants to create buildroot packages for node.js modules in the future.
Can you add a comment with a similar explanation just before this line. For libraries, the reason to have _INSTALL_STAGING is fairly obvious, for things like nodejs, it's a little bit less obvious for the ones who are not familiar with what nodejs is.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 nodejs: new package
Hi Thomas,
Quoted 6 lines · Thomas Petazzoni
It would be better if Node.js could use the OpenSSL version that is in Buildroot rather than its own internal one. It avoids having two copies of OpenSSL on the target system.
And yes, if the SSL support can be enabled/disabled easily, it would be
great: OpenSSL is a fairly heavy dependency.
Done.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 7 lines
package/nodejs/nodejs.mk new file +0
-0package/nodejs/nodejs.mk line 9
Quoted 9 lines
package/nodejs/nodejs.mk new file +9
-0@@ -0,0 +1,54 @@ +############################################################# +# +# nodejs +# +############################################################# +NODEJS_VERSION = 0.8.6 +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz +NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) +NODEJS_INSTALL_STAGING = YESDoes NodeJS contains libraries required by other packages?
Quoted 7 lines
Quoted 3 lines
The headers and node-waf binary are needed to build 3rd party native modules. I figured it may be useful if someone wants to create buildroot packages for node.js modules in the future.
Can you add a comment with a similar explanation just before this line. For libraries, the reason to have
_INSTALL_STAGINGis fairly obvious, for things like nodejs, it's a little bit less obvious for the ones who are not familiar with what nodejs is.
Done.
I've submitted the updated patch as V3.
Regards,
Jonathan