Skip to contentSkip to conversation

package/nodejs: Add NODEJS_CONF_OPTS

PATCH New Martin Bark 3 participants 11 messages Jun 3, 2016 – Jun 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/nodejs: Add NODEJS_CONF_OPTS

Most packages in buildroot pass a FOO_CONF_OPTS variable into the configure script. Transition nodejs to follow this convention.

---
 package/nodejs/nodejs.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
package/nodejs/nodejs.mk +7 -5
index 0329299..b78ba79 100644
@@ -13,6 +13,12 @@ HOST_NODEJS_DEPENDENCIES = host-python host-zlib
 NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
 NODEJS_LICENSE_FILES = LICENSE
 
+NODEJS_CONF_OPTS = --without-snapshot \
+	--shared-zlib \
+	--without-dtrace \
+	--without-etw \
+	--dest-os=linux
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 NODEJS_DEPENDENCIES += openssl
 endif
@@ -97,18 +103,14 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		--without-snapshot \
-		--shared-zlib \
 		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
 		$(if $(BR2_PACKAGE_ICU),--with-intl=system-icu,--with-intl=none) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
-		--without-dtrace \
-		--without-etw \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
 		$(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \
 		$(if $(NODEJS_MIPS_FPU_MODE),--with-mips-fpu-mode=$(NODEJS_MIPS_FPU_MODE)) \
-		--dest-os=linux \
+		$(NODEJS_CONF_OPTS) \
 	)
 endef
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/4 package/nodejs: Update icu to use NODEJS_CONF_OPTS

---
 package/nodejs/nodejs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +3 -1
index b78ba79..e5844b0 100644
@@ -25,6 +25,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_ICU),y)
 NODEJS_DEPENDENCIES += icu
+NODEJS_CONF_OPTS += --with-intl=system-icu
+else
+NODEJS_CONF_OPTS += --with-intl=none
 endif
 
 # nodejs build system is based on python, but only support python-2.6 or
@@ -104,7 +107,6 @@ define NODEJS_CONFIGURE_CMDS
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
 		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
-		$(if $(BR2_PACKAGE_ICU),--with-intl=system-icu,--with-intl=none) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/4 package/nodejs: Update icu to use NODEJS_CONF_OPTS

Martin, All,

On 2016-06-03 20:15 +0100, Martin Bark spake thusly:

Quoted 1 line

Regards,
Yann E. MORIN.

Quoted 33 lines
---
 package/nodejs/nodejs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +3 -1
index b78ba79..e5844b0 100644
@@ -25,6 +25,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_ICU),y)
 NODEJS_DEPENDENCIES += icu
+NODEJS_CONF_OPTS += --with-intl=system-icu
+else
+NODEJS_CONF_OPTS += --with-intl=none
 endif
 
 # nodejs build system is based on python, but only support python-2.6 or
@@ -104,7 +107,6 @@ define NODEJS_CONFIGURE_CMDS
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
 		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
-		$(if $(BR2_PACKAGE_ICU),--with-intl=system-icu,--with-intl=none) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 3/4 package/nodejs: Update openssl to use NODEJS_CONF_OPTS

In reply to Martin Bark
---
 package/nodejs/nodejs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +3 -1
index e5844b0..aff73e8 100644
@@ -21,6 +21,9 @@ NODEJS_CONF_OPTS = --without-snapshot \
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 NODEJS_DEPENDENCIES += openssl
+NODEJS_CONF_OPTS += --shared-openssl
+else
+NODEJS_CONF_OPTS += --without-ssl
 endif
 
 ifeq ($(BR2_PACKAGE_ICU),y)
@@ -106,7 +109,6 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
Signature · 1 line
2.7.4
#4 lore raw

PATCH 3/4 package/nodejs: Update openssl to use NODEJS_CONF_OPTS

Martin, All,

On 2016-06-03 20:15 +0100, Martin Bark spake thusly:

Quoted 1 line

Regards,
Yann E. MORIN.

Quoted 33 lines
---
 package/nodejs/nodejs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +3 -1
index e5844b0..aff73e8 100644
@@ -21,6 +21,9 @@ NODEJS_CONF_OPTS = --without-snapshot \
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 NODEJS_DEPENDENCIES += openssl
+NODEJS_CONF_OPTS += --shared-openssl
+else
+NODEJS_CONF_OPTS += --without-ssl
 endif
 
 ifeq ($(BR2_PACKAGE_ICU),y)
@@ -106,7 +109,6 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 4/4 package/nodejs: Update npm to use NODEJS_CONF_OPTS

In reply to Martin Bark
---
 package/nodejs/nodejs.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +4 -1
index aff73e8..f8f819f 100644
@@ -33,6 +33,10 @@ else
 NODEJS_CONF_OPTS += --with-intl=none
 endif
 
+ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
+NODEJS_CONF_OPTS += --without-npm
+endif
+
 # nodejs build system is based on python, but only support python-2.6 or
 # python-2.7. So, we have to enforce PYTHON interpreter to be python2.
 define HOST_NODEJS_CONFIGURE_CMDS
