From 5033b3e2e8c9235bc867ca09b68e8958e27dcaab Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Thu, 7 Oct 2021 01:54:21 +0200 Subject: Fix compilation on Emscripten / WebAssembly (#20551) --- .../boost-config/fix-emscripten-compilation.patch | 31 ++++++++++++++++++++++ ports/boost-config/portfile.cmake | 2 ++ ports/boost-config/vcpkg.json | 1 + versions/b-/boost-config.json | 5 ++++ versions/baseline.json | 2 +- 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 ports/boost-config/fix-emscripten-compilation.patch diff --git a/ports/boost-config/fix-emscripten-compilation.patch b/ports/boost-config/fix-emscripten-compilation.patch new file mode 100644 index 000000000..f85fa3c47 --- /dev/null +++ b/ports/boost-config/fix-emscripten-compilation.patch @@ -0,0 +1,31 @@ +From 85292621ece3409a80929add91c971400ba724f3 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 10 Sep 2021 11:36:29 +0100 +Subject: [PATCH] Add emscripten testing and support. (#403) + +* Tentatively add emscripten testing and support. +Fixes https://github.com/boostorg/config/issues/402. +--- + include/boost/config/platform/wasm.hpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/include/boost/config/platform/wasm.hpp b/include/boost/config/platform/wasm.hpp +index c307812d..682b8485 100644 +--- a/include/boost/config/platform/wasm.hpp ++++ b/include/boost/config/platform/wasm.hpp +@@ -9,6 +9,12 @@ + + #define BOOST_PLATFORM "Wasm" + ++#ifdef __has_include ++#if __has_include() ++# define BOOST_HAS_UNISTD_H ++#endif ++#endif ++ + // boilerplate code: + #include + // +-- +2.21.1 (Apple Git-122.3) + diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake index 3576a717b..2fdbf5504 100644 --- a/ports/boost-config/portfile.cmake +++ b/ports/boost-config/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF boost-1.77.0 SHA512 c6df16825b7bb27412667e00b6b6cdecbf56ee0707aa1df3505637c7de5c39c87335fabd7cd4361b29625d71c7664e6af865fc271ad0b3e70cc8872825f6155e HEAD_REF master + PATCHES + fix-emscripten-compilation.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-config/vcpkg.json b/ports/boost-config/vcpkg.json index d8e52641d..fd0c8713a 100644 --- a/ports/boost-config/vcpkg.json +++ b/ports/boost-config/vcpkg.json @@ -1,6 +1,7 @@ { "name": "boost-config", "version": "1.77.0", + "port-version": 1, "description": "Boost config module", "homepage": "https://github.com/boostorg/config", "dependencies": [ diff --git a/versions/b-/boost-config.json b/versions/b-/boost-config.json index 6e93f18fe..920bf1188 100644 --- a/versions/b-/boost-config.json +++ b/versions/b-/boost-config.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6aa6932068c1fbc812d545502f60c3a7cef80dde", + "version": "1.77.0", + "port-version": 1 + }, { "git-tree": "2a93a4c962b961f617c133389c18a994e3c27af1", "version": "1.77.0", diff --git a/versions/baseline.json b/versions/baseline.json index 88db34974..b47f7e924 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -582,7 +582,7 @@ }, "boost-config": { "baseline": "1.77.0", - "port-version": 0 + "port-version": 1 }, "boost-container": { "baseline": "1.77.0", -- cgit v1.2.3