From b01dade22db62d20e83bc1900c046b22a93c2036 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 29 Apr 2016 07:50:00 -0400 Subject: [PATCH] nodejs: Link to libstdc++.so instead of stlport --- packages/nodejs/build.sh | 3 +- packages/nodejs/use-standard-c++lib.patch | 108 ++++++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 packages/nodejs/use-standard-c++lib.patch diff --git a/packages/nodejs/build.sh b/packages/nodejs/build.sh index 1bc8c45db..add38c044 100644 --- a/packages/nodejs/build.sh +++ b/packages/nodejs/build.sh @@ -1,8 +1,9 @@ TERMUX_PKG_HOMEPAGE=http://nodejs.org/ TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications" TERMUX_PKG_VERSION=6.0.0 +TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_DEPENDS="openssl, libuv" +TERMUX_PKG_DEPENDS="openssl, libuv, libgnustl" TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace" TERMUX_PKG_BUILD_IN_SRC=yes diff --git a/packages/nodejs/use-standard-c++lib.patch b/packages/nodejs/use-standard-c++lib.patch new file mode 100644 index 000000000..5dd5eb887 --- /dev/null +++ b/packages/nodejs/use-standard-c++lib.patch @@ -0,0 +1,108 @@ +diff -u -r ../node-v6.0.0/deps/v8/build/standalone.gypi ./deps/v8/build/standalone.gypi +--- ../node-v6.0.0/deps/v8/build/standalone.gypi 2016-04-26 15:50:10.000000000 -0400 ++++ ./deps/v8/build/standalone.gypi 2016-04-28 20:30:19.392238419 -0400 +@@ -320,7 +320,6 @@ + ['android_ndk_root==""', { + 'variables': { + 'android_sysroot': '<(android_toolchain)/sysroot/', +- 'android_stl': '<(android_toolchain)/sources/cxx-stl/', + }, + 'conditions': [ + ['target_arch=="x64"', { +@@ -329,15 +328,11 @@ + 'android_lib': '<(android_sysroot)/usr/lib', + }], + ], +- 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include', +- 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include', +- 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', + 'android_support_include': '<(android_toolchain)/sources/android/support/include', + 'android_sysroot': '<(android_sysroot)', + }, { + 'variables': { + 'android_sysroot': '<(android_ndk_root)/platforms/android-<(android_target_platform)/arch-<(android_target_arch)', +- 'android_stl': '<(android_ndk_root)/sources/cxx-stl/', + }, + 'conditions': [ + ['target_arch=="x64"', { +@@ -346,14 +341,10 @@ + 'android_lib': '<(android_sysroot)/usr/lib', + }], + ], +- 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include', +- 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include', +- 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', + 'android_support_include': '<(android_ndk_root)/sources/android/support/include', + 'android_sysroot': '<(android_sysroot)', + }], + ], +- 'android_libcpp_library': 'c++_static', + }], # OS=="android" + ['host_clang==1', { + 'host_cc': '<(clang_dir)/bin/clang', +@@ -1033,11 +1024,6 @@ + '-Wa,--noexecstack', + '--sysroot=<(android_sysroot)', + ], +- 'cflags_cc': [ +- '-isystem<(android_libcpp_include)', +- '-isystem<(android_libcpp_abi_include)', +- '-isystem<(android_support_include)', +- ], + 'defines': [ + 'ANDROID', + #'__GNU_SOURCE=1', # Necessary for clone() +@@ -1062,7 +1048,7 @@ + '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4', + ], + 'libraries': [ +- '-l<(android_libcpp_library)', ++ 'libstdc++', + '-latomic', + # Manually link the libgcc.a that the cross compiler uses. + '