From 6c0715cc662053d345cd6ab6b4f6a8324cb16186 Mon Sep 17 00:00:00 2001 From: Green Date: Fri, 22 Nov 2024 15:25:22 +0300 Subject: [PATCH] Fix build for linux --- Common/3dParty/apple/fetch.py | 11 ++++++++++- Common/3dParty/apple/module.version | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Common/3dParty/apple/module.version diff --git a/Common/3dParty/apple/fetch.py b/Common/3dParty/apple/fetch.py index 71e696edda..7bbf1a889b 100644 --- a/Common/3dParty/apple/fetch.py +++ b/Common/3dParty/apple/fetch.py @@ -13,7 +13,16 @@ #the linux code uses an implementation for c++ 17, so we just put this implementation if ("linux" == base.host_platform()): - base.replaceInFile("./mdds/include/mdds/global.hpp", "namespace mdds {", "namespace std { template using bool_constant = integral_constant; }\n\nnamespace mdds {") + linux_cpp_version = "#if __cplusplus < 201402L\n" + linux_cpp_version += "namespace std {\n" + linux_cpp_version += " template\n" + linux_cpp_version += " using bool_constant = integral_constant;\n\n" + linux_cpp_version += " template \n" + linux_cpp_version += " using void_t = void;\n" + linux_cpp_version += "}\n #endif\n\n" + linux_cpp_version += "namespace mdds {" + + base.replaceInFile("./mdds/include/mdds/global.hpp", "namespace mdds {", linux_cpp_version) if not base.is_dir("librevenge"): base.cmd("git", ["clone", "https://github.com/Distrotech/librevenge.git"]) diff --git a/Common/3dParty/apple/module.version b/Common/3dParty/apple/module.version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/Common/3dParty/apple/module.version @@ -0,0 +1 @@ +2 \ No newline at end of file