diff --git a/recipes/wip/dev/lang/nodejs/01_redox.patch b/recipes/wip/dev/lang/nodejs/01_redox.patch new file mode 100644 index 00000000..f80a8993 --- /dev/null +++ b/recipes/wip/dev/lang/nodejs/01_redox.patch @@ -0,0 +1,12 @@ +diff -ruwN source/configure.py source-new/configure.py +--- source/configure.py 2025-07-31 15:37:54.000000000 +0700 ++++ source-new/configure.py 2025-08-03 00:37:51.836604059 +0700 +@@ -44,7 +44,7 @@ + # parse our options + parser = argparse.ArgumentParser() + +-valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', ++valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', 'redox', + 'android', 'aix', 'cloudabi', 'os400', 'ios', 'openharmony') + valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', + 'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64') diff --git a/recipes/wip/dev/lang/nodejs/recipe.toml b/recipes/wip/dev/lang/nodejs/recipe.toml index 853ff6d9..fbc91fb9 100644 --- a/recipes/wip/dev/lang/nodejs/recipe.toml +++ b/recipes/wip/dev/lang/nodejs/recipe.toml @@ -1,5 +1,52 @@ -#TODO can't find the Redox target +#TODO depedencies needed [source] -tar = "https://nodejs.org/dist/v20.6.1/node-v20.6.1.tar.gz" +tar = "https://nodejs.org/dist/v24.5.0/node-v24.5.0.tar.gz" +patches = ["01_redox.patch"] + [build] -template = "configure" +template = "custom" +depedencies = [ +# "ada", + "libbrotli", +# "cares", + "libuv", +# "ngtcp2", + "nghttp2", +# "http-parser", +# "nghttp3", + "openssl1", + "simdjson", +# "simdutf", + "sqlite3", +# "uvwasi", + "zlib", + "zstd", +] +script = """ +DYNAMIC_INIT + +case "${TARGET}" in + x86-unknown-redox) + export NODE_CPU=x32 + ;; + x86_64-unknown-redox) + export NODE_CPU=x64 + ;; + aarch64-unknown-redox) + export NODE_CPU=arm64 + ;; +esac + +COOKBOOK_CONFIGURE_FLAGS=( + --prefix=${COOKBOOK_STAGE} + --dest-cpu=${NODE_CPU} + --dest-os=redox + --shared-libuv + --shared-nghttp2 + --shared-openssl + --shared-zlib + --shared-zstd + --cross-compiling +) +cookbook_configure +"""