diff --git a/README.md b/README.md index be88829..6643278 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The resulting sysupgrade image is In general we suggest to prepare a build-server with the following command: ``` -sudo apt-get install make gcc g++ subversion unzip libncurses5-dev libncursesw5-dev ncurses-doc zlib1g-dev libssl-dev gettext --yes +sudo apt-get install make gcc g++ subversion unzip libncurses5-dev libncursesw5-dev ncurses-doc zlib1g-dev libssl-dev gettext gawk --yes ``` ### Related OpenWrt documentation diff --git a/config.mk b/config.mk index 7f9f121..77ab6b7 100644 --- a/config.mk +++ b/config.mk @@ -57,6 +57,7 @@ PACKAGES += mjpg-streamer PACKAGES += madplay # JavaScript +PACKAGES += libicu PACKAGES += node PACKAGES += tessel-app diff --git a/openwrt b/openwrt index 821bd71..4647609 160000 --- a/openwrt +++ b/openwrt @@ -1 +1 @@ -Subproject commit 821bd71ed54c98828fed996156103ae086ecad40 +Subproject commit 4647609084786c1e11808d4e22b1ca29b4913b78 diff --git a/package/node/node/Makefile b/package/node/node/Makefile index 4bea98c..c9ef74a 100644 --- a/package/node/node/Makefile +++ b/package/node/node/Makefile @@ -1,15 +1,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v4.5.0 +PKG_VERSION:=v6.10.3 PKG_RELEASE:=1 -PKG_SOURCE:=node-$(PKG_VERSION).tar.gz +PKG_SOURCE:=node-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}/ -PKG_SHA256SUM:=74ced83b8d890d90e2a8b0d54b0d0e9b5e01d6fd6148cec6e9911ff6eaf0cf21 +PKG_SHA256SUM:=82262a703e61164e09170a14d88b1726720651b0c7ee87a277654247b21b5388 + +# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile +# { +HOST_BUILD_DEPENDS:=python/host +PKG_BUILD_DEPENDS:=python/host +PKG_INSTALL:=1 +PKG_USE_MIPS16:=0 + +HOST_BUILD_PARALLEL:=1 +# } PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:= include $(INCLUDE_DIR)/package.mk @@ -35,6 +44,14 @@ define Package/npm URL:=https://npmjs.org/ endef +# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile +# { +CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))) + +MAKE_VARS += \ + DESTCPU=$(CPU) +# } + ifeq ($(ARCH),i386) DEST_CPU=ia32 else @@ -42,17 +59,43 @@ else endif -CONFIGURE_ARGS = --dest-cpu=$(DEST_CPU) --dest-os=linux \ - --shared-openssl --shared-openssl-includes="$(STAGING_DIR)/usr/include" --shared-openssl-libpath="$(STAGING_DIR)/usr/lib" \ - --shared-zlib --shared-zlib-includes="$(STAGING_DIR)/usr/include" --shared-zlib-libpath="$(STAGING_DIR)/usr/lib" \ - --v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5" \ - --without-snapshot +CONFIGURE_ARGS = \ + --dest-cpu=$(DEST_CPU) \ + --dest-os=linux \ + --without-snapshot \ + --shared-zlib \ + --shared-openssl \ + --prefix=/usr \ + --v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5 --optimize_for_size" \ + --without-inspector \ + --without-dtrace \ + --without-intl ifeq ($(ARCH),mipsel) CONFIGURE_ARGS += \ - --with-mips-arch-variant=r2 --with-mips-fpu-mode=fp32 --with-mips-float-abi=soft + --with-mips-arch-variant=r2 \ + --with-mips-fpu-mode=fp32 \ + --with-mips-float-abi=soft endif +# From : https://github.com/tessel/openwrt-tessel/blob/bc3316cd4458a5359166daf5684e9906a9ef7851/package/node/node/Makefile +# { +HOST_CONFIGURE_VARS:= + +HOST_CONFIGURE_ARGS:= \ + --dest-os=linux \ + --without-snapshot \ + --with-intl=none \ + --prefix=$(STAGING_DIR_HOSTPKG) + +HOST_CONFIGURE_CMD:=python ./configure + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef +# } + define Package/node/install mkdir -p $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/Release/node $(1)/usr/bin/node @@ -66,4 +109,3 @@ endef $(eval $(call BuildPackage,node)) $(eval $(call BuildPackage,npm)) - diff --git a/package/node/node/patches/010-uclib_execinfo.patch b/package/node/node/patches/010-uclib_execinfo.patch deleted file mode 100644 index 3e99c1d..0000000 --- a/package/node/node/patches/010-uclib_execinfo.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/deps/v8/src/base/logging.cc -+++ b/deps/v8/src/base/logging.cc -@@ -4,13 +4,13 @@ - - #include "src/base/logging.h" - --#if V8_LIBC_GLIBC || V8_OS_BSD -+#if (V8_LIBC_GLIBC && !defined(__UCLIBC__)) || V8_OS_BSD - #include - #include - #include - #elif V8_OS_QNX - #include --#endif // V8_LIBC_GLIBC || V8_OS_BSD -+#endif // (V8_LIBC_GLIBC && !defined(__UCLIBC__)) || V8_OS_BSD - - #include - #include -@@ -52,7 +52,7 @@ DEFINE_CHECK_OP_IMPL(GT) - - // Attempts to dump a backtrace (if supported). - void DumpBacktrace() { --#if V8_LIBC_GLIBC || V8_OS_BSD -+#if (V8_LIBC_GLIBC && !defined(__UCLIBC__)) || V8_OS_BSD - void* trace[100]; - int size = backtrace(trace, arraysize(trace)); - OS::PrintError("\n==== C stack trace ===============================\n\n"); -@@ -93,7 +93,7 @@ void DumpBacktrace() { - } - bt_unload_memmap(&memmap); - bt_release_accessor(&acc); --#endif // V8_LIBC_GLIBC || V8_OS_BSD -+#endif // (V8_LIBC_GLIBC && !defined(__UCLIBC__)) || V8_OS_BSD - } - - } // namespace base diff --git a/package/openwrt-addpack/icu/Makefile b/package/openwrt-addpack/icu/Makefile new file mode 100644 index 0000000..ab95737 --- /dev/null +++ b/package/openwrt-addpack/icu/Makefile @@ -0,0 +1,107 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Taken from github.com/tobiaswaldvogel/openwrt-addpack/blob/master/libicu/Makefile + +include $(TOPDIR)/rules.mk + +PKG_NAME:=icu +PKG_VERSION:=57.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=icu4c-57_1-src.tgz +PKG_SOURCE_URL:=http://download.icu-project.org/files/icu4c/$(PKG_VERSION)/ +PKG_BUILD_DIR:=$(BUILD_DIR)/icu +PKG_FIXUP:=libtool,no-autoreconf +PKG_INSTALL=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/libicu + SECTION:=libs + CATEGORY:=Libraries + TITLE:=ICU library for software internationalization + URL:=http://icu-project.org + DEPENDS:=+glib2 +endef + +define Package/libicu/description + ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode + and Globalization support for software applications. +endef + +MAKE_PATH:=source + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/icu + +#define Host/Prepare +# mkdir -p $(HOST_BUILD_DIR) +#endef + + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR)/source all install +endef + + + +# Specify what needs to be done to prepare for building the package. +# In our case, we need to copy the source files to the build directory. +# This is NOT the default. The default uses the PKG_SOURCE_URL and the +# PKG_SOURCE which is not defined here to download the source from the web. +# In order to just build a simple program that we have just written, it is +# much easier to do it this way. +#define Build/Prepare +# $(call Build/Prepare/Default) +# $(CP) -a $(PKG_BUILD_DIR)/source/* $(PKG_BUILD_DIR)/ +#endef + +define Build/Prepare + mkdir -p $(HOST_BUILD_DIR) + $(call Host/Prepare/Default) + $(call Host/Configure/Default,,,source) + $(call Host/Compile) + $(call Build/Prepare/Default) +endef + +define Build/Configure +# mkdir -p $(HOST_BUILD_DIR) +# $(call Host/Prepare/Default) +# $(call Host/Configure/Default,,,source) +# $(call Host/Compile) + $(call Build/Configure/Default, \ + --with-cross-build=$(HOST_BUILD_DIR)/source,, \ + source \ + ) +endef + +#define Build/InstallDev +# $(INSTALL_DIR) $(1)/usr/lib +# $(CP) \ +# $(PKG_INSTALL_DIR)/usr/lib/*.so* \ +# $(1)/usr/lib/ +# +# $(INSTALL_DIR) $(1)/usr/bin +# $(INSTALL_DATA) \ +# $(PKG_INSTALL_DIR)/usr/bin/* \ +# $(1)/usr/bin/ +# +# $(INSTALL_DIR) $(1)/usr/include +# $(CP) \ +# $(PKG_INSTALL_DIR)/usr/include/* \ +# $(1)/usr/include/ +#endef + +define Package/libicu/install + $(INSTALL_DIR) $(1)/usr/lib +# $(CP) \ +# $(PKG_INSTALL_DIR)/usr/lib/*.so* \ +# $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libicu))