Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 libnginx-mod-js (0.9.9-1) unstable; urgency=medium
 .
   * New upstream version 0.9.9
     CVE-2026-8711: Heap buffer overflow in a worker process when the
     js_fetch_proxy directive value contains nginx variables derived from
     the client request and the location's JS handler invokes ngx.fetch().
     Closes: #1137215.
 .
   [ Miao Wang ]
   * Separate the build directory for the njs CLI tool, to prevent the
     compiled modules from being linked with the .a files of the CLI tool,
     which causes the njs JS engine fails to load.
Author: Jérémy Lal <kapouer@melix.org>
Bug-Debian: https://bugs.debian.org/1137215

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2026-05-25

--- libnginx-mod-js-0.9.9.orig/auto/quickjs
+++ libnginx-mod-js-0.9.9/auto/quickjs
@@ -10,11 +10,11 @@ NJS_QUICKJS_DEFAULT_INCS="src $NJS_BUILD
 if [ $NJS_TRY_QUICKJS = YES ]; then
     njs_found=no
 
-    njs_feature="QuickJS library -lquickjs.lto"
+    njs_feature="QuickJS library -l:libquickjs.lto.a"
     njs_feature_name=NJS_HAVE_QUICKJS
     njs_feature_run=yes
     njs_feature_incs="$NJS_QUICKJS_DEFAULT_INCS"
-    njs_feature_libs="-lquickjs.lto -lm -ldl -lpthread"
+    njs_feature_libs="-l:libquickjs.lto.a -lm -ldl -lpthread"
     njs_feature_test="#include <quickjs_compat.h>
 
                       int main() {
@@ -27,24 +27,24 @@ if [ $NJS_TRY_QUICKJS = YES ]; then
     . auto/feature
 
     if [ $njs_found = no ]; then
-        njs_feature="QuickJS library -lquickjs"
-        njs_feature_libs="-lquickjs -lm -ldl -lpthread"
+        njs_feature="QuickJS library -l:libquickjs.a"
+        njs_feature_libs="-l:libquickjs.a -lm -ldl -lpthread"
 
         . auto/feature
     fi
 
     if [ $njs_found = no ]; then
-        njs_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -lquickjs.lto"
+        njs_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -l:libquickjs.lto.a"
         njs_feature_incs="$NJS_QUICKJS_DEFAULT_INCS /usr/include/quickjs/"
-        njs_feature_libs="-L/usr/lib/quickjs/ -lquickjs.lto -lm -ldl -lpthread"
+        njs_feature_libs="-L/usr/lib/quickjs/ -l:libquickjs.lto.a -lm -ldl -lpthread"
 
         . auto/feature
     fi
 
     if [ $njs_found = no ]; then
-        njs_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -lquickjs"
+        njs_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -l:libquickjs.a"
         njs_feature_incs="$NJS_QUICKJS_DEFAULT_INCS /usr/include/quickjs/"
-        njs_feature_libs="-L/usr/lib/quickjs/ -lquickjs -lm -ldl -lpthread"
+        njs_feature_libs="-L/usr/lib/quickjs/ -l:libquickjs.a -lm -ldl -lpthread"
 
         . auto/feature
     fi
