* [Buildroot] [PATCH v3 0/2] nodejs: new package
@ 2012-08-12 8:52 Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 1/2] python: enable bz2 module for host build Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 2/2] nodejs: new package Jonathan Liu
0 siblings, 2 replies; 5+ messages in thread
From: Jonathan Liu @ 2012-08-12 8:52 UTC (permalink / raw)
To: buildroot
Jonathan Liu (2):
python: enable bz2 module for host build
nodejs: new package
package/Config.in | 1 +
package/nodejs/Config.in | 38 ++++++++++++++++++++++++++++++++++++++
package/nodejs/nodejs.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++
package/python/python.mk | 1 -
4 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 package/nodejs/Config.in
create mode 100644 package/nodejs/nodejs.mk
--
1.7.11.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 1/2] python: enable bz2 module for host build
2012-08-12 8:52 [Buildroot] [PATCH v3 0/2] nodejs: new package Jonathan Liu
@ 2012-08-12 8:52 ` Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 2/2] nodejs: new package Jonathan Liu
1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Liu @ 2012-08-12 8:52 UTC (permalink / raw)
To: buildroot
The bz2 module is required for building some Python packages.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
package/python/python.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/python/python.mk b/package/python/python.mk
index fae4e5c..7b314ab 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -27,7 +27,6 @@ HOST_PYTHON_CONF_OPT += \
--disable-gdbm \
--disable-bsddb \
--disable-test-modules \
- --disable-bz2 \
--disable-ssl
HOST_PYTHON_MAKE_ENV = \
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/2] nodejs: new package
2012-08-12 8:52 [Buildroot] [PATCH v3 0/2] nodejs: new package Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 1/2] python: enable bz2 module for host build Jonathan Liu
@ 2012-08-12 8:52 ` Jonathan Liu
2012-08-12 16:29 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Liu @ 2012-08-12 8:52 UTC (permalink / raw)
To: buildroot
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
package/Config.in | 1 +
package/nodejs/Config.in | 38 ++++++++++++++++++++++++++++++++++++++
package/nodejs/nodejs.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+)
create mode 100644 package/nodejs/Config.in
create mode 100644 package/nodejs/nodejs.mk
diff --git a/package/Config.in b/package/Config.in
index f308de7..76c589b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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
diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
new file mode 100644
index 0000000..feb279b
--- /dev/null
+++ b/package/nodejs/Config.in
@@ -0,0 +1,38 @@
+config BR2_PACKAGE_NODEJS
+ bool "nodejs"
+ help
+ Event-driven I/O server-side JavaScript environment based on V8.
+
+ http://nodejs.org/
+
+if BR2_PACKAGE_NODEJS
+
+config BR2_PACKAGE_NODEJS_SSL
+ bool "enable SSL support"
+ default y
+ help
+ Enable SSL support.
+
+if BR2_PACKAGE_NODEJS_SSL
+
+config BR2_PACKAGE_NODEJS_SHARED_OPENSSL
+ bool "use shared OpenSSL"
+ default y
+ select BR2_PACKAGE_OPENSSL
+ help
+ Use shared OpenSSL library instead of statically linked
+ OpenSSL bundled with node.js.
+
+endif
+
+config BR2_PACKAGE_NODEJS_NPM
+ bool "npm"
+ help
+ Enable npm (Node Package Manager).
+
+config BR2_PACKAGE_NODEJS_WAF
+ bool "waf"
+ help
+ Enable node-waf for building native modules.
+
+endif
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
new file mode 100644
index 0000000..3ce4707
--- /dev/null
+++ b/package/nodejs/nodejs.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# nodejs
+#
+#############################################################
+NODEJS_VERSION = 0.8.6
+NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
+NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
+NODEJS_DEPENDENCIES = host-python
+NODEJS_LICENSE = MIT
+
+# Headers and node-waf binary are needed in staging to build 3rd-party
+# native modules
+NODEJS_INSTALL_STAGING = YES
+
+define NODEJS_CONFIGURE_CMDS
+ (cd $(@D); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(TARGET_CONFIGURE_OPTS) \
+ PATH="$(HOST_DIR)/usr/bin:$(PATH)" \
+ ./configure \
+ --prefix=/usr \
+ --without-snapshot \
+ $(if $(BR2_PACKAGE_NODEJS_SHARED_OPENSSL),--shared-openssl,) \
+ $(if $(BR2_PACKAGE_NODEJS_SSL),,--without-ssl) \
+ $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
+ $(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \
+ --without-dtrace \
+ --without-etw \
+ )
+endef
+
+NODEJS_MAKE_ENV = $(TARGET_CONFIGURE_OPTS)
+NODEJS_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install
+
+define NODEJS_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 775 $(@D)/out/Release/node $(TARGET_DIR)/usr/bin/node
+endef
+
+define NODEJS_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/bin/node
+endef
+
+$(eval $(autotools-package))
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/2] nodejs: new package
2012-08-12 8:52 ` [Buildroot] [PATCH v3 2/2] nodejs: new package Jonathan Liu
@ 2012-08-12 16:29 ` Thomas Petazzoni
2012-08-13 1:02 ` Jonathan Liu
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-08-12 16:29 UTC (permalink / raw)
To: buildroot
Le Sun, 12 Aug 2012 18:52:05 +1000,
Jonathan Liu <net147@gmail.com> a ?crit :
> --- /dev/null
> +++ b/package/nodejs/Config.in
> @@ -0,0 +1,38 @@
> +config BR2_PACKAGE_NODEJS
> + bool "nodejs"
> + help
> + Event-driven I/O server-side JavaScript environment based on V8.
> +
> + http://nodejs.org/
> +
> +if BR2_PACKAGE_NODEJS
> +
> +config BR2_PACKAGE_NODEJS_SSL
> + bool "enable SSL support"
> + default y
> + help
> + Enable SSL support.
In general, we don't add a suboption to enable OpenSSL support: is the
openssl package is enabled, we automatically enable openssl support in
the package.
> +if BR2_PACKAGE_NODEJS_SSL
> +
> +config BR2_PACKAGE_NODEJS_SHARED_OPENSSL
> + bool "use shared OpenSSL"
> + default y
> + select BR2_PACKAGE_OPENSSL
> + help
> + Use shared OpenSSL library instead of statically linked
> + OpenSSL bundled with node.js.
> +
> +endif
I think this should always be the case: use the Buildroot openssl
package if enabled, otherwise disable ssl support. Is there any
advantage to using the built-in version?
> +define NODEJS_CONFIGURE_CMDS
> + (cd $(@D); rm -rf config.cache; \
> + $(TARGET_CONFIGURE_ARGS) \
> + $(TARGET_CONFIGURE_OPTS) \
> + PATH="$(HOST_DIR)/usr/bin:$(PATH)" \
> + ./configure \
> + --prefix=/usr \
> + --without-snapshot \
> + $(if $(BR2_PACKAGE_NODEJS_SHARED_OPENSSL),--shared-openssl,) \
> + $(if $(BR2_PACKAGE_NODEJS_SSL),,--without-ssl) \
> + $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
> + $(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \
> + --without-dtrace \
> + --without-etw \
> + )
> +endef
You're using the autotools-package infrastructure, so don't override
the _CONFIGURE_CMDS. You should simply need to do:
NODEJS_CONF_OPT =
--without-snapshot \
$(if $(BR2_PACKAGE_NODEJS_SHARED_OPENSSL),--shared-openssl,) \
$(if $(BR2_PACKAGE_NODEJS_SSL),,--without-ssl) \
$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
$(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \
--without-dtrace \
--without-etw
> +NODEJS_MAKE_ENV = $(TARGET_CONFIGURE_OPTS)
> +NODEJS_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install
And you can get rid of this as well.
> +define NODEJS_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 775 $(@D)/out/Release/node $(TARGET_DIR)/usr/bin/node
> +endef
> +
> +define NODEJS_UNINSTALL_TARGET_CMDS
> + rm -f $(TARGET_DIR)/usr/bin/node
> +endef
> +
> +$(eval $(autotools-package))
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/2] nodejs: new package
2012-08-12 16:29 ` Thomas Petazzoni
@ 2012-08-13 1:02 ` Jonathan Liu
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Liu @ 2012-08-13 1:02 UTC (permalink / raw)
To: buildroot
On 13 August 2012 02:29, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Le Sun, 12 Aug 2012 18:52:05 +1000,
> Jonathan Liu <net147@gmail.com> a ?crit :
>
> > --- /dev/null
> > +++ b/package/nodejs/Config.in
> > @@ -0,0 +1,38 @@
> > +config BR2_PACKAGE_NODEJS
> > + bool "nodejs"
> > + help
> > + Event-driven I/O server-side JavaScript environment based on V8.
> > +
> > + http://nodejs.org/
> > +
> > +if BR2_PACKAGE_NODEJS
> > +
> > +config BR2_PACKAGE_NODEJS_SSL
> > + bool "enable SSL support"
> > + default y
> > + help
> > + Enable SSL support.
>
> In general, we don't add a suboption to enable OpenSSL support: is the
> openssl package is enabled, we automatically enable openssl support in
> the package.
>
Ok.
>
> > +if BR2_PACKAGE_NODEJS_SSL
> > +
> > +config BR2_PACKAGE_NODEJS_SHARED_OPENSSL
> > + bool "use shared OpenSSL"
> > + default y
> > + select BR2_PACKAGE_OPENSSL
> > + help
> > + Use shared OpenSSL library instead of statically linked
> > + OpenSSL bundled with node.js.
> > +
> > +endif
>
> I think this should always be the case: use the Buildroot openssl
> package if enabled, otherwise disable ssl support. Is there any
> advantage to using the built-in version?
>
Not much advantage I guess. I can remove it.
>
> > +define NODEJS_CONFIGURE_CMDS
> > + (cd $(@D); rm -rf config.cache; \
> > + $(TARGET_CONFIGURE_ARGS) \
> > + $(TARGET_CONFIGURE_OPTS) \
> > + PATH="$(HOST_DIR)/usr/bin:$(PATH)" \
> > + ./configure \
> > + --prefix=/usr \
> > + --without-snapshot \
> > + $(if
> $(BR2_PACKAGE_NODEJS_SHARED_OPENSSL),--shared-openssl,) \
> > + $(if $(BR2_PACKAGE_NODEJS_SSL),,--without-ssl) \
> > + $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
> > + $(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \
> > + --without-dtrace \
> > + --without-etw \
> > + )
> > +endef
>
> You're using the autotools-package infrastructure, so don't override
> the _CONFIGURE_CMDS. You should simply need to do:
>
> NODEJS_CONF_OPT =
> --without-snapshot \
> $(if $(BR2_PACKAGE_NODEJS_SHARED_OPENSSL),--shared-openssl,) \
> $(if $(BR2_PACKAGE_NODEJS_SSL),,--without-ssl) \
> $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
> $(if $(BR2_PACKAGE_NODEJS_WAF),,--without-waf) \
> --without-dtrace \
> --without-etw
>
> > +NODEJS_MAKE_ENV = $(TARGET_CONFIGURE_OPTS)
>
The make command needs have CC, CXX, etc. set again because node.js isn't
using a real autotools based configure. It doesn't remember the variables.
I am thinking I should probably change it back to generic package because
it isn't a real autotools based system but just a Python-based configure
behaves similar to autotools.
> > +NODEJS_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install
>
> And you can get rid of this as well.
>
Ok.
>
> > +define NODEJS_INSTALL_TARGET_CMDS
> > + $(INSTALL) -D -m 775 $(@D)/out/Release/node
> $(TARGET_DIR)/usr/bin/node
> > +endef
> > +
> > +define NODEJS_UNINSTALL_TARGET_CMDS
> > + rm -f $(TARGET_DIR)/usr/bin/node
> > +endef
> > +
> > +$(eval $(autotools-package))
>
Regards,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120813/dd6130a1/attachment-0001.html>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-13 1:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-12 8:52 [Buildroot] [PATCH v3 0/2] nodejs: new package Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 1/2] python: enable bz2 module for host build Jonathan Liu
2012-08-12 8:52 ` [Buildroot] [PATCH v3 2/2] nodejs: new package Jonathan Liu
2012-08-12 16:29 ` Thomas Petazzoni
2012-08-13 1:02 ` Jonathan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox