diff --git a/node13/node.c b/node13/node.c deleted file mode 100644 index 2310ef2087..0000000000 --- a/node13/node.c +++ /dev/null @@ -1,29 +0,0 @@ - -#include -#include -#include -#include -#include - -#define NAME "node13" - -#define WRAP PREFIX "/bin/" NAME -#define REAL PREFIX "/libexec/" NAME "/node" - -int main(int argn, char **argv) -{ - char *path; - - argv[0] = REAL; - if ((path = getenv("NODE")) != NULL) - if (strcmp(path, NAME) != 0 && strcmp(path, WRAP) != 0) - argv[0] = path; - - if (execvp(argv[0], argv) == -1) { - fprintf(stderr, "node: ERROR: failed to execute \"%s\": %s\n", argv[0], strerror(errno)); - exit(1); - } - - return 0; -} - diff --git a/node13/node13.patch b/node13/node13.patch deleted file mode 100644 index 99767aaeb4..0000000000 --- a/node13/node13.patch +++ /dev/null @@ -1,355 +0,0 @@ -Index: common.gypi ---- common.gypi.orig 2019-12-17 08:41:00.000000000 +0100 -+++ common.gypi 2019-12-18 11:39:16.750644000 +0100 -@@ -161,7 +161,7 @@ - }], - ], - }, -- 'cflags': [ '-O3' ], -+ 'cflags': [ '-O2' ], - 'conditions': [ - ['OS=="solaris"', { - # pull in V8's postmortem metadata -@@ -331,7 +331,7 @@ - 'ldflags': [ '-pthread' ], - }], - [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { -- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], -+ 'cflags': [ '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++1y' ], - 'ldflags': [ '-rdynamic' ], - 'target_conditions': [ -@@ -429,10 +429,7 @@ - '-fno-strict-aliasing', - ], - 'WARNING_CFLAGS': [ -- '-Wall', -- '-Wendif-labels', -- '-W', -- '-Wno-unused-parameter', -+ '-Wno-unused-parameter' - ], - }, - 'target_conditions': [ -Index: deps/uv/common.gypi ---- deps/uv/common.gypi.orig 2019-12-17 08:41:01.000000000 +0100 -+++ deps/uv/common.gypi 2019-12-18 11:39:16.750940000 +0100 -@@ -46,7 +46,7 @@ - 'Release': { - 'defines': [ 'NDEBUG' ], - 'cflags': [ -- '-O3', -+ '-O2', - ], - 'msvs_settings': { - 'VCCLCompilerTool': { -Index: deps/uv/uv.gyp ---- deps/uv/uv.gyp.orig 2019-12-17 08:41:01.000000000 +0100 -+++ deps/uv/uv.gyp 2019-12-18 11:39:16.751225000 +0100 -@@ -178,7 +178,7 @@ - 'src/unix/udp.c', - ], - 'link_settings': { -- 'libraries': [ '-lm' ], -+ 'libraries': [ '-lz', '-lm' ], - 'conditions': [ - ['OS=="solaris"', { - 'ldflags': [ '-pthreads' ], -Index: deps/v8/src/base/platform/platform-freebsd.cc ---- deps/v8/src/base/platform/platform-freebsd.cc.orig 2019-12-17 08:41:01.000000000 +0100 -+++ deps/v8/src/base/platform/platform-freebsd.cc 2019-12-18 11:39:16.751481000 +0100 -@@ -25,6 +25,7 @@ - #include // index - - #include -+#include - - #undef MAP_TYPE - -Index: deps/v8/src/builtins/base.tq ---- deps/v8/src/builtins/base.tq.orig 2019-12-17 08:41:01.000000000 +0100 -+++ deps/v8/src/builtins/base.tq 2019-12-18 11:39:16.752357000 +0100 -@@ -546,9 +546,6 @@ - } - - extern class JSArray extends JSObject { -- IsEmpty(): bool { -- return this.length == 0; -- } - length: Number; - } - -@@ -562,15 +559,6 @@ - }; - } - --macro NewJSArray(implicit context: Context)(): JSArray { -- return new JSArray{ -- map: GetFastPackedSmiElementsJSArrayMap(), -- properties_or_hash: kEmptyFixedArray, -- elements: kEmptyFixedArray, -- length: 0 -- }; --} -- - // A HeapObject with a JSArray map, and either fast packed elements, or fast - // holey elements when the global NoElementsProtector is not invalidated. - transient type FastJSArray extends JSArray; -@@ -3178,10 +3166,6 @@ - return UnsafeCast( - LoadNativeContext(context)[JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX]); - } --macro GetFastPackedSmiElementsJSArrayMap(implicit context: Context)(): Map { -- return UnsafeCast( -- LoadNativeContext(context)[JS_ARRAY_PACKED_SMI_ELEMENTS_MAP_INDEX]); --} - macro GetProxyRevocableResultMap(implicit context: Context)(): Map { - return UnsafeCast( - LoadNativeContext(context)[PROXY_REVOCABLE_RESULT_MAP_INDEX]); -@@ -3719,11 +3703,6 @@ - unreachable; - } - --macro VerifiedUnreachable(): never { -- StaticAssert(false); -- unreachable; --} -- - macro Float64IsSomeInfinity(value: float64): bool { - if (value == V8_INFINITY) { - return true; -Index: deps/v8/src/wasm/wasm-result.cc ---- deps/v8/src/wasm/wasm-result.cc.orig 2019-12-17 08:41:02.000000000 +0100 -+++ deps/v8/src/wasm/wasm-result.cc 2019-12-18 11:39:16.752617000 +0100 -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+ - #include "src/wasm/wasm-result.h" - - #include "src/execution/isolate-inl.h" -Index: lib/dns.js ---- lib/dns.js.orig 2019-12-17 08:41:03.000000000 +0100 -+++ lib/dns.js 2019-12-18 11:39:16.752882000 +0100 -@@ -146,6 +146,10 @@ - req.hostname = hostname; - req.oncomplete = all ? onlookupall : onlookup; - -+ /* FreeBSD getaddrinfo(3) knows AI_V4MAPPED, but dislikes it */ -+ if (process.platform === "freebsd") -+ hints &= ~(exports.V4MAPPED); -+ - const err = cares.getaddrinfo( - req, toASCII(hostname), family, hints, verbatim - ); -Index: lib/internal/modules/cjs/loader.js ---- lib/internal/modules/cjs/loader.js.orig 2019-12-17 08:41:03.000000000 +0100 -+++ lib/internal/modules/cjs/loader.js 2019-12-18 11:39:16.753323000 +0100 -@@ -1246,7 +1246,10 @@ - path.resolve(process.execPath, '..') : - path.resolve(process.execPath, '..', '..'); - -- let paths = [path.resolve(prefixDir, 'lib', 'node')]; -+ let paths = [ -+ path.resolve(prefixDir, '..', 'lib', 'node', 'usr'), -+ path.resolve(prefixDir, '..', 'lib', 'node', 'pkg') -+ ]; - - if (homeDir) { - paths.unshift(path.resolve(homeDir, '.node_libraries')); -Index: src/inspector_socket_server.cc ---- src/inspector_socket_server.cc.orig 2019-12-17 08:41:03.000000000 +0100 -+++ src/inspector_socket_server.cc 2019-12-18 11:39:16.753627000 +0100 -@@ -20,7 +20,7 @@ - bool include_protocol); - namespace { - --static const uint8_t PROTOCOL_JSON[] = { -+static uint8_t PROTOCOL_JSON[] = { - #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) - }; - -Index: src/node_constants.cc ---- src/node_constants.cc.orig 2019-12-17 08:41:03.000000000 +0100 -+++ src/node_constants.cc 2019-12-18 11:39:16.753984000 +0100 -@@ -36,10 +36,10 @@ - - - #if HAVE_OPENSSL --#include --#include -+#include "openssl/ec.h" -+#include "openssl/ssl.h" - #ifndef OPENSSL_NO_ENGINE --#include -+#include "openssl/engine.h" - #endif // !OPENSSL_NO_ENGINE - #endif // HAVE_OPENSSL - -Index: src/node_crypto.cc ---- src/node_crypto.cc.orig 2019-12-17 08:41:03.000000000 +0100 -+++ src/node_crypto.cc 2019-12-18 11:39:16.755323000 +0100 -@@ -38,17 +38,17 @@ - #include "util-inl.h" - #include "v8.h" - --#include --#include -+#include "openssl/ec.h" -+#include "openssl/ecdh.h" - #ifndef OPENSSL_NO_ENGINE --# include -+# include "openssl/engine.h" - #endif // !OPENSSL_NO_ENGINE --#include --#include --#include --#include --#include --#include -+#include "openssl/evp.h" -+#include "openssl/pem.h" -+#include "openssl/x509v3.h" -+#include "openssl/hmac.h" -+#include "openssl/rand.h" -+#include "openssl/pkcs12.h" - - #include - #include // INT_MAX -Index: src/node_crypto.h ---- src/node_crypto.h.orig 2019-12-18 11:39:16.755853000 +0100 -+++ src/node_crypto.h 2019-12-18 11:44:58.717742000 +0100 -@@ -33,12 +33,12 @@ - - #include "v8.h" - --#include --#include --#include --#include --#include --#include -+#include "openssl/err.h" -+#include "openssl/ssl.h" -+#include "openssl/bn.h" -+#include "openssl/dh.h" -+#include "openssl/ec.h" -+#include "openssl/rsa.h" - - namespace node { - namespace crypto { -Index: src/tls_wrap.h ---- src/tls_wrap.h.orig 2019-12-17 08:41:03.000000000 +0100 -+++ src/tls_wrap.h 2019-12-18 11:39:16.756335000 +0100 -@@ -30,7 +30,7 @@ - #include "stream_wrap.h" - #include "v8.h" - --#include -+#include "openssl/ssl.h" - - #include - -Index: src/util.h ---- src/util.h.orig 2019-12-17 08:41:03.000000000 +0100 -+++ src/util.h 2019-12-18 11:39:16.756670000 +0100 -@@ -152,14 +152,23 @@ - } \ - } while (0) - -+#undef CHECK_EQ - #define CHECK_EQ(a, b) CHECK((a) == (b)) -+#undef CHECK_GE - #define CHECK_GE(a, b) CHECK((a) >= (b)) -+#undef CHECK_GT - #define CHECK_GT(a, b) CHECK((a) > (b)) -+#undef CHECK_LE - #define CHECK_LE(a, b) CHECK((a) <= (b)) -+#undef CHECK_LT - #define CHECK_LT(a, b) CHECK((a) < (b)) -+#undef CHECK_NE - #define CHECK_NE(a, b) CHECK((a) != (b)) -+#undef CHECK_NULL - #define CHECK_NULL(val) CHECK((val) == nullptr) -+#undef CHECK_NOT_NULL - #define CHECK_NOT_NULL(val) CHECK((val) != nullptr) -+#undef CHECK_IMPLIES - #define CHECK_IMPLIES(a, b) CHECK(!(a) || (b)) - - #ifdef DEBUG -@@ -187,6 +196,7 @@ - #endif - - -+#undef UNREACHABLE - #define UNREACHABLE(...) \ - ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) - -Index: tools/install.py ---- tools/install.py.orig 2019-12-17 08:41:04.000000000 +0100 -+++ tools/install.py 2019-12-18 11:39:16.756922000 +0100 -@@ -151,10 +151,7 @@ - action(['deps/v8/tools/gdbinit'], 'share/doc/node/') - action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/') - -- if 'freebsd' in sys.platform or 'openbsd' in sys.platform: -- action(['doc/node.1'], 'man/man1/') -- else: -- action(['doc/node.1'], 'share/man/man1/') -+ action(['doc/node.1'], 'man/man1/') - - if 'true' == variables.get('node_install_npm'): npm_files(action) - -Index: tools/v8_gypfiles/toolchain.gypi ---- tools/v8_gypfiles/toolchain.gypi.orig 2019-12-17 08:41:04.000000000 +0100 -+++ tools/v8_gypfiles/toolchain.gypi 2019-12-18 11:39:16.757410000 +0100 -@@ -1123,12 +1123,6 @@ - ['OS=="solaris"', { - 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. - }], -- ['OS=="freebsd" or OS=="openbsd"', { -- 'cflags': [ '-I/usr/local/include' ], -- }], -- ['OS=="netbsd"', { -- 'cflags': [ '-I/usr/pkg/include' ], -- }], - ['OS=="aix"', { - 'defines': [ - # Support for malloc(0) -@@ -1296,8 +1290,8 @@ - # Don't use -O3 with sanitizers. - ['asan==0 and msan==0 and lsan==0 \ - and tsan==0 and ubsan==0 and ubsan_vptr==0', { -- 'cflags': ['-O3'], -- 'cflags!': ['-O2'], -+ 'cflags': ['-O2'], -+ 'cflags!': ['-O3'], - }, { - 'cflags': ['-O2'], - 'cflags!': ['-O3'], -@@ -1345,8 +1339,8 @@ - # Don't use -O3 with sanitizers. - ['asan==0 and msan==0 and lsan==0 \ - and tsan==0 and ubsan==0 and ubsan_vptr==0', { -- 'cflags': ['-O3'], -- 'cflags!': ['-O2'], -+ 'cflags': ['-O2'], -+ 'cflags!': ['-O3'], - }, { - 'cflags': ['-O2'], - 'cflags!': ['-O3'], -Index: tools/v8_gypfiles/v8.gyp ---- tools/v8_gypfiles/v8.gyp.orig 2019-12-17 08:41:04.000000000 +0100 -+++ tools/v8_gypfiles/v8.gyp 2019-12-18 11:39:16.757845000 +0100 -@@ -90,8 +90,7 @@ - "<(V8_ROOT)/src/builtins/typed-array-some.tq", - "<(V8_ROOT)/src/builtins/typed-array-subarray.tq", - "<(V8_ROOT)/src/builtins/typed-array.tq", -- "<(V8_ROOT)/third_party/v8/builtins/array-sort.tq", -- "<(V8_ROOT)/test/torque/test-torque.tq", -+ "<(V8_ROOT)/third_party/v8/builtins/array-sort.tq" - ], - 'torque_output_root': '<(SHARED_INTERMEDIATE_DIR)/torque-output-root', - 'torque_files_replaced': [' -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# package version -%define V_opkg 13.10.1 -%define V_dist 13.10.1 - -# package information -Name: node13 -Summary: Node JavaScript Run-Time (V13) -URL: http://nodejs.org/ -Vendor: Node Foundation -Packager: OpenPKG Project -Distribution: OpenPKG Community -Class: PLUS -Group: Web -License: MIT/BSD -Version: %{V_opkg} -Release: 20200305 - -# package options -%option with_icu yes -%option with_node no - -# list of sources -Source0: https://nodejs.org/download/release/v%{V_dist}/node-v%{V_dist}.tar.xz -Source1: node.c -Patch0: node13.patch - -# build information -BuildPreReq: OpenPKG, openpkg >= 20160101, make, gcc, gcc::with_cxx = yes, python2, pkgconfig -PreReq: OpenPKG, openpkg >= 20160101 -BuildPreReq: openssl11, libexecinfo, zlib, ares, libuv, nghttp2 -PreReq: openssl11, libexecinfo, zlib, ares, libuv, nghttp2 -%if "%{with_icu}" == "yes" -BuildPreReq: icu -PreReq: icu -%endif -%if "%{with_node}" == "yes" -Provides: node = %{version} -%endif - -%description - Node.js (V13) provides an easy way to build scalable network - servers in JavaScript. It is an event-driven I/O environment based - on Google V8 JavaScript virtual machine version 7.9.317.25. - -%track - prog node13 = { - version = %{V_dist} - url = https://nodejs.org/download/release/ - regex = v(13\.\d+\.\d+)/ - } - -%prep - %setup -q -n node-v%{V_dist} - %patch -p0 - -%build - # provide local tool wrapper scripts as we cannot - # reliably pass the includes via configure variables - cflags="-I`pwd`/deps/v8" - cflags="$cflags -I`pwd`/deps/v8/include" -%if "%{with_icu}" != "yes" - cflags="$cflags -I`pwd`/deps/icu-small/source/common" -%endif - cflags="$cflags -I`pwd`/deps/llhttp/include" - cflags="$cflags -I`pwd`/deps/http_parser" - cflags="$cflags %{l_cppflags openssl11 .}" - ldflags="%{l_ldflags openssl11 .}" - mkdir tool - for tool in gcc g++ c%{l_nil}c c++; do - ( echo "#!/bin/sh" - echo "exec %{l_prefix}/bin/$tool $cflags $ldflags \${1+\"\$@\"}" - ) >tool/$tool - chmod a+x tool/$tool - done - PATH="`pwd`/tool:$PATH" - - # configure program - libs="-lexecinfo -lz" - case "%{l_platform -t} " in - *-linux* ) libs="$libs -ldl" ;; - esac - CC="gcc" \ - CXX="g++" \ - CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O} -Wno-deprecated-declarations" \ - CPPFLAGS="%{l_cppflags openssl11 .}" \ - LDFLAGS="%{l_ldflags openssl11 .}" \ - LIBS="$libs" \ - %{l_prefix}/bin/python2 ./configure \ - --prefix=%{l_prefix} \ - --shared-openssl \ - --shared-openssl-includes=%{l_prefix}/include/openssl11 \ - --shared-openssl-libpath=%{l_prefix}/lib/openssl11 \ - --shared-openssl-libname="ssl,crypto" \ - --shared-zlib \ - --shared-zlib-includes=%{l_prefix}/include \ - --shared-zlib-libpath=%{l_prefix}/lib \ - --shared-zlib-libname="z" \ - --shared-cares \ - --shared-cares-includes=%{l_prefix}/include \ - --shared-cares-libpath=%{l_prefix}/lib \ - --shared-cares-libname="ares" \ - --shared-libuv \ - --shared-libuv-includes=%{l_prefix}/include \ - --shared-libuv-libpath=%{l_prefix}/lib \ - --shared-libuv-libname="uv" \ - --shared-nghttp2 \ - --shared-nghttp2-includes=%{l_prefix}/include \ - --shared-nghttp2-libpath=%{l_prefix}/lib \ - --shared-nghttp2-libname="nghttp2" \ -%if "%{with_icu}" == "yes" - --with-intl=system-icu \ -%else - --with-intl=small-icu \ -%endif - --with-snapshot \ - --without-npm \ - --download=none - - # build program - %{l_make} %{l_mflags -O} - - # build wrapper - %{l_cc} %{l_cflags -O} %{l_cppflags} -DPREFIX="\"%{l_prefix}\"" %{l_ldflags} \ - -o node-wrapper %{SOURCE node.c} - -%install - # install program - ( PATH="`pwd`/tool:$PATH" - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT - ) || exit $? - - # install wrapper - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/libexec/node13 - mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ - $RPM_BUILD_ROOT%{l_prefix}/libexec/node13/node - %{l_shtool} install -c -s -m 755 \ - node-wrapper $RPM_BUILD_ROOT%{l_prefix}/bin/node - - # post-installation strip-down - strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true - rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/dtrace - rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/systemtap - rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc - -%if "%{with_node}" == "yes" - # create NPM package installation areas - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/lib/node/usr \ - $RPM_BUILD_ROOT%{l_prefix}/lib/node/pkg -%endif - - # post-adjust installation - mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ - $RPM_BUILD_ROOT%{l_prefix}/bin/node13 - mv $RPM_BUILD_ROOT%{l_prefix}/include/node \ - $RPM_BUILD_ROOT%{l_prefix}/include/node13 - mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 \ - $RPM_BUILD_ROOT%{l_prefix}/man/man1/node13.1 - -%if "%{with_node}" == "yes" - # shim as Node - ln -s node13 $RPM_BUILD_ROOT%{l_prefix}/bin/node - ln -s node13 $RPM_BUILD_ROOT%{l_prefix}/include/node - ln -s node13.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 -%endif - - # determine installation files - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} - -%files -f files - -%clean - diff --git a/node13/version.sh b/node13/version.sh deleted file mode 100644 index f7ba8696d8..0000000000 --- a/node13/version.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -PATH=/openpkg/bin:$PATH -NODE=node13 /openpkg/bin/node -e 'console.log(process.versions)' diff --git a/node8/node.c b/node8/node.c deleted file mode 100644 index 765a18f8c5..0000000000 --- a/node8/node.c +++ /dev/null @@ -1,29 +0,0 @@ - -#include -#include -#include -#include -#include - -#define NAME "node8" - -#define WRAP PREFIX "/bin/" NAME -#define REAL PREFIX "/libexec/" NAME "/node" - -int main(int argn, char **argv) -{ - char *path; - - argv[0] = REAL; - if ((path = getenv("NODE")) != NULL) - if (strcmp(path, NAME) != 0 && strcmp(path, WRAP) != 0) - argv[0] = path; - - if (execvp(argv[0], argv) == -1) { - fprintf(stderr, "node: ERROR: failed to execute \"%s\": %s\n", argv[0], strerror(errno)); - exit(1); - } - - return 0; -} - diff --git a/node8/node8.patch b/node8/node8.patch deleted file mode 100644 index 97c7c063ae..0000000000 --- a/node8/node8.patch +++ /dev/null @@ -1,342 +0,0 @@ -Index: common.gypi ---- common.gypi.orig 2018-03-06 23:55:38.000000000 +0100 -+++ common.gypi 2018-03-07 08:40:56.487283000 +0100 -@@ -131,7 +131,7 @@ - 'variables': { - 'v8_enable_handle_zapping': 0, - }, -- 'cflags': [ '-O3' ], -+ 'cflags': [ '-O2' ], - 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', -@@ -286,7 +286,7 @@ - 'ldflags': [ '-pthread' ], - }], - [ 'OS in "linux freebsd openbsd solaris android aix"', { -- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], -+ 'cflags': [ '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ], - 'ldflags': [ '-rdynamic' ], - 'target_conditions': [ -@@ -377,10 +377,7 @@ - '-fno-strict-aliasing', - ], - 'WARNING_CFLAGS': [ -- '-Wall', -- '-Wendif-labels', -- '-W', -- '-Wno-unused-parameter', -+ '-Wno-unused-parameter' - ], - }, - 'target_conditions': [ -Index: deps/http_parser/http_parser.gyp ---- deps/http_parser/http_parser.gyp.orig 2018-03-06 23:55:38.000000000 +0100 -+++ deps/http_parser/http_parser.gyp 2018-03-07 08:40:56.487432000 +0100 -@@ -21,7 +21,7 @@ - }, - 'Release': { - 'defines': [ 'NDEBUG' ], -- 'cflags': [ '-Wall', '-Wextra', '-O3' ], -+ 'cflags': [ '-Wall', '-Wextra', '-O2' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 0, # static release -Index: deps/uv/common.gypi ---- deps/uv/common.gypi.orig 2018-03-06 23:55:45.000000000 +0100 -+++ deps/uv/common.gypi 2018-03-07 08:40:56.487590000 +0100 -@@ -46,7 +46,7 @@ - 'Release': { - 'defines': [ 'NDEBUG' ], - 'cflags': [ -- '-O3', -+ '-O2', - ], - 'msvs_settings': { - 'VCCLCompilerTool': { -Index: deps/uv/uv.gyp ---- deps/uv/uv.gyp.orig 2018-03-06 23:55:45.000000000 +0100 -+++ deps/uv/uv.gyp 2018-03-07 08:40:56.487778000 +0100 -@@ -168,7 +168,7 @@ - 'src/unix/udp.c', - ], - 'link_settings': { -- 'libraries': [ '-lm' ], -+ 'libraries': [ '-lz', '-lm' ], - 'conditions': [ - ['OS=="solaris"', { - 'ldflags': [ '-pthreads' ], -Index: deps/v8/gypfiles/toolchain.gypi ---- deps/v8/gypfiles/toolchain.gypi.orig 2018-03-06 23:55:45.000000000 +0100 -+++ deps/v8/gypfiles/toolchain.gypi 2018-03-07 08:40:56.488082000 +0100 -@@ -1080,12 +1080,6 @@ - ['OS=="solaris"', { - 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. - }], -- ['OS=="freebsd" or OS=="openbsd"', { -- 'cflags': [ '-I/usr/local/include' ], -- }], -- ['OS=="netbsd"', { -- 'cflags': [ '-I/usr/pkg/include' ], -- }], - ['OS=="aix"', { - 'defines': [ - # Support for malloc(0) -@@ -1195,7 +1189,7 @@ - # Don't use -O3 with sanitizers. - ['asan==0 and msan==0 and lsan==0 \ - and tsan==0 and ubsan==0 and ubsan_vptr==0', { -- 'cflags': ['-O3'], -+ 'cflags': ['-O2'], - 'cflags!': ['-O2'], - }, { - 'cflags': ['-O2'], -@@ -1311,11 +1305,11 @@ - # Don't use -O3 with sanitizers. - ['asan==0 and msan==0 and lsan==0 \ - and tsan==0 and ubsan==0 and ubsan_vptr==0', { -- 'cflags': ['-O3'], -+ 'cflags': ['-O2'], - 'cflags!': ['-O2'], - }, { - 'cflags': ['-O2'], -- 'cflags!': ['-O3'], -+ 'cflags!': ['-O2'], - }], - ], - }], -Index: deps/v8/src/base/platform/platform-freebsd.cc ---- deps/v8/src/base/platform/platform-freebsd.cc.orig 2018-03-06 23:55:46.000000000 +0100 -+++ deps/v8/src/base/platform/platform-freebsd.cc 2018-03-07 08:40:56.488247000 +0100 -@@ -25,6 +25,7 @@ - #include // index - - #include -+#include - - #undef MAP_TYPE - -Index: deps/v8/src/log-utils.cc ---- deps/v8/src/log-utils.cc.orig 2018-03-06 23:55:49.000000000 +0100 -+++ deps/v8/src/log-utils.cc 2018-03-07 08:40:56.488484000 +0100 -@@ -2,6 +2,9 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+#include -+ - #include "src/log-utils.h" - - #include "src/assert-scope.h" -Index: deps/v8/src/v8.gyp ---- deps/v8/src/v8.gyp.orig 2018-03-06 23:55:50.000000000 +0100 -+++ deps/v8/src/v8.gyp 2018-03-07 08:40:56.488911000 +0100 -@@ -2026,7 +2026,7 @@ - ['OS=="freebsd"', { - 'link_settings': { - 'libraries': [ -- '-L/usr/local/lib -lexecinfo', -+ '-lexecinfo', - ]}, - 'sources': [ - 'base/debug/stack_trace_posix.cc', -@@ -2041,7 +2041,7 @@ - ['OS=="openbsd"', { - 'link_settings': { - 'libraries': [ -- '-L/usr/local/lib -lexecinfo', -+ '-lexecinfo', - ]}, - 'sources': [ - 'base/platform/platform-openbsd.cc', -@@ -2055,7 +2055,7 @@ - ['OS=="netbsd"', { - 'link_settings': { - 'libraries': [ -- '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo', -+ '-lexecinfo', - ]}, - 'sources': [ - 'base/debug/stack_trace_posix.cc', -Index: lib/dns.js ---- lib/dns.js.orig 2018-03-06 23:56:00.000000000 +0100 -+++ lib/dns.js 2018-03-07 08:40:56.489100000 +0100 -@@ -179,6 +179,10 @@ - req.hostname = hostname; - req.oncomplete = all ? onlookupall : onlookup; - -+ /* FreeBSD getaddrinfo(3) knows AI_V4MAPPED, but dislikes it */ -+ if (process.platform === "freebsd") -+ hints &= ~(exports.V4MAPPED); -+ - var err = cares.getaddrinfo(req, hostname, family, hints, verbatim); - if (err) { - process.nextTick(callback, errnoException(err, 'getaddrinfo', hostname)); -Index: lib/module.js ---- lib/module.js.orig 2018-03-06 23:56:00.000000000 +0100 -+++ lib/module.js 2018-03-07 08:40:56.489305000 +0100 -@@ -714,7 +714,10 @@ - } else { - prefixDir = path.resolve(process.execPath, '..', '..'); - } -- var paths = [path.resolve(prefixDir, 'lib', 'node')]; -+ var paths = [ -+ path.resolve(prefixDir, '..', 'lib', 'node', 'usr'), -+ path.resolve(prefixDir, '..', 'lib', 'node', 'pkg') -+ ]; - - if (homeDir) { - paths.unshift(path.resolve(homeDir, '.node_libraries')); -Index: src/inspector_socket_server.cc ---- src/inspector_socket_server.cc.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/inspector_socket_server.cc 2018-03-07 08:40:56.489544000 +0100 -@@ -36,7 +36,7 @@ - - namespace { - --static const uint8_t PROTOCOL_JSON[] = { -+static uint8_t PROTOCOL_JSON[] = { - #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) - }; - -Index: src/node_constants.cc ---- src/node_constants.cc.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/node_constants.cc 2018-03-07 08:40:56.489768000 +0100 -@@ -35,10 +35,10 @@ - #include - - #if HAVE_OPENSSL --# include --# include -+# include "openssl/ec.h" -+# include "openssl/ssl.h" - # ifndef OPENSSL_NO_ENGINE --# include -+# include "openssl/engine.h" - # endif // !OPENSSL_NO_ENGINE - #endif - -Index: src/node_crypto.cc ---- src/node_crypto.cc.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/node_crypto.cc 2018-03-07 08:40:56.491033000 +0100 -@@ -51,6 +51,8 @@ - #include - #include - -+#include -+ - #define THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER(val, prefix) \ - do { \ - if (!Buffer::HasInstance(val) && !val->IsString()) { \ -Index: src/node_crypto.h ---- src/node_crypto.h.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/node_crypto.h 2018-03-07 08:40:56.491311000 +0100 -@@ -36,20 +36,20 @@ - - #include "v8.h" - --#include --#include --#include -+#include "openssl/ssl.h" -+#include "openssl/ec.h" -+#include "openssl/ecdh.h" - #ifndef OPENSSL_NO_ENGINE --# include -+# include "openssl/engine.h" - #endif // !OPENSSL_NO_ENGINE --#include --#include --#include --#include --#include --#include --#include --#include -+#include "openssl/err.h" -+#include "openssl/evp.h" -+#include "openssl/pem.h" -+#include "openssl/x509.h" -+#include "openssl/x509v3.h" -+#include "openssl/hmac.h" -+#include "openssl/rand.h" -+#include "openssl/pkcs12.h" - - #if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_set_tlsext_status_cb) - # define NODE__HAVE_TLSEXT_STATUS_CB -Index: src/node_internals.h ---- src/node_internals.h.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/node_internals.h 2018-03-07 08:40:56.491470000 +0100 -@@ -237,6 +237,7 @@ - # define ROUND_UP(a, b) ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a)) - #endif - -+# undef MUST_USE_RESULT - #ifdef __GNUC__ - # define MUST_USE_RESULT __attribute__((warn_unused_result)) - #else -Index: src/tls_wrap.h ---- src/tls_wrap.h.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/tls_wrap.h 2018-03-07 08:40:56.491603000 +0100 -@@ -33,7 +33,7 @@ - #include "util.h" - #include "v8.h" - --#include -+#include "openssl/ssl.h" - - #include - -Index: src/util.h ---- src/util.h.orig 2018-03-06 23:56:00.000000000 +0100 -+++ src/util.h 2018-03-07 08:40:56.491766000 +0100 -@@ -84,9 +84,11 @@ - - template using remove_reference = std::remove_reference; - -+#undef FIXED_ONE_BYTE_STRING - #define FIXED_ONE_BYTE_STRING(isolate, string) \ - (node::OneByteString((isolate), (string), sizeof(string) - 1)) - -+#undef DISALLOW_COPY_AND_ASSIGN - #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - void operator=(const TypeName&) = delete; \ - void operator=(TypeName&&) = delete; \ -@@ -124,13 +126,20 @@ - } \ - } while (0) - -+#undef CHECK_EQ - #define CHECK_EQ(a, b) CHECK((a) == (b)) -+#undef CHECK_GE - #define CHECK_GE(a, b) CHECK((a) >= (b)) -+#undef CHECK_GT - #define CHECK_GT(a, b) CHECK((a) > (b)) -+#undef CHECK_LE - #define CHECK_LE(a, b) CHECK((a) <= (b)) -+#undef CHECK_LT - #define CHECK_LT(a, b) CHECK((a) < (b)) -+#undef CHECK_NE - #define CHECK_NE(a, b) CHECK((a) != (b)) - -+#undef UNREACHABLE - #define UNREACHABLE() ABORT() - - #define ASSIGN_OR_RETURN_UNWRAP(ptr, obj, ...) \ -Index: tools/install.py ---- tools/install.py.orig 2018-03-06 23:56:03.000000000 +0100 -+++ tools/install.py 2018-03-07 08:40:56.491917000 +0100 -@@ -149,10 +149,7 @@ - action(['deps/v8/tools/lldbinit'], 'share/doc/node/') - action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/') - -- if 'freebsd' in sys.platform or 'openbsd' in sys.platform: -- action(['doc/node.1'], 'man/man1/') -- else: -- action(['doc/node.1'], 'share/man/man1/') -+ action(['doc/node.1'], 'man/man1/') - - if 'true' == variables.get('node_install_npm'): npm_files(action) - diff --git a/node8/node8.spec b/node8/node8.spec deleted file mode 100644 index adaa1cfac3..0000000000 --- a/node8/node8.spec +++ /dev/null @@ -1,191 +0,0 @@ -## -## node8.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2020 OpenPKG Project -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# package version -%define V_opkg 8.17.0 -%define V_dist 8.17.0 - -# package information -Name: node8 -Summary: Node JavaScript Run-Time (V8) -URL: http://nodejs.org/ -Vendor: Node Foundation -Packager: OpenPKG Project -Distribution: OpenPKG Community -Class: PLUS -Group: Web -License: MIT/BSD -Version: %{V_opkg} -Release: 20191218 - -# package options -%option with_icu yes -%option with_node no - -# list of sources -Source0: https://nodejs.org/download/release/v%{V_dist}/node-v%{V_dist}.tar.xz -Source1: node.c -Patch0: node8.patch - -# build information -BuildPreReq: OpenPKG, openpkg >= 20160101, make, gcc >= 5.2, gcc::with_cxx = yes, python2, pkgconfig -PreReq: OpenPKG, openpkg >= 20160101 -BuildPreReq: openssl >= 1.0.2, libexecinfo, zlib, ares, libuv, nghttp2 -PreReq: openssl >= 1.0.2, libexecinfo, zlib, ares, libuv, nghttp2 -%if "%{with_icu}" == "yes" -BuildPreReq: icu -PreReq: icu -%endif -%if "%{with_node}" == "yes" -Provides: node = %{version} -%endif - -%description - Node.js (V8, LTS) provides an easy way to build scalable network - servers in JavaScript. It is an event-driven I/O environment based - on Google V8 JavaScript virtual machine version 6.2.414.54. - -%track - prog node8 = { - version = %{V_dist} - url = https://nodejs.org/download/release/ - regex = v(8\.\d+\.\d+)/ - } - -%prep - %setup -q -n node-v%{V_dist} - %patch -p0 - -%build - # provide local tool wrapper scripts as we cannot - # reliably pass the includes via configure variables - includes="-I`pwd`/deps/v8_inspector -I`pwd`/deps/v8_inspector/include" - includes="$includes -I`pwd`/deps/v8 -I`pwd`/deps/v8/include" - includes="$includes -I`pwd`/deps/http_parser" - includes="$includes %{l_cppflags}" - mkdir tool - for tool in gcc g++ c%{l_nil}c c++; do - ( echo "#!/bin/sh" - echo "exec %{l_prefix}/bin/$tool $includes \${1+\"\$@\"}" - ) >tool/$tool - chmod a+x tool/$tool - done - PATH="`pwd`/tool:$PATH" - - # configure program - libs="-lexecinfo -lz" - case "%{l_platform -t} " in - *-linux* ) libs="$libs -ldl" ;; - esac - CC="gcc" \ - CXX="g++" \ - CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O} -Wno-deprecated-declarations" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - LIBS="$libs" \ - %{l_prefix}/bin/python2 ./configure \ - --prefix=%{l_prefix} \ - --shared-openssl \ - --shared-openssl-includes=%{l_prefix}/include \ - --shared-openssl-libpath=%{l_prefix}/lib \ - --shared-openssl-libname="ssl,crypto" \ - --shared-zlib \ - --shared-zlib-includes=%{l_prefix}/include \ - --shared-zlib-libpath=%{l_prefix}/lib \ - --shared-zlib-libname="z" \ - --shared-cares \ - --shared-cares-includes=%{l_prefix}/include \ - --shared-cares-libpath=%{l_prefix}/lib \ - --shared-cares-libname="ares" \ - --shared-libuv \ - --shared-libuv-includes=%{l_prefix}/include \ - --shared-libuv-libpath=%{l_prefix}/lib \ - --shared-libuv-libname="uv" \ - --shared-nghttp2 \ - --shared-nghttp2-includes=%{l_prefix}/include \ - --shared-nghttp2-libpath=%{l_prefix}/lib \ - --shared-nghttp2-libname="nghttp2" \ -%if "%{with_icu}" == "yes" - --with-intl=system-icu \ -%else - --with-intl=small-icu \ -%endif - --without-snapshot \ - --without-npm \ - --download=none - - # build program - %{l_make} %{l_mflags -O} - - # build wrapper - %{l_cc} %{l_cflags -O} %{l_cppflags} -DPREFIX="\"%{l_prefix}\"" %{l_ldflags} \ - -o node-wrapper %{SOURCE node.c} - -%install - # install program - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT - - # install wrapper - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/libexec/node8 - mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ - $RPM_BUILD_ROOT%{l_prefix}/libexec/node8/node - %{l_shtool} install -c -s -m 755 \ - node-wrapper $RPM_BUILD_ROOT%{l_prefix}/bin/node - - # post-installation strip-down - strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true - rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/dtrace - rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/systemtap - rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc - -%if "%{with_node}" == "yes" - # create NPM package installation areas - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/lib/node/usr \ - $RPM_BUILD_ROOT%{l_prefix}/lib/node/pkg -%endif - - # post-adjust installation - mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ - $RPM_BUILD_ROOT%{l_prefix}/bin/node8 - mv $RPM_BUILD_ROOT%{l_prefix}/include/node \ - $RPM_BUILD_ROOT%{l_prefix}/include/node8 - mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 \ - $RPM_BUILD_ROOT%{l_prefix}/man/man1/node8.1 - -%if "%{with_node}" == "yes" - # shim as Node - ln -s node8 $RPM_BUILD_ROOT%{l_prefix}/bin/node - ln -s node8 $RPM_BUILD_ROOT%{l_prefix}/include/node - ln -s node8.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 -%endif - - # determine installation files - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} - -%files -f files - -%clean - diff --git a/node8/version.sh b/node8/version.sh deleted file mode 100644 index dcd24d37ec..0000000000 --- a/node8/version.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -NODE=node8 /usr/opkg/bin/node -e 'console.log(process.versions)'