Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[boost-math] Fix build on x64-linux-dynamic, add feature legacy #38728

Merged
merged 11 commits into from
May 30, 2024
3 changes: 0 additions & 3 deletions ports/autodock-vina/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(CMAKE_CXX_STANDARD 11)
find_package(Boost REQUIRED COMPONENTS
filesystem
log
math_tr1
program_options
random
serialization
Expand Down Expand Up @@ -63,7 +62,6 @@ target_link_libraries(vina
Boost::boost
Boost::filesystem
Boost::log
Boost::math_tr1
Boost::program_options
Boost::random
Boost::serialization
Expand All @@ -76,7 +74,6 @@ target_link_libraries(vina_split
Boost::boost
Boost::filesystem
Boost::log
Boost::math_tr1
Boost::program_options
Boost::random
Boost::serialization
Expand Down
2 changes: 1 addition & 1 deletion ports/autodock-vina/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "autodock-vina",
"version-semver": "1.2.5",
"port-version": 2,
"port-version": 3,
"description": "AutoDock Vina is one of the fastest and most widely used open-source docking engines.",
"homepage": "http://vina.scripps.edu/",
"dependencies": [
Expand Down
8 changes: 6 additions & 2 deletions ports/boost-math/build-old-libs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e7790271c..cd08a77e4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,104 @@ else()
@@ -41,6 +41,108 @@ else()

endif()

+option(BOOST_MATH_BUILD_WITH_C99_AND_TR1_FUNCTIONS "" OFF)
+if(BOOST_MATH_BUILD_WITH_C99_AND_TR1_FUNCTIONS)
+include(CheckCXXSourceCompiles)
+set(CMAKE_REQUIRED_LIBRARIES Boost::config)
+set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include")
Expand Down Expand Up @@ -80,9 +82,11 @@ index 7e7790271c..cd08a77e4a 100644
+
+foreach(type IN LISTS types)
+ add_library(boost_math_tr1${type} ${TR1_SOURCES${type}})
+ target_link_libraries(boost_math_tr1${type} PUBLIC Boost::config)
+ target_include_directories(boost_math_tr1${type} PRIVATE src/tr1)
+ target_include_directories(boost_math_tr1${type} PRIVATE include)
+ add_library(boost_math_c99${type} ${C99_SOURCES${type}})
+ target_link_libraries(boost_math_c99${type} PUBLIC Boost::config)
+ target_include_directories(boost_math_c99${type} PRIVATE src/tr1)
+ target_include_directories(boost_math_c99${type} PRIVATE include)
+ if(BUILD_SHARED_LIBS)
Expand All @@ -102,7 +106,7 @@ index 7e7790271c..cd08a77e4a 100644
+ boost_install_target(TARGET boost_math_tr1${type} VERSION ${BOOST_SUPERPROJECT_VERSION})
+ boost_install_target(TARGET boost_math_c99${type} VERSION ${BOOST_SUPERPROJECT_VERSION})
+endforeach()
+
+endif()
+
# Only enable tests when we're the root project
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
Expand Down
10 changes: 10 additions & 0 deletions ports/boost-math/features.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
vcpkg_check_features(
OUT_FEATURE_OPTIONS
FEATURE_OPTIONS
FEATURES
"c99-tr1" BOOST_MATH_BUILD_WITH_C99_AND_TR1_FUNCTIONS
)

if(NOT BOOST_MATH_BUILD_WITH_C99_AND_TR1_FUNCTIONS)
set(Z_VCPKG_BOOST_FORCE_HEADER_ONLY ON)
endif()
1 change: 1 addition & 0 deletions ports/boost-math/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vcpkg_from_github(
)

set(FEATURE_OPTIONS "")
include("${CMAKE_CURRENT_LIST_DIR}/features.cmake")
boost_configure_and_install(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
Expand Down
8 changes: 7 additions & 1 deletion ports/boost-math/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost-math",
"version": "1.85.0",
"port-version": 1,
"description": "Boost math module",
"homepage": "https://github.com/boostorg/math",
Osyotr marked this conversation as resolved.
Show resolved Hide resolved
"license": "BSL-1.0",
Expand Down Expand Up @@ -55,5 +56,10 @@
"name": "boost-throw-exception",
"version>=": "1.85.0"
}
]
],
"features": {
"c99-tr1": {
"description": "Build with C99 and TR1 Functions"
}
Osyotr marked this conversation as resolved.
Show resolved Hide resolved
}
}
9 changes: 7 additions & 2 deletions ports/cctag/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cctag",
"version-semver": "1.0.2",
"port-version": 6,
"port-version": 7,
"maintainers": "alicevision-team@googlegroups.com",
"description": "Computer vision library for detecting CCTag markers made up of concentric circles",
"homepage": "https://github.com/alicevision/CCTag",
Expand All @@ -18,7 +18,12 @@
"boost-foreach",
"boost-iterator",
"boost-lexical-cast",
"boost-math",
{
"name": "boost-math",
"features": [
"c99-tr1"
]
},
"boost-mpl",
"boost-multi-array",
"boost-program-options",
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-boost/boost-install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function(boost_configure_and_install)
set(boost_lib_name_config "${boost_lib_name}")

set(headers_only OFF)
if(NOT EXISTS "${arg_SOURCE_PATH}/src") # regex|system|math are header only and only install libs due to compat
if(NOT EXISTS "${arg_SOURCE_PATH}/src" OR Z_VCPKG_BOOST_FORCE_HEADER_ONLY) # regex|system|math are header only and only install libs due to compat
set(headers_only ON)
set(VCPKG_BUILD_TYPE release)
endif()
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-boost/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vcpkg-boost",
"version-date": "2024-04-25",
"version-date": "2024-05-15",
"license": "MIT"
}
8 changes: 8 additions & 0 deletions scripts/boost/generate-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1")
# Clear this array when moving to a new boost version
$defaultPortVersion = 0
$portVersions = @{
"boost-math" = 1
}

