Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] nodejs: new package
Date: Sat, 11 Aug 2012 22:23:06 +0200	[thread overview]
Message-ID: <20120811222306.4e21b827@skate> (raw)
In-Reply-To: <1344665495-27246-1-git-send-email-net147@gmail.com>

Hello,

Le Sat, 11 Aug 2012 16:11:35 +1000,
Jonathan Liu <net147@gmail.com> a ?crit :

> +config BR2_PACKAGE_NODEJS
> +	bool "nodejs"
> +	select BR2_PACKAGE_OPENSSL

I know nothing about nodejs. Is OpenSSL support absolutely mandatory?

> +	help
> +	  Event-driven I/O server-side JavaScript environment based on V8.
> +
> +	  http://nodejs.org/

if BR2_PACKAGE_NODEJS

> +
> +config BR2_PACKAGE_NODEJS_NPM
> +	bool "nodejs npm"
> +	depends on BR2_PACKAGE_NODEJS

Thanks to the if above, you can drop this depends on.

> +	help
> +	  Enable npm (Node Package Manager).
> +
> +config BR2_PACKAGE_NODEJS_WAF
> +	bool "nodejs waf"
> +	depends on BR2_PACKAGE_NODEJS

Ditto.

> +	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..8a0fa91
> --- /dev/null
> +++ b/package/nodejs/nodejs.mk
> @@ -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?

> +NODEJS_DEPENDENCIES = host-python
> +NODEJS_LICENSE = MIT
> +
> +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_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?

> 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 = \

This should be in a separate patch, with an explanation on why it is
necessary.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-08-11 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-11  6:11 [Buildroot] [PATCH] nodejs: new package Jonathan Liu
2012-08-11 20:23 ` Thomas Petazzoni [this message]
     [not found]   ` <502703DF.5000602@gmail.com>
2012-08-12  7:06     ` Thomas Petazzoni
2012-08-12  8:51       ` Jonathan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120811222306.4e21b827@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox