diff --git a/ports/pagmo2/0006-config-find-libipopt.patch b/ports/pagmo2/0006-config-find-libipopt.patch new file mode 100644 index 0000000000..91e69c70a7 --- /dev/null +++ b/ports/pagmo2/0006-config-find-libipopt.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 610f968..d4a0854 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -460,7 +460,7 @@ if(PAGMO_WITH_NLOPT) + set(_PAGMO_CONFIG_OPTIONAL_DEPS "${_PAGMO_CONFIG_OPTIONAL_DEPS}find_package(NLopt 2.6 REQUIRED NO_MODULE)\n") + endif() + if(PAGMO_WITH_IPOPT) +- set(_PAGMO_CONFIG_OPTIONAL_DEPS "${_PAGMO_CONFIG_OPTIONAL_DEPS}find_package(pagmo_IPOPT REQUIRED COMPONENTS header)\n") ++ set(_PAGMO_CONFIG_OPTIONAL_DEPS "${_PAGMO_CONFIG_OPTIONAL_DEPS}find_package(pagmo_IPOPT REQUIRED COMPONENTS header libipopt)\n") + endif() + + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pagmo-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/pagmo-config.cmake" @ONLY) diff --git a/ports/pagmo2/0007-ipopt-transitive-deps.patch b/ports/pagmo2/0007-ipopt-transitive-deps.patch new file mode 100644 index 0000000000..1d06913101 --- /dev/null +++ b/ports/pagmo2/0007-ipopt-transitive-deps.patch @@ -0,0 +1,13 @@ +diff --git a/cmake_modules/Findpagmo_IPOPT.cmake b/cmake_modules/Findpagmo_IPOPT.cmake +index 626c33a..46136bd 100644 +--- a/cmake_modules/Findpagmo_IPOPT.cmake ++++ b/cmake_modules/Findpagmo_IPOPT.cmake +@@ -53,5 +53,8 @@ if ("libipopt" IN_LIST pagmo_IPOPT_FIND_COMPONENTS) + message(STATUS "Path to libipopt: ${PAGMO_IPOPT_LIBRARY}") + add_library(pagmo::IPOPT::libipopt UNKNOWN IMPORTED) + set_target_properties(pagmo::IPOPT::libipopt PROPERTIES IMPORTED_LOCATION "${PAGMO_IPOPT_LIBRARY}") ++ find_package(LAPACK REQUIRED) ++ set_property(TARGET pagmo::IPOPT::libipopt APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES LAPACK::LAPACK ${CMAKE_DL_LIBS}) + endif() + endif() diff --git a/ports/pagmo2/0008-ipopt-header-search.patch b/ports/pagmo2/0008-ipopt-header-search.patch new file mode 100644 index 0000000000..a90498d441 --- /dev/null +++ b/ports/pagmo2/0008-ipopt-header-search.patch @@ -0,0 +1,15 @@ +diff --git a/include/pagmo/algorithms/ipopt.hpp b/include/pagmo/algorithms/ipopt.hpp +index 5fea524..d275cb0 100644 +--- a/include/pagmo/algorithms/ipopt.hpp ++++ b/include/pagmo/algorithms/ipopt.hpp +@@ -38,8 +38,8 @@ see https://www.gnu.org/licenses/. */ + #include + #include + +-#include +-#include ++#include ++#include + + #include + #include diff --git a/ports/pagmo2/portfile.cmake b/ports/pagmo2/portfile.cmake index f42be529e1..5cedc8c063 100644 --- a/ports/pagmo2/portfile.cmake +++ b/ports/pagmo2/portfile.cmake @@ -10,10 +10,14 @@ vcpkg_from_github( 0003-disable-werror.patch 0004-support-eigen3-5.patch 0005-avoid-stdext-checked-array-iterator.diff # ~= https://github.com/esa/pagmo2/commit/d4daedc9f865bf9e926946c21e62c4a4eebf353e + 0006-config-find-libipopt.patch + 0007-ipopt-transitive-deps.patch # coin-or-ipopt provides no cmake config + 0008-ipopt-header-search.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES + ipopt PAGMO_WITH_IPOPT nlopt PAGMO_WITH_NLOPT ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAGMO_BUILD_STATIC_LIBRARY) diff --git a/ports/pagmo2/vcpkg.json b/ports/pagmo2/vcpkg.json index 3e54517468..2076acfd91 100644 --- a/ports/pagmo2/vcpkg.json +++ b/ports/pagmo2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "pagmo2", "version": "2.19.1", - "port-version": 2, + "port-version": 3, "description": "A C++ platform to perform parallel computations of optimization tasks (global and local) via the asynchronous generalized island model.", "homepage": "https://esa.github.io/pagmo2/", "license": "GPL-3.0-or-later OR LGPL-3.0-or-later", @@ -23,6 +23,12 @@ } ], "features": { + "ipopt": { + "description": "Enable the Ipopt wrappers", + "dependencies": [ + "coin-or-ipopt" + ] + }, "nlopt": { "description": "Enable the NLopt wrappers", "dependencies": [ diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 3e06cab639..908687c0cd 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -995,6 +995,7 @@ osg[tools]:arm64-linux=combination-fails osg-qt:arm64-linux=cascade osgearth:arm64-linux=cascade osgearth[tools]:arm64-osx=feature-fails # Undefined _NSSearchPathForDirectoriesInDomains +pagmo2[ipopt](android | uwp)=cascade # coin-or-ipopt -> lapack (!android), coinutils (!uwp) pango[introspection]:arm64-windows=skip # needs arm64 host pangolin:arm64-linux=cascade pangolin[core,eigen,examples,ffmpeg,gui,jpeg,lz4,module,openexr,openni2,png,realsense,tiff,tools,vars,video,zstd]:x64-windows-static-md=combination-fails diff --git a/versions/baseline.json b/versions/baseline.json index 27a11c7912..4e5007818d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7702,7 +7702,7 @@ }, "pagmo2": { "baseline": "2.19.1", - "port-version": 2 + "port-version": 3 }, "paho-mqtt": { "baseline": "1.3.16", diff --git a/versions/p-/pagmo2.json b/versions/p-/pagmo2.json index e059bf8271..f052a5337d 100644 --- a/versions/p-/pagmo2.json +++ b/versions/p-/pagmo2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5a928918bc9a30e492e9b65795cb8cb18084da7b", + "version": "2.19.1", + "port-version": 3 + }, { "git-tree": "17bc4e5d8d8c28446f414b23555c22c615b3703a", "version": "2.19.1",