function Get-PortVersion {
Expand Down Expand Up @@ -107,6 +108,13 @@ $portData = @{
}
}
};
"boost-math" = @{
"features" = @{
"c99-tr1" = @{
"description" = "Build with C99 and TR1 Functions";
}
}
};
"boost-mpi" = @{
"dependencies" = @("mpi");
"supports" = "!uwp";
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/autodock-vina.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "17529fd4b800ef3453f99cf2607e64fea59f6481",
"version-semver": "1.2.5",
"port-version": 3
},
{
"git-tree": "0a1f8b9271d163893c7bcb8f7097e38be9888519",
"version-semver": "1.2.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boost-math.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fa259456b260e7f3340572f68d5c7c83d89b7943",
"version": "1.85.0",
"port-version": 1
},
{
"git-tree": "d20af189e049131ea08bd503537374afa4d70062",
"version": "1.85.0",
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
},
"autodock-vina": {
"baseline": "1.2.5",
"port-version": 2
"port-version": 3
},
"avcpp": {
"baseline": "2.3.0",
Expand Down Expand Up @@ -1022,7 +1022,7 @@
},
"boost-math": {
"baseline": "1.85.0",
"port-version": 0
"port-version": 1
},
"boost-metaparse": {
"baseline": "1.85.0",
Expand Down Expand Up @@ -1526,7 +1526,7 @@
},
"cctag": {
"baseline": "1.0.2",
"port-version": 6
"port-version": 7
},
"cctz": {
"baseline": "2.4",
Expand Down Expand Up @@ -9053,7 +9053,7 @@
"port-version": 0
},
"vcpkg-boost": {
"baseline": "2024-04-25",
"baseline": "2024-05-15",
"port-version": 0
},
"vcpkg-cmake": {
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cctag.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "64ae4138fa7e9f789578d016bda969771021e8b3",
"version-semver": "1.0.2",
"port-version": 7
},
{
"git-tree": "56e88632d9e1fd1d826e9486e66533cb8baddef8",
"version-semver": "1.0.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-boost.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "aca8ab6ec76d120c4482a629de23cad5ad7e4643",
"version-date": "2024-05-15",
"port-version": 0
},
{
"git-tree": "885223b657578128c0556fe6b53cfec8cbf50e12",
"version-date": "2024-04-25",
Expand Down
Loading