summaryrefslogtreecommitdiffstats
path: root/debian/nodejs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 20:56:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 20:56:20 +0000
commit868522aa377a4519adb0b9f402586ab7a41b86ba (patch)
tree44e805e154a3ace9bd8dbac73843e80d296b7814 /debian/nodejs
parentAdding upstream version 5.28.2+dfsg1+~cs23.11.12.3. (diff)
downloadnode-undici-868522aa377a4519adb0b9f402586ab7a41b86ba.tar.xz
node-undici-868522aa377a4519adb0b9f402586ab7a41b86ba.zip
Adding debian version 5.28.2+dfsg1+~cs23.11.12.3-6.debian/5.28.2+dfsg1+_cs23.11.12.3-6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/nodejs')
-rw-r--r--debian/nodejs/additional_components1
-rw-r--r--debian/nodejs/build23
-rw-r--r--debian/nodejs/component_links3
-rw-r--r--debian/nodejs/extlinks3
-rw-r--r--debian/nodejs/links1
-rw-r--r--debian/nodejs/llhttp/build10
-rw-r--r--debian/nodejs/llparse-builder/build1
-rw-r--r--debian/nodejs/llparse-frontend/build1
-rw-r--r--debian/nodejs/llparse/build1
-rw-r--r--debian/nodejs/root_modules1
10 files changed, 45 insertions, 0 deletions
diff --git a/debian/nodejs/additional_components b/debian/nodejs/additional_components
new file mode 100644
index 0000000..64dba6c
--- /dev/null
+++ b/debian/nodejs/additional_components
@@ -0,0 +1 @@
+types
diff --git a/debian/nodejs/build b/debian/nodejs/build
new file mode 100644
index 0000000..ddf238b
--- /dev/null
+++ b/debian/nodejs/build
@@ -0,0 +1,23 @@
+node scripts/generate-undici-types-package-json.js
+mkdir -p deps/llhttp/include deps/llhttp/src
+cp llhttp/build/c/llhttp.c deps/llhttp/src/
+cp llhttp/src/native/*.c deps/llhttp/src/
+cp llhttp/build/llhttp.h deps/llhttp/include/
+
+# Reproduce this build without Node.js dependency:
+# - original build
+#WASI_ROOT=/usr CLANG=/usr/bin/clang node build/wasm.js
+# - direct clang call
+clang -nodefaultlibs --sysroot=/usr -target wasm32-unknown-wasi \
+ -Ofast -fno-exceptions -fvisibility=hidden \
+ -mexec-model=reactor -Wl,-lc -Wl,--error-limit=0 -Wl,-O3 \
+ -Wl,--lto-O3 -Wl,--strip-all -Wl,--allow-undefined \
+ -Wl,--export-dynamic -Wl,--export-table -Wl,--export=malloc \
+ -Wl,--export=free \
+ deps/llhttp/src/*.c \
+ -Ideps/llhttp/include \
+ -o lib/llhttp/llhttp-wasm
+echo 'module.exports = "'`perl -MMIME::Base64 -000 -ne 'print encode_base64($_,"")' lib/llhttp/llhttp-wasm`'";' > lib/llhttp/llhttp-wasm.js
+
+# Build bundle
+esbuild index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names
diff --git a/debian/nodejs/component_links b/debian/nodejs/component_links
new file mode 100644
index 0000000..c83b273
--- /dev/null
+++ b/debian/nodejs/component_links
@@ -0,0 +1,3 @@
+llparse-builder llparse-frontend
+llparse-frontend llparse
+llparse llhttp
diff --git a/debian/nodejs/extlinks b/debian/nodejs/extlinks
new file mode 100644
index 0000000..41be869
--- /dev/null
+++ b/debian/nodejs/extlinks
@@ -0,0 +1,3 @@
+@types/debug
+@types/node
+@types/semver
diff --git a/debian/nodejs/links b/debian/nodejs/links
new file mode 100644
index 0000000..ef54dea
--- /dev/null
+++ b/debian/nodejs/links
@@ -0,0 +1 @@
+undici-types undici/types
diff --git a/debian/nodejs/llhttp/build b/debian/nodejs/llhttp/build
new file mode 100644
index 0000000..d886f85
--- /dev/null
+++ b/debian/nodejs/llhttp/build
@@ -0,0 +1,10 @@
+ts-node bin/generate.ts
+tsc
+export RELEASE=`pkgjs-pjson . version`
+WASI_ROOT=/usr ts-node bin/build_wasm.ts
+export CFLAGS="$CFLAGS -gdwarf-4"
+export LDFLAGS="$LDFLAGS"
+make release build/libllhttp.a build/libllhttp.so
+(cd ..;dh_auto_configure --buildsystem=cmake -Dllhttp/release -- -DCMAKE_BUILD_TYPE=Release)
+(cd ..;dh_auto_build --buildsystem=cmake)
+find . -type f
diff --git a/debian/nodejs/llparse-builder/build b/debian/nodejs/llparse-builder/build
new file mode 100644
index 0000000..0a87593
--- /dev/null
+++ b/debian/nodejs/llparse-builder/build
@@ -0,0 +1 @@
+tsc
diff --git a/debian/nodejs/llparse-frontend/build b/debian/nodejs/llparse-frontend/build
new file mode 100644
index 0000000..0a87593
--- /dev/null
+++ b/debian/nodejs/llparse-frontend/build
@@ -0,0 +1 @@
+tsc
diff --git a/debian/nodejs/llparse/build b/debian/nodejs/llparse/build
new file mode 100644
index 0000000..0a87593
--- /dev/null
+++ b/debian/nodejs/llparse/build
@@ -0,0 +1 @@
+tsc
diff --git a/debian/nodejs/root_modules b/debian/nodejs/root_modules
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/debian/nodejs/root_modules
@@ -0,0 +1 @@
+*