@port-labs/jq-node-bindings 1.0.5 → 1.0.6-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure +30 -4
- package/package.json +3 -3
package/configure
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Fail fast on any error so a broken build doesn't silently continue.
|
|
3
|
+
set -e
|
|
2
4
|
|
|
3
5
|
# autoconf, make, libtool, automake
|
|
4
6
|
scriptdir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
|
@@ -9,8 +11,24 @@ echo "building jq"
|
|
|
9
11
|
echo $scriptdir
|
|
10
12
|
|
|
11
13
|
autoreconf -fi
|
|
12
|
-
make distclean
|
|
13
|
-
|
|
14
|
+
# || true: make distclean fails on a fresh clone with no Makefile; that's fine.
|
|
15
|
+
make distclean || true
|
|
16
|
+
|
|
17
|
+
# gnu17: pin to C17 + GNU extensions to avoid C23's stricter function pointer
|
|
18
|
+
# type checking, which breaks jq's builtin.c (see jqlang/jq#3206).
|
|
19
|
+
CFLAGS="-fPIC -std=gnu17"
|
|
20
|
+
|
|
21
|
+
# -Wno-error=incompatible-function-pointer-types is Clang-specific; GCC uses a
|
|
22
|
+
# different warning name, so applying it unconditionally would cause an
|
|
23
|
+
# "unrecognized warning" error on GCC builds.
|
|
24
|
+
cc_version="$(${CC:-cc} --version 2>/dev/null || true)"
|
|
25
|
+
case "$cc_version" in
|
|
26
|
+
*clang*|*Clang*)
|
|
27
|
+
CFLAGS="${CFLAGS} -Wno-error=incompatible-function-pointer-types"
|
|
28
|
+
;;
|
|
29
|
+
esac
|
|
30
|
+
|
|
31
|
+
CPPFLAGS=-D_REENTRANT ./configure CFLAGS="${CFLAGS}" \
|
|
14
32
|
--disable-maintainer-mode \
|
|
15
33
|
--with-oniguruma=builtin \
|
|
16
34
|
--libdir="${scriptdir}/build/deps" \
|
|
@@ -20,8 +38,16 @@ make -j8
|
|
|
20
38
|
cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a
|
|
21
39
|
cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la
|
|
22
40
|
cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
|
|
42
|
+
# Copy shared Oniguruma artifacts for the current platform if present.
|
|
43
|
+
# - macOS: .dylib (e.g. libonig.5.dylib) — glob handles version bumps without hardcoding.
|
|
44
|
+
# - Linux: .so* (e.g. libonig.so.5, libonig.so.5.4.0) — Linux uses suffix versioning.
|
|
45
|
+
# The -f guard prevents cp from failing (and aborting via set -e) when a glob finds nothing.
|
|
46
|
+
for lib in modules/oniguruma/src/.libs/libonig*.dylib modules/oniguruma/src/.libs/libonig.so*; do
|
|
47
|
+
if [ -f "$lib" ]; then
|
|
48
|
+
cp "$lib" "${scriptdir}/build/deps/"
|
|
49
|
+
fi
|
|
50
|
+
done
|
|
25
51
|
|
|
26
52
|
make install-libLTLIBRARIES install-includeHEADERS
|
|
27
53
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@port-labs/jq-node-bindings",
|
|
3
|
-
"version": "v1.0.
|
|
3
|
+
"version": "v1.0.6-dev.0",
|
|
4
4
|
"description": "Node.js bindings for JQ",
|
|
5
|
-
"jq-node-bindings": "1.0.
|
|
5
|
+
"jq-node-bindings": "1.0.6-dev.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"configure": "node-gyp configure",
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=6.0.0"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|