summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/nodejs/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/nodejs/Makefile b/package/nodejs/Makefile
index 304a63701..7e4781a02 100644
--- a/package/nodejs/Makefile
+++ b/package/nodejs/Makefile
@@ -11,6 +11,7 @@ PKG_DESCR:= asynchronous event driven framework
PKG_SECTION:= net/http
PKG_DEPENDS:= zlib libopenssl
PKG_BUILDDEP:= python2-host zlib openssl
+HOST_BUILDDEP:= openssl-host
PKG_NEEDS:= threads rt c++
PKG_URL:= https://nodejs.org/
PKG_SITES:= https://nodejs.org/dist/v$(PKG_VERSION)/
@@ -20,12 +21,36 @@ PKG_SYSTEM_DEPENDS:= !mikrotik-rb532
DISTFILES:= node-v$(PKG_VERSION).tar.gz
WRKDIST= $(WRKDIR)/node-v$(PKG_VERSION)
+include $(ADK_TOPDIR)/mk/host.mk
include $(ADK_TOPDIR)/mk/package.mk
+$(eval $(call HOST_template,NODEJS,nodejs,$(PKG_VERSION)-$(PKG_RELEASE)))
$(eval $(call PKG_template,NODEJS,nodejs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+HOST_STYLE:= manual
CONFIG_STYLE:= manual
+host-configure:
+ (cd $(WRKSRC); \
+ PYTHON=$(STAGING_HOST_DIR)/usr/bin/python2 \
+ $(STAGING_HOST_DIR)/usr/bin/python2 ./configure \
+ --prefix=/usr \
+ --without-snapshot \
+ --without-dtrace \
+ --without-etw \
+ --without-intl \
+ --shared-openssl \
+ --shared-zlib \
+ )
+
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${ALL_TARGET})
+
+nodejs-hostinstall:
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_FAKE_FLAGS} DESTDIR='${STAGING_HOST_DIR}' ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
+
do-configure:
(cd $(WRKSRC); \
PYTHON=$(STAGING_HOST_DIR)/usr/bin/python2 \
@@ -47,4 +72,5 @@ nodejs-install:
$(INSTALL_BIN) $(WRKINST)/usr/bin/node \
$(IDIR_NODEJS)/usr/bin
+include $(ADK_TOPDIR)/mk/host-bottom.mk
include $(ADK_TOPDIR)/mk/pkg-bottom.mk