From e57b024ccb77aa8dc5a126167b2ea2b4a1d44801 Mon Sep 17 00:00:00 2001 From: Lily <47812810+LilyWangL@users.noreply.github.com> Date: Thu, 14 May 2020 07:35:00 +0800 Subject: [ompl] Fix patch apply error (#10972) * [ompl] Fix patch apply error * [ompl] Fix build error * [ompl] Add comments --- ports/ompl/CONTROL | 2 +- ports/ompl/fix-findeigen3.patch | 13 ------------- ports/ompl/portfile.cmake | 7 ++++++- 3 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 ports/ompl/fix-findeigen3.patch diff --git a/ports/ompl/CONTROL b/ports/ompl/CONTROL index 97867f6c3..8a60f34cd 100644 --- a/ports/ompl/CONTROL +++ b/ports/ompl/CONTROL @@ -1,5 +1,5 @@ Source: ompl -Version: 1.4.2-3 +Version: 1.4.2-4 Homepage: https://bitbucket.org/ompl Description: The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms Build-Depends: boost-dynamic-bitset, boost-filesystem, boost-graph, boost-odeint, boost-program-options, boost-serialization, boost-system, boost-test, boost-ublas, boost-timer, eigen3 diff --git a/ports/ompl/fix-findeigen3.patch b/ports/ompl/fix-findeigen3.patch deleted file mode 100644 index 137aacf20..000000000 --- a/ports/ompl/fix-findeigen3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fbde81b..c31c6ee 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,7 +110,7 @@ endif() - set_package_properties(Eigen3 PROPERTIES - URL "http://eigen.tuxfamily.org" - PURPOSE "A linear algebra library used throughout OMPL.") --find_package(Eigen3 REQUIRED) -+find_package(Eigen3 CONFIG REQUIRED) - include_directories("${EIGEN3_INCLUDE_DIR}") - - set_package_properties(MORSE PROPERTIES diff --git a/ports/ompl/portfile.cmake b/ports/ompl/portfile.cmake index 986afe2b6..074d2b852 100644 --- a/ports/ompl/portfile.cmake +++ b/ports/ompl/portfile.cmake @@ -19,8 +19,13 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${OMPL_VERSION} - PATCHES fix-findeigen3.patch ) + +#Due to there are URL before the change text, using patch modify this change failed, so use the following command instead of patch. +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) +string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 CONFIG REQUIRED)" _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3