feat: add package nodejs

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
sisungo committed 2026-11-04 15:40:58 +00:00
1 parent 07a5703b91
commit 09dee71feb
1 file changed
+59
+59
View File
@@ -0,0 +1,59 @@
from lib.make import *
from lib import cpp
# FIXME: Quirks:
# - We currently only use the bundled OpenSSL, since AWS-LC fails to compile this project
# - Some libraries should, but are not system-provided
version("24.22.1")
description("A free, open-source and cross-platform JavaScript runtime environment.")
maintainer("sisungo <[email protected]>")
source_url("https://nodejs.org/dist/v24.22.1/node-v24.22.1.tar.gz")
builddep("shortcut/c++")
builddep("pkgconf @target")
builddep("ninja @target")
builddep("libsqlite-dev @target")
builddep("libuv-dev @target")
builddep("libnghttp2-dev @target")
builddep("libz-dev @target")
builddep("libbrotli-dev @target")
builddep("libcares-dev @target")
builddep("libzstd-dev @target")
builddep("libicu4c-dev @target")
builddep("libngtcp2-dev @target")
builddep("libnghttp3-dev @target")
builddep("python (>=3.14.0, <=3.14.9999) @target")
builddep("linux-dev @target")
builddep("gnu-make")
builddep("gnu-sed")
builddep("grep")
def build():
cpp.configure([
f"--prefix={get_prefix('nodejs')}",
"--use_clang",
"--enable-lto",
"--openssl-use-def-ca-store",
"--openssl-system-ca-path", "/var/config/ssl/ca-certificates.crt",
"--shared-libuv",
"--shared-nghttp2",
"--shared-zlib",
"--shared-brotli",
"--shared-cares",
"--shared-sqlite",
"--shared-zstd",
"--shared-ngtcp2",
"--shared-nghttp3",
"--with-intl", "system-icu",
])
cpp.make()
cpp.make_install()
on_build(build)
package("nodejs")