From 3410e050b753750424775addfe3a6792df42319a Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 07:54:09 +0000 Subject: [PATCH 1/6] [v-hacd] Update version to v4.1.0 --- ports/v-hacd/CMakeLists.txt | 19 ----- ports/v-hacd/fix-cmake.patch | 140 ----------------------------------- ports/v-hacd/portfile.cmake | 39 +--------- ports/v-hacd/vcpkg.json | 3 +- 4 files changed, 5 insertions(+), 196 deletions(-) delete mode 100644 ports/v-hacd/CMakeLists.txt delete mode 100644 ports/v-hacd/fix-cmake.patch diff --git a/ports/v-hacd/CMakeLists.txt b/ports/v-hacd/CMakeLists.txt deleted file mode 100644 index f4451ecaa89c29..00000000000000 --- a/ports/v-hacd/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR) - -project(VHACD) - -# Determine if VHACD is built as a subproject (using add_subdirectory) -# or if it is the master project. -set(MASTER_PROJECT OFF) -if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) - set(MASTER_PROJECT ON) - message(STATUS "CMake version: ${CMAKE_VERSION}") -endif () - -option(NO_OPENCL "NO_OPENCL" OFF) -option(NO_OPENMP "NO_OPENMP" OFF) - -message("NO_OPENCL " ${NO_OPENCL}) -message("NO_OPENMP " ${NO_OPENMP}) - -add_subdirectory(src) \ No newline at end of file diff --git a/ports/v-hacd/fix-cmake.patch b/ports/v-hacd/fix-cmake.patch deleted file mode 100644 index 46c53da114ceab..00000000000000 --- a/ports/v-hacd/fix-cmake.patch +++ /dev/null @@ -1,140 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 2bbb283..2f7eb52 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1,12 +1 @@ --cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) --project(VHACD) --option(NO_OPENCL "NO_OPENCL" OFF) --option(NO_OPENMP "NO_OPENMP" OFF) -- --message("NO_OPENCL " ${NO_OPENCL}) --message("NO_OPENMP " ${NO_OPENMP}) -- --#set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/output" CACHE PATH "project install prefix" FORCE) --set(CMAKE_COMMON_INC "${CMAKE_SOURCE_DIR}/../scripts/cmake_common.cmake") --add_subdirectory ("${CMAKE_SOURCE_DIR}/VHACD_Lib") --add_subdirectory ("${CMAKE_SOURCE_DIR}/test") -+add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR}/VHACD_Lib") -\ No newline at end of file -diff --git a/src/VHACD_Lib/CMakeLists.txt b/src/VHACD_Lib/CMakeLists.txt -index 46fc1b1..2260fdc 100644 ---- a/src/VHACD_Lib/CMakeLists.txt -+++ b/src/VHACD_Lib/CMakeLists.txt -@@ -1,77 +1,79 @@ -+cmake_minimum_required(VERSION 3.10.0) -+ - project(VHACD_LIB CXX C) --include(${CMAKE_COMMON_INC}) -+include("${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/cmake_common.cmake") -+ -+set(CMAKE_CXX_STANDARD 11) - --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -+set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") -+message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) -+add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) - - if (NOT NO_OPENCL) - #include(FindOpenCL OPTIONAL) -- find_package(OpenCL) -+ find_package(OpenCL REQUIRED) - endif() - if (NOT NO_OPENMP) - #include(FindOpenMP OPTIONAL) -- find_package(OpenMP) -+ find_package(OpenMP REQUIRED) - endif() - if(OPENMP_FOUND) -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") -- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") -+ target_link_libraries(vhacd PRIVATE OpenMP::OpenMP_CXX) - endif() --set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") --message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) --add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) - - if (OpenCL_FOUND) -- target_include_directories(vhacd PRIVATE "${OpenCL_INCLUDE_DIR}") -- target_link_libraries(vhacd PRIVATE "${OpenCL_LIBRARY}") -+ target_link_libraries(vhacd PRIVATE OpenCL::OpenCL) - target_compile_definitions(vhacd PRIVATE -DOPENCL_FOUND=1 ) - target_compile_definitions(vhacd PRIVATE -DOPENCL_CL_FILES="${PROJECT_CL_FILES}" ) - endif() - -- - target_include_directories(vhacd PUBLIC -+ $ -+ $) -+ -+target_include_directories(vhacd PRIVATE - $ -- $ # /include/mylib - ) - - - message("[VHACD] \t -> CMAKE_INSTALL_PREFIX " ${CMAKE_INSTALL_PREFIX}) - install(TARGETS vhacd EXPORT vhacd-targets DESTINATION lib) --install(FILES ${PROJECT_INC_FILES} DESTINATION include) --install(FILES ${PROJECT_INL_FILES} DESTINATION include) -+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/public/VHACD.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/) -+ - - - set(VHACD_LIB_VERSION 3.2.0) - include(CMakePackageConfigHelpers) - write_basic_package_version_file( -- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" - VERSION ${VHACD_LIB_VERSION} - COMPATIBILITY AnyNewerVersion - ) - --export(EXPORT vhacd-targets NAMESPACE :: -- FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-targets.cmake" -+export(EXPORT vhacd-targets NAMESPACE vhacd:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-targets.cmake" - ) - - configure_file(cmake/vhacd-config.cmake -- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" - COPYONLY - ) - - set(ConfigPackageLocation lib/cmake/vhacd) - install(EXPORT vhacd-targets - FILE -- vhacd-targets.cmake -+ v-hacd-targets.cmake - DESTINATION - ${ConfigPackageLocation} -- NAMESPACE :: -+ NAMESPACE vhacd:: - ) - install( - FILES -- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" - DESTINATION - ${ConfigPackageLocation} - COMPONENT - Devel - ) - - -diff --git a/src/VHACD_Lib/cmake/vhacd-config.cmake b/src/VHACD_Lib/cmake/vhacd-config.cmake -index 8fc5c58..7677f58 100644 ---- a/src/VHACD_Lib/cmake/vhacd-config.cmake -+++ b/src/VHACD_Lib/cmake/vhacd-config.cmake -@@ -1,4 +1,4 @@ - - find_package(OpenCL) - find_package(OpenMP) --include("${CMAKE_CURRENT_LIST_DIR}/vhacd-targets.cmake") -\ No newline at end of file -+include("${CMAKE_CURRENT_LIST_DIR}/v-hacd-targets.cmake") -\ No newline at end of file diff --git a/ports/v-hacd/portfile.cmake b/ports/v-hacd/portfile.cmake index c22697eba643ca..de7f2d247829c4 100644 --- a/ports/v-hacd/portfile.cmake +++ b/ports/v-hacd/portfile.cmake @@ -1,43 +1,12 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(VCPKG_BUILD_TYPE release) # Header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kmammou/v-hacd - REF 1a49edf29c69039df15286181f2f27e17ceb9aef - SHA512 14157e5fd9cbfeb44735dc2952d7b4f43337ea2243f3b690125dda27e3bb8328cc38050415c7150cf11fbd85c5258c3aaa8899f306ce118f78a4d5e6139ef0f0 + REF "v${VERSION}" + SHA512 b974c490897a1901d6975c75222a167a70f9e2a37e0c548aeb6a346cb0154ec1415947d47d69a729c0c4d9345aed70d3c09d4bf297beacfae66ceb4c8c89c6d0 HEAD_REF master - PATCHES - fix-cmake.patch ) -file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(LIB_TYPE "SHARED") -else() - set(LIB_TYPE "STATIC") -endif() - -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES - openmp NO_OPENMP - opencl NO_OPENCL -) - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - ${FEATURE_OPTIONS} - -DLIB_TYPE=${LIB_TYPE} -) - -vcpkg_cmake_install() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/vhacd) - -vcpkg_copy_pdbs() - -# Handle copyright +file(INSTALL "${SOURCE_PATH}/include/VHACD.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/v-hacd/vcpkg.json b/ports/v-hacd/vcpkg.json index 0cd67b71ae0a7e..885f708cd7a63a 100644 --- a/ports/v-hacd/vcpkg.json +++ b/ports/v-hacd/vcpkg.json @@ -1,7 +1,6 @@ { "name": "v-hacd", - "version": "3.2.0", - "port-version": 4, + "version": "4.1.0", "description": "The V-HACD library decomposes a 3D surface into a set of \"near\" convex parts.", "homepage": "https://github.com/kmammou/v-hacd", "supports": "!arm", From 07aae538ab83ea68181ec580a4b88b631e8ed36e Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 07:54:26 +0000 Subject: [PATCH 2/6] version --- versions/baseline.json | 4 ++-- versions/v-/v-hacd.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index fd13fea6c4b5a1..1d90493625de6c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9325,8 +9325,8 @@ "port-version": 0 }, "v-hacd": { - "baseline": "3.2.0", - "port-version": 4 + "baseline": "4.1.0", + "port-version": 0 }, "v8": { "baseline": "9.1.269.39", diff --git a/versions/v-/v-hacd.json b/versions/v-/v-hacd.json index 01d673b6010953..f79da6d499b062 100644 --- a/versions/v-/v-hacd.json +++ b/versions/v-/v-hacd.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "97e1d13ceebcfc3bf13d278496c02a026fc161bd", + "version": "4.1.0", + "port-version": 0 + }, { "git-tree": "a4b4d85577f6e6e7cbcfa0257cdc5f51775e3e47", "version": "3.2.0", From 20984707f4a4436d6f7a5276dcd50bfb300a440d Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 08:09:36 +0000 Subject: [PATCH 3/6] remove feature --- ports/v-hacd/portfile.cmake | 2 +- ports/v-hacd/vcpkg.json | 23 +---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/ports/v-hacd/portfile.cmake b/ports/v-hacd/portfile.cmake index de7f2d247829c4..5c5afd2cb227e4 100644 --- a/ports/v-hacd/portfile.cmake +++ b/ports/v-hacd/portfile.cmake @@ -9,4 +9,4 @@ vcpkg_from_github( ) file(INSTALL "${SOURCE_PATH}/include/VHACD.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/v-hacd/vcpkg.json b/ports/v-hacd/vcpkg.json index 885f708cd7a63a..d24b38962f5873 100644 --- a/ports/v-hacd/vcpkg.json +++ b/ports/v-hacd/vcpkg.json @@ -3,26 +3,5 @@ "version": "4.1.0", "description": "The V-HACD library decomposes a 3D surface into a set of \"near\" convex parts.", "homepage": "https://github.com/kmammou/v-hacd", - "supports": "!arm", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ], - "features": { - "opencl": { - "description": "Builds opencl enabled lib", - "dependencies": [ - "opencl" - ] - }, - "openmp": { - "description": "Builds openmp enabled lib" - } - } + "supports": "!arm" } From c941127afcf82a83bfba5b9a5edaec353a119120 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 08:10:03 +0000 Subject: [PATCH 4/6] version --- versions/v-/v-hacd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/v-hacd.json b/versions/v-/v-hacd.json index f79da6d499b062..c167375bb80ba1 100644 --- a/versions/v-/v-hacd.json +++ b/versions/v-/v-hacd.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "97e1d13ceebcfc3bf13d278496c02a026fc161bd", + "git-tree": "7d5b7508963b043e1e0ba07593ca3ca7fed82180", "version": "4.1.0", "port-version": 0 }, From b03b78717ecd7e8fca05d79f751f78a436bbc8a5 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 10:29:17 +0000 Subject: [PATCH 5/6] remove --- ports/v-hacd/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/v-hacd/portfile.cmake b/ports/v-hacd/portfile.cmake index 5c5afd2cb227e4..aed23ba2a94561 100644 --- a/ports/v-hacd/portfile.cmake +++ b/ports/v-hacd/portfile.cmake @@ -1,5 +1,4 @@ -set(VCPKG_BUILD_TYPE release) # Header-only library - +# Header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kmammou/v-hacd From 77124249723c1ec78fc4a2a9dc361b6924335e12 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Tue, 24 Dec 2024 10:29:42 +0000 Subject: [PATCH 6/6] version --- versions/v-/v-hacd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/v-hacd.json b/versions/v-/v-hacd.json index c167375bb80ba1..1ced8a26cb78f7 100644 --- a/versions/v-/v-hacd.json +++ b/versions/v-/v-hacd.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7d5b7508963b043e1e0ba07593ca3ca7fed82180", + "git-tree": "fd12e9f385d6694b78b54e73328dc0afde6ed0f5", "version": "4.1.0", "port-version": 0 },