Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions generate/templates/templates/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"variables": {
"is_electron%": "<!(node ./utils/isBuildingForElectron.js <(node_root_dir))"
"is_electron%": "<!(node ./utils/isBuildingForElectron.js <(node_root_dir))",
"is_IBMi%": "<!(node ./utils/isBuildingForIBMi.js)"
},

"targets": [
Expand Down Expand Up @@ -153,19 +154,29 @@
}
],
[
"OS=='linux' or OS.endswith('bsd')", {
"OS=='linux' or OS.endswith('bsd') or <(is_IBMi) == 1", {
"cflags": [
"-std=c++11"
]
}
],
[
"OS.endswith('bsd') or (<(is_electron) == 1 and OS=='linux')", {
"OS.endswith('bsd') or (<(is_electron) == 1 and OS=='linux') or <(is_IBMi) == 1", {
"libraries": [
"-lcrypto",
"-lssl"
],
}
],
[
"<(is_IBMi) == 1", {
"include_dirs": [
"/QOpenSys/pkgs/include"
],
"libraries": [
"-L/QOpenSys/pkgs/lib"
]
}
]
]
}
Expand Down
4 changes: 4 additions & 0 deletions utils/isBuildingForIBMi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const os = require("os");
const isIBMi = (os.platform() == "aix" && os.type() == "OS400");

process.stdout.write(isIBMi ? "1" : "0");
17 changes: 14 additions & 3 deletions vendor/libgit2.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"openssl_enable_asm%": 0, # only supported with the Visual Studio 2012 (VC11) toolchain.
"gcc_version%": 0,
"is_electron%": "<!(node ../utils/isBuildingForElectron.js <(node_root_dir))",
"is_clang%": 0
"is_clang%": 0,
"is_IBMi%": "<!(node ../utils/isBuildingForIBMi.js)"
},
"targets": [
{
Expand Down Expand Up @@ -323,7 +324,7 @@
}
}
}],
["OS=='mac' or OS=='linux' or OS.endswith('bsd')", {
["OS=='mac' or OS=='linux' or OS.endswith('bsd') or <(is_IBMi) == 1", {
"defines": [
"GIT_SHA1_OPENSSL"
],
Expand All @@ -333,7 +334,7 @@
"libgit2/src/streams/tls.h"
]
}],
["OS=='linux' or OS.endswith('bsd')" , {
["OS=='linux' or OS.endswith('bsd') or <(is_IBMi) == 1", {
"cflags": [
"-DGIT_SSH",
"-DGIT_SSL",
Expand All @@ -344,6 +345,11 @@
"GIT_USE_STAT_MTIM"
]
}],
["<(is_IBMi) == 1", {
"include_dirs": [
"/QOpenSys/pkgs/include",
]
}],
["OS=='win'", {
"defines": [
"GIT_WINHTTP",
Expand Down Expand Up @@ -582,6 +588,11 @@
]
}
}],
["<(is_IBMi) == 1", {
"include_dirs": [
"/QOpenSys/pkgs/include"
]
}],
]
}
]
Expand Down