Merge branch 'init-node' into 'master'

Init Nodejs recipe

See merge request redox-os/cookbook!573
This commit is contained in:
Jeremy Soller 2025-08-02 19:19:25 -06:00
commit f544bfbdbf
2 changed files with 62 additions and 3 deletions

View File

@ -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')

View File

@ -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
"""