@@ -109,7 +113,6 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
 		$(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \
Signature · 1 line
2.7.4
#6 lore raw

PATCH 4/4 package/nodejs: Update npm to use NODEJS_CONF_OPTS

Martin, All,

On 2016-06-03 20:15 +0100, Martin Bark spake thusly:

Quoted 1 line
Quoted 20 lines
---
 package/nodejs/nodejs.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +4 -0
index aff73e8..f8f819f 100644
@@ -33,6 +33,10 @@ else
 NODEJS_CONF_OPTS += --with-intl=none
 endif
 
+ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
+NODEJS_CONF_OPTS += --without-npm
+endif
+
 # nodejs build system is based on python, but only support python-2.6 or
 # python-2.7. So, we have to enforce PYTHON interpreter to be python2.
 define HOST_NODEJS_CONFIGURE_CMDS

package/nodejs/nodejs.mk define NODEJS_CONFIGURE_CMDS · line 118

Quoted 7 lines
package/nodejs/nodejs.mk +0 -1
@@ -109,7 +113,6 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
 		$(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \

IMHO, it would have been good to also handle the remaining, arch options with the _CONF_OPTS variable as well.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 4/4 package/nodejs: Update npm to use NODEJS_CONF_OPTS

Yann,

Quoted 29 lines · Yann E. MORIN

Martin, All,

On 2016-06-03 20:15 +0100, Martin Bark spake thusly:

Quoted 1 line
Quoted 22 lines
---
 package/nodejs/nodejs.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/nodejs/nodejs.mk +4 -0
index aff73e8..f8f819f 100644
@@ -33,6 +33,10 @@ else
 NODEJS_CONF_OPTS += --with-intl=none
 endif
 
+ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
+NODEJS_CONF_OPTS += --without-npm
+endif
+
 # nodejs build system is based on python, but only support python-2.6 or
 # python-2.7. So, we have to enforce PYTHON interpreter to be python2.
 define HOST_NODEJS_CONFIGURE_CMDS
@@ -109,7 +113,6 @@ define NODEJS_CONFIGURE_CMDS
              PYTHON=$(HOST_DIR)/usr/bin/python2 \
              $(HOST_DIR)/usr/bin/python2 ./configure \
Quoted 8 lines

package/nodejs/nodejs.mk define NODEJS_CONFIGURE_CMDS · line 118

Quoted 5 lines
package/nodejs/nodejs.mk +0 -1
              --prefix=/usr \
-             $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
              --dest-cpu=$(NODEJS_CPU) \
              $(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
              $(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \

IMHO, it would have been good to also handle the remaining, arch options with the _CONF_OPTS variable as well.

yes i agree. I will submit some other patches to handle them too.

Thanks

Martin

Quoted 11 lines

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#8 lore raw

PATCH 1/4 package/nodejs: Add NODEJS_CONF_OPTS

In reply to Martin Bark

Martin, All,

On 2016-06-03 20:15 +0100, Martin Bark spake thusly:

Quoted 13 lines

Most packages in buildroot pass a FOO_CONF_OPTS variable into the configure script. Transition nodejs to follow this convention.

---
 package/nodejs/nodejs.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
package/nodejs/nodejs.mk +0 -0
index 0329299..b78ba79 100644

package/nodejs/nodejs.mk HOST_NODEJS_DEPENDENCIES = host-python host-zlib · line 20

Quoted 8 lines
package/nodejs/nodejs.mk +5 -0
@@ -13,6 +13,12 @@ HOST_NODEJS_DEPENDENCIES = host-python host-zlib
 NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
 NODEJS_LICENSE_FILES = LICENSE
 
+NODEJS_CONF_OPTS = --without-snapshot \
+	--shared-zlib \
+	--without-dtrace \
+	--without-etw \
+	--dest-os=linux

When we have multi-line variables, I prefer that we write all options on multi-line and none on the first line:

    NODEJS_CONF_OPTS = \
        --without-snapshot \
        --shared-zlib \
        --without-dtrace \
        --without-etw \
        --dest-os=linux

Otehrwise, looks good:

Regards,
Yann E. MORIN.

Quoted 30 lines
package/nodejs/nodejs.mk +1 -5
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 NODEJS_DEPENDENCIES += openssl
 endif
@@ -97,18 +103,14 @@ define NODEJS_CONFIGURE_CMDS
 		PYTHON=$(HOST_DIR)/usr/bin/python2 \
 		$(HOST_DIR)/usr/bin/python2 ./configure \
 		--prefix=/usr \
-		--without-snapshot \
-		--shared-zlib \
 		$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
 		$(if $(BR2_PACKAGE_ICU),--with-intl=system-icu,--with-intl=none) \
 		$(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \
-		--without-dtrace \
-		--without-etw \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
 		$(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \
 		$(if $(NODEJS_MIPS_FPU_MODE),--with-mips-fpu-mode=$(NODEJS_MIPS_FPU_MODE)) \
-		--dest-os=linux \
+		$(NODEJS_CONF_OPTS) \
 	)
 endef
 
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 1/4 package/nodejs: Add NODEJS_CONF_OPTS

Hello,

Quoted 2 lines · Yann E. MORIN

When we have multi-line variables, I prefer that we write all options on multi-line and none on the first line:

I've fixed this when applying. Thanks for the review!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH 1/4 package/nodejs: Add NODEJS_CONF_OPTS

In reply to Martin Bark

Hello,

Quoted 7 lines · Martin Bark

Most packages in buildroot pass a FOO_CONF_OPTS variable into the configure script. Transition nodejs to follow this convention.

---
 package/nodejs/nodejs.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Thanks, series applied!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com