diff --git a/ports/boost-json/b2-options.cmake b/ports/boost-json/b2-options.cmake new file mode 100644 index 0000000000..b05e7494f5 --- /dev/null +++ b/ports/boost-json/b2-options.cmake @@ -0,0 +1,3 @@ +if(APPLE) + list(APPEND B2_OPTIONS cxxstd=11) +endif() \ No newline at end of file diff --git a/ports/boost-json/portfile.cmake b/ports/boost-json/portfile.cmake index 8a91cd6cad..6dbc2ee531 100644 --- a/ports/boost-json/portfile.cmake +++ b/ports/boost-json/portfile.cmake @@ -8,5 +8,20 @@ vcpkg_from_github( HEAD_REF master ) +# see https://github.com/boostorg/json/issues/556 fore more details +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "\n /boost//container/off" "") + +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "import ../config/checks/config" "import build/config/checks/config") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-json requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-json/vcpkg.json b/ports/boost-json/vcpkg.json index c11c932920..0b36bbf832 100644 --- a/ports/boost-json/vcpkg.json +++ b/ports/boost-json/vcpkg.json @@ -1,14 +1,23 @@ { "name": "boost-json", "version-string": "1.75.0", + "port-version": 1, "description": "Boost json module", "homepage": "https://github.com/boostorg/json", "dependencies": [ "boost-align", "boost-assert", + { + "name": "boost-build", + "host": true + }, "boost-config", "boost-container", "boost-exception", + { + "name": "boost-modular-build-helper", + "host": true + }, "boost-system", "boost-throw-exception", "boost-utility", diff --git a/ports/boost-python/vcpkg.json b/ports/boost-python/vcpkg.json index ae32d8dd6c..8751ddd8e5 100644 --- a/ports/boost-python/vcpkg.json +++ b/ports/boost-python/vcpkg.json @@ -1,12 +1,16 @@ { "name": "boost-python", "version-string": "1.75.0", - "port-version": 2, + "port-version": 3, "description": "Boost python module", "homepage": "https://github.com/boostorg/python", "supports": "!uwp & !(arm & windows) & !emscripten", "dependencies": [ "boost-bind", + { + "name": "boost-build", + "host": true + }, "boost-compatibility", "boost-config", "boost-conversion", @@ -19,6 +23,10 @@ "boost-iterator", "boost-lexical-cast", "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, "boost-mpl", "boost-numeric-conversion", "boost-preprocessor", diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index 499a09dee6..f863d88110 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -28,9 +28,11 @@ else $port_versions = @{ #e.g. "asio" = 1; "asio" = 1; - "python" = 2; - "context" = 2; + "python" = 3; + "context" = 3; "concept-check" = 2; + "regex" = 2; + "json" = 1; } $per_port_data = @{ @@ -291,7 +293,13 @@ foreach ($library in $libraries) "Downloading boost/$library..." & $curl -L "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" --output "$scriptsDir/downloads/$library-boost-$version.tar.gz" } - $hash = & $vcpkg hash $archive + $hash = & $vcpkg --x-wait-for-lock hash $archive + # remove prefix "Waiting to take filesystem lock on /.vcpkg-root... " + if($hash -is [Object[]]) + { + $hash = $hash[1] + } + $unpacked = "$scriptsDir/libs/$library-boost-$version" if (!(Test-Path $unpacked)) { @@ -405,7 +413,7 @@ foreach ($library in $libraries) $deps += @("boost-vcpkg-helpers") $needsBuild = $false - if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse" -and $library -ne "graph_parallel") + if (((Test-Path $unpacked/build/Jamfile.v2) -or (Test-Path $unpacked/build/Jamfile)) -and $library -notmatch "(metaparse|graph_parallel|function_types)") { $deps += @( @{ name="boost-build"; host=$True }, diff --git a/scripts/boost/post-source-stubs/json.cmake b/scripts/boost/post-source-stubs/json.cmake new file mode 100644 index 0000000000..698c7060a3 --- /dev/null +++ b/scripts/boost/post-source-stubs/json.cmake @@ -0,0 +1,7 @@ +# see https://github.com/boostorg/json/issues/556 fore more details +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "\n /boost//container/off" "") + +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "import ../config/checks/config" "import build/config/checks/config") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") diff --git a/versions/b-/boost-json.json b/versions/b-/boost-json.json index 1ccd22535c..7b3ab3d307 100644 --- a/versions/b-/boost-json.json +++ b/versions/b-/boost-json.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cece09f870caaed77b754156a1f568ee05c9e653", + "version-string": "1.75.0", + "port-version": 1 + }, { "git-tree": "e32cc65f06f648018ea098e89fad7277ddacfb36", "version-string": "1.75.0", diff --git a/versions/b-/boost-python.json b/versions/b-/boost-python.json index 3c38321f5c..22f4660751 100644 --- a/versions/b-/boost-python.json +++ b/versions/b-/boost-python.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f5565087e1c90779cbe05bd19ba172a699ccc743", + "version-string": "1.75.0", + "port-version": 3 + }, { "git-tree": "5e3040e7a2eba3e7511a5509022f5445145dd67e", "version-string": "1.75.0", diff --git a/versions/baseline.json b/versions/baseline.json index 03f63b4bdf..d6ee10fef5 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -678,7 +678,7 @@ }, "boost-json": { "baseline": "1.75.0", - "port-version": 0 + "port-version": 1 }, "boost-lambda": { "baseline": "1.75.0", @@ -838,7 +838,7 @@ }, "boost-python": { "baseline": "1.75.0", - "port-version": 2 + "port-version": 3 }, "boost-qvm": { "baseline": "1.75.0",