Skip to content

Commit c1564ef

Browse files
committed
feat: attempt to fix mac bindings
1 parent 55c83d4 commit c1564ef

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

libvirt/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM node:18 as development
1+
FROM node:20-bookworm-slim AS development
22
# Install build tools
33
RUN apt-get update -y && apt-get install -y \
4-
python \
4+
python3 \
55
libvirt-dev \
66
jq
77

libvirt/binding.gyp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
],
1414
"include_dirs": [
1515
"<!@(node -p \"require('node-addon-api').include\")",
16-
"<!@(pkg-config --cflags-only-I libvirt 2>/dev/null || echo '-I/usr/include/libvirt -I/usr/local/include/libvirt'| sed 's/-I//g')",
1716
"."
1817
],
1918
"dependencies": [
@@ -24,7 +23,7 @@
2423
"xcode_settings": {
2524
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
2625
"CLANG_CXX_LIBRARY": "libc++",
27-
"MACOSX_DEPLOYMENT_TARGET": "<!(sw_vers -productVersion | cut -d. -f1,2)"
26+
"MACOSX_DEPLOYMENT_TARGET": "<!(command -v sw_vers >/dev/null && sw_vers -productVersion | cut -d. -f1,2 || echo '10.13')"
2827
},
2928
"msvs_settings": {
3029
"VCCLCompilerTool": { "ExceptionHandling": 1 }
@@ -38,12 +37,13 @@
3837
"defines": [ "NAPI_CPP_EXCEPTIONS" ]
3938
}],
4039
["OS!=\"mac\"", {
41-
"libraries": [
42-
"<!@(pkg-config --libs libvirt 2>/dev/null || echo '-L/usr/lib -L/usr/local/lib -lvirt')"
43-
],
4440
"include_dirs": [
45-
"/usr/include/libvirt",
46-
"/usr/local/include/libvirt"
41+
"<!@(pkg-config --cflags-only-I libvirt 2>/dev/null | sed 's/-I//g')",
42+
"/usr/include",
43+
"/usr/local/include"
44+
],
45+
"libraries": [
46+
"<!@(pkg-config --libs libvirt 2>/dev/null || echo '-lvirt')"
4747
]
4848
}]
4949
]

0 commit comments

Comments
 (0)