|
@@ -17,6 +17,10 @@ ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
NODEJS_DEPENDENCIES += openssl
|
|
NODEJS_DEPENDENCIES += openssl
|
|
endif
|
|
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.
|
|
|
|
+# However, few build scripts hard-code 'python' as the interpreter to be
|
|
|
|
+# invoked; so we have to manually fix them.
|
|
define HOST_NODEJS_CONFIGURE_CMDS
|
|
define HOST_NODEJS_CONFIGURE_CMDS
|
|
# Build with the static, built-in OpenSSL which is supplied as part of
|
|
# Build with the static, built-in OpenSSL which is supplied as part of
|
|
# the nodejs source distribution. This is needed on the host because
|
|
# the nodejs source distribution. This is needed on the host because
|
|
@@ -24,20 +28,23 @@ define HOST_NODEJS_CONFIGURE_CMDS
|
|
# buildroot.
|
|
# buildroot.
|
|
(cd $(@D); \
|
|
(cd $(@D); \
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
- ./configure \
|
|
|
|
|
|
+ PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
|
|
|
+ $(HOST_DIR)/usr/bin/python2 ./configure \
|
|
--prefix=$(HOST_DIR)/usr \
|
|
--prefix=$(HOST_DIR)/usr \
|
|
--without-snapshot \
|
|
--without-snapshot \
|
|
--without-dtrace \
|
|
--without-dtrace \
|
|
--without-etw \
|
|
--without-etw \
|
|
)
|
|
)
|
|
|
|
+ $(SED) "s@'python',@'$(HOST_DIR)/usr/bin/python2',@" \
|
|
|
|
+ $(@D)/deps/v8/tools/gyp/v8.gyp
|
|
endef
|
|
endef
|
|
|
|
|
|
define HOST_NODEJS_BUILD_CMDS
|
|
define HOST_NODEJS_BUILD_CMDS
|
|
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)
|
|
|
|
|
|
+ $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 $(MAKE) -C $(@D)
|
|
endef
|
|
endef
|
|
|
|
|
|
define HOST_NODEJS_INSTALL_CMDS
|
|
define HOST_NODEJS_INSTALL_CMDS
|
|
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
|
|
|
|
|
|
+ $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 $(MAKE) -C $(@D) install
|
|
endef
|
|
endef
|
|
|
|
|
|
ifeq ($(BR2_i386),y)
|
|
ifeq ($(BR2_i386),y)
|
|
@@ -62,7 +69,8 @@ define NODEJS_CONFIGURE_CMDS
|
|
(cd $(@D); \
|
|
(cd $(@D); \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
LD="$(TARGET_CXX)" \
|
|
LD="$(TARGET_CXX)" \
|
|
- ./configure \
|
|
|
|
|
|
+ PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
|
|
|
+ $(HOST_DIR)/usr/bin/python2 ./configure \
|
|
--prefix=/usr \
|
|
--prefix=/usr \
|
|
--without-snapshot \
|
|
--without-snapshot \
|
|
$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
|
|
$(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \
|
|
@@ -73,10 +81,13 @@ define NODEJS_CONFIGURE_CMDS
|
|
$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
|
|
$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
|
|
--dest-os=linux \
|
|
--dest-os=linux \
|
|
)
|
|
)
|
|
|
|
+ $(SED) "s@'python',@'$(HOST_DIR)/usr/bin/python2',@" \
|
|
|
|
+ $(@D)/deps/v8/tools/gyp/v8.gyp
|
|
endef
|
|
endef
|
|
|
|
|
|
define NODEJS_BUILD_CMDS
|
|
define NODEJS_BUILD_CMDS
|
|
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
|
|
|
|
|
+ $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
|
|
|
+ $(MAKE) -C $(@D) \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
LD="$(TARGET_CXX)"
|
|
LD="$(TARGET_CXX)"
|
|
endef
|
|
endef
|
|
@@ -110,7 +121,8 @@ endef
|
|
endif
|
|
endif
|
|
|
|
|
|
define NODEJS_INSTALL_TARGET_CMDS
|
|
define NODEJS_INSTALL_TARGET_CMDS
|
|
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install \
|
|
|
|
|
|
+ $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
|
|
|
+ $(MAKE) -C $(@D) install \
|
|
DESTDIR=$(TARGET_DIR) \
|
|
DESTDIR=$(TARGET_DIR) \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
LD="$(TARGET_CXX)"
|
|
LD="$(TARGET_CXX)"
|