From 30d39c8901165d9bdc6d75ecbeca0e5f919c2c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20de=20Celis=20Hern=C3=A1ndez?= Date: Tue, 13 Oct 2020 00:51:43 +0200 Subject: [PATCH] [rbdl] Add new port (#13884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add RBDL core support (without features) * Fix port version * Add supports field to CONTROL * Mark rbdl:x64-uwp as fail in the CI baseline * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * ⏰ Temporal removing of Supports field * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Revert "Mark rbdl:x64-uwp as fail in the CI baseline" This reverts commit 65a8100131f18e70ffccc5cfeb7a38c561099fd9. * Add Supports field * Update ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/rbdl/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Remove vcpkg_fail_port_install * Remove Supports field * Revert "Remove Supports field" This reverts commit b62ba898afea1c71f7484039b3c174585f9f53f3. * Revert "Remove vcpkg_fail_port_install" This reverts commit dd7aecaec64dc12c1105736331a36a7bd2b9b5d2. * Revert "Revert "Remove Supports field"" This reverts commit 0e1cd7aa92545d629a898fb0a21e171eb0004bc8. * Revert "Revert "Remove vcpkg_fail_port_install"" This reverts commit ae89760c296d3935fe9396907fab79b0c187964f. * Fix 001_x64_number_of_sections_exceeded_in_object_file_patch.diff * Remove vcpkg_fixup_cmake_targets * Disable manual handling for dynamic install target * ♻️ Clean code * Add 002_runtime_destination_for_not_static_build.diff patch * Revert "Add 002_runtime_destination_for_not_static_build.diff patch" This reverts commit 32a0cfa251b1fae9b0872f4e8f124ccce025dc9f. Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ...ections_exceeded_in_object_file_patch.diff | 15 +++++++++ ports/rbdl/CONTROL | 6 ++++ ports/rbdl/portfile.cmake | 32 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff create mode 100644 ports/rbdl/CONTROL create mode 100644 ports/rbdl/portfile.cmake diff --git a/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff b/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff new file mode 100644 index 0000000000..8aaf4d3843 --- /dev/null +++ b/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2db532da..42c004380 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -112,6 +112,10 @@ SET ( RBDL_SOURCES + src/Kinematics.cc + ) + ++IF (MSVC) ++ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") ++ENDIF (MSVC) ++ + IF (MSVC AND NOT RBDL_BUILD_STATIC) + MESSAGE (FATAL_ERROR, "Compiling RBDL as a DLL currently not supported. Please enable RBDL_BUILD_STATIC.") + ENDIF (MSVC AND NOT RBDL_BUILD_STATIC) diff --git a/ports/rbdl/CONTROL b/ports/rbdl/CONTROL new file mode 100644 index 0000000000..1a674323c5 --- /dev/null +++ b/ports/rbdl/CONTROL @@ -0,0 +1,6 @@ +Source: rbdl +Version: 2.6.0 +Port-Version: 0 +Homepage: https://github.com/rbdl/rbdl +Description: Rigid Body Dynamics Library +Build-Depends: eigen3 diff --git a/ports/rbdl/portfile.cmake b/ports/rbdl/portfile.cmake new file mode 100644 index 0000000000..adf580e6dc --- /dev/null +++ b/ports/rbdl/portfile.cmake @@ -0,0 +1,32 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(RBDL_STATIC ON) +else() + set(RBDL_STATIC OFF) +endif() + +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO rbdl/rbdl + REF v2.6.0 + SHA512 7b5fd03c0090277f295a28a1ff0542cd8cff76dda4379b3edc61ca3d868bf77d8b4882f81865fdffd0cf756c613fe55238b29a83bc163fc32aa94aa9d5781480 + HEAD_REF master + PATCHES 001_x64_number_of_sections_exceeded_in_object_file_patch.diff +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DRBDL_BUILD_STATIC=${RBDL_STATIC} +) + +vcpkg_install_cmake() + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# # Remove duplicated include directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs()