From 140ddf37cdcc63d0b6cd32378c6e0323c73a58d1 Mon Sep 17 00:00:00 2001 From: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Date: Tue, 7 Jan 2020 03:00:01 +0800 Subject: [PATCH] [box2d] Update to 2019-12-31 (#9529) * [box2d] Update to 2019-12-31 * Udpate ci baseline file * Update ci baseline file --- ports/box2d/CMakeLists.txt | 21 ------------------- ports/box2d/CONTROL | 2 +- ports/box2d/export-targets.patch | 36 ++++++++++++++++++++++++++++++++ ports/box2d/portfile.cmake | 24 ++++++++++----------- scripts/ci.baseline.txt | 2 ++ 5 files changed, 50 insertions(+), 35 deletions(-) delete mode 100644 ports/box2d/CMakeLists.txt create mode 100644 ports/box2d/export-targets.patch diff --git a/ports/box2d/CMakeLists.txt b/ports/box2d/CMakeLists.txt deleted file mode 100644 index 95155426669..00000000000 --- a/ports/box2d/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(Box2d CXX) - -file(GLOB_RECURSE SOURCES Box2D/Box2D/*.cpp) - -add_library(Box2D ${SOURCES}) -target_include_directories(Box2D PUBLIC $ $) - -install(TARGETS Box2D - EXPORT unofficial-box2d-targets - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) - -install( - EXPORT unofficial-box2d-targets - FILE unofficial-box2d-config.cmake - NAMESPACE unofficial::box2d:: - DESTINATION share/unofficial-box2d -) diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL index 98f6e2cbd5c..a7e4b7f1cee 100644 --- a/ports/box2d/CONTROL +++ b/ports/box2d/CONTROL @@ -1,4 +1,4 @@ Source: box2d -Version: 2.3.1-374664b-2 +Version: 2019-12-31 Description: An open source C++ engine for simulating rigid bodies in 2D. Homepage: https://box2d.org diff --git a/ports/box2d/export-targets.patch b/ports/box2d/export-targets.patch new file mode 100644 index 00000000000..636f1086b01 --- /dev/null +++ b/ports/box2d/export-targets.patch @@ -0,0 +1,36 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6ef515f..6975f91 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -95,8 +95,8 @@ set(BOX2D_HEADER_FILES + ../include/box2d/b2_world_callbacks.h + ../include/box2d/box2d.h) + +-add_library(box2d STATIC ${BOX2D_SOURCE_FILES} ${BOX2D_HEADER_FILES}) +-target_include_directories(box2d PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include) ++add_library(box2d STATIC ${BOX2D_SOURCE_FILES}) ++target_include_directories(box2d PUBLIC $ $) + target_include_directories(box2d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(box2d PROPERTIES + CXX_STANDARD 11 +@@ -104,5 +104,18 @@ set_target_properties(box2d PROPERTIES + CXX_EXTENSIONS NO + ) + +-source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES ${BOX2D_SOURCE_FILES}) +-source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" PREFIX "include" FILES ${BOX2D_HEADER_FILES}) ++install(FILES ${BOX2D_HEADER_FILES} DESTINATION include/box2d) ++ ++install(TARGETS box2d ++ EXPORT unofficial-box2d-targets ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++ ++install( ++ EXPORT unofficial-box2d-targets ++ FILE unofficial-box2d-config.cmake ++ NAMESPACE unofficial::box2d:: ++ DESTINATION share/unofficial-box2d ++) diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 24da7f14395..c930f41b9b4 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -1,32 +1,30 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO erincatto/Box2D - REF 374664b2a4ce2e7c24fbad6e1ed34bebcc9ab6bc - SHA512 39074bab01b36104aa685bfe39b40eb903d9dfb54cc3ba8098125db5291f55a8a9e578fc59563b2e8743abbbb26f419be7ae1524e235e7bd759257f99ff96bda + REF 37e2dc25f8da158abda10324d75cb4d1db009adf + SHA512 c9021b6bbc8ee405e38418bdadc136814fb66d5f4928ffd06d2ed016751613ecc3e82e7f60851fdc7a2e13594f68c21e7b7adb06d35a5a02314235132556d174 HEAD_REF master + PATCHES + export-targets.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file( - COPY ${SOURCE_PATH}/Box2D/Box2D - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN "*.h" -) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/Box2D/License.txt ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index d40cdb2284e..eb2e2a74a90 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -170,6 +170,8 @@ boost-wave:x64-uwp=fail botan:arm64-windows=fail botan:arm-uwp=fail botan:x64-uwp=fail +box2d:x64-uwp=fail +box2d:arm-uwp=fail breakpad:arm64-windows=fail breakpad:x64-osx=fail brotli:arm-uwp=fail