diff --git a/ports/cctag/0001-fix-osx.patch b/ports/cctag/0001-fix-osx.patch deleted file mode 100644 index 759fd6190c..0000000000 --- a/ports/cctag/0001-fix-osx.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/cctag/utils/Exceptions.hpp b/src/cctag/utils/Exceptions.hpp -index 094d278..8647f76 100644 ---- a/src/cctag/utils/Exceptions.hpp -+++ b/src/cctag/utils/Exceptions.hpp -@@ -8,6 +8,7 @@ - #ifndef _CCTAG_EXCEPTIONS_HPP_ - #define _CCTAG_EXCEPTIONS_HPP_ - -+#define _GNU_SOURCE - #include - #include - #include diff --git a/ports/cctag/0002-find-tbb.patch b/ports/cctag/0002-find-tbb.patch deleted file mode 100644 index 7badc072f9..0000000000 --- a/ports/cctag/0002-find-tbb.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -index c5a82c0..3ce4719 100644 ---- a/cmake/Config.cmake.in -+++ b/cmake/Config.cmake.in -@@ -42,6 +42,7 @@ - include(CMakeFindDependencyMacro) - - set(OpenCV_DIR @OpenCV_DIR@) -+find_dependency(TBB) - find_dependency(OpenCV) - find_dependency(Eigen3 @CCTAG_EIGEN_REQUIRED_VERSION@) - find_dependency(Boost 1.66 REQUIRED COMPONENTS @BOOST_REQUIRED_COMPONENTS@) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 7b64b83..5398ed4 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -176,7 +176,8 @@ if(CCTAG_WITH_CUDA) - ${OpenCV_LIBS} - Boost::date_time Boost::chrono Boost::thread Boost::serialization Boost::system Boost::filesystem Boost::atomic Boost::program_options Boost::timer Boost::math_c99 - Eigen3::Eigen -- ${TBB_LIBRARIES} ${CUDA_CUDADEVRT_LIBRARY}) -+ TBB::tbb -+ ${CUDA_CUDADEVRT_LIBRARY}) - - if(NOT MSVC) - target_link_libraries(CCTag pthread dl) -@@ -184,7 +185,7 @@ if(CCTAG_WITH_CUDA) - - target_compile_definitions(CCTag - PUBLIC -DCCTAG_WITH_CUDA -- PRIVATE ${TBB_DEFINITIONS}) -+) - - if(CCTAG_HAVE_SHFL_DOWN_SYNC) - target_compile_definitions(CCTag PRIVATE "-DCCTAG_HAVE_SHFL_DOWN_SYNC") -@@ -220,16 +221,13 @@ else() # without CUDA - # get_target_property(testprop CCTag INTERFACE_INCLUDE_DIRECTORIES ) - # message(STATUS "testprop: ${testprop}") - -- target_compile_definitions(CCTag -- PRIVATE ${TBB_DEFINITIONS}) - - target_link_libraries(CCTag - PUBLIC - ${OpenCV_LIBS} - Eigen3::Eigen - Boost::atomic Boost::chrono Boost::date_time Boost::filesystem Boost::serialization Boost::system Boost::thread Boost::timer Boost::math_c99 -- PRIVATE -- ${TBB_LIBRARIES}) -+ TBB::tbb) - - if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - target_link_libraries(CCTag PRIVATE pthread dl) -diff --git a/src/applications/CMakeLists.txt b/src/applications/CMakeLists.txt -index 506d19b..c7154fc 100644 ---- a/src/applications/CMakeLists.txt -+++ b/src/applications/CMakeLists.txt -@@ -86,7 +86,7 @@ target_include_directories(detection PUBLIC - ) - target_link_libraries(detection PUBLIC - CCTag::CCTag -- ${TBB_LIBRARIES} -+ TBB::tbb - ${OpenCV_LIBS} - Boost::filesystem Boost::program_options Boost::timer - ) -diff --git a/src/cctag/Detection.cpp b/src/cctag/Detection.cpp -index 21c47bf..a800fbc 100644 ---- a/src/cctag/Detection.cpp -+++ b/src/cctag/Detection.cpp -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - #ifdef CCTAG_WITH_CUDA - #include // only for debugging - #endif // CCTAG_WITH_CUDA -@@ -71,7 +72,7 @@ static void constructFlowComponentFromSeed( - std::vector & vCandidateLoopOne, - const Parameters & params) - { -- static tbb::mutex G_SortMutex; -+ static std::mutex G_SortMutex; - - assert( seed ); - // Check if the seed has already been processed, i.e. belongs to an already -@@ -102,7 +103,7 @@ static void constructFlowComponentFromSeed( - } - - { -- tbb::mutex::scoped_lock lock(G_SortMutex); -+ std::lock_guard lock(G_SortMutex); - candidate->_averageReceivedVote = (float) (nReceivedVote*nReceivedVote) / (float) nVotedPoints; - auto it = std::lower_bound(vCandidateLoopOne.begin(), vCandidateLoopOne.end(), candidate, - [](const CandidatePtr& c1, const CandidatePtr& c2) { return c1->_averageReceivedVote > c2->_averageReceivedVote; }); -@@ -119,8 +120,8 @@ static void completeFlowComponent( - std::size_t runId, - const Parameters & params) - { -- static tbb::spin_mutex G_UpdateMutex; -- static tbb::mutex G_InsertMutex; -+ static std::mutex G_UpdateMutex; -+ static std::mutex G_InsertMutex; - - try - { -@@ -171,7 +172,7 @@ static void completeFlowComponent( - if (nSegmentCommon == -1) - { - { -- tbb::spin_mutex::scoped_lock lock(G_UpdateMutex); -+ std::lock_guard lock(G_UpdateMutex); - nLabel = nSegmentOut; - ++nSegmentOut; - } -@@ -239,7 +240,7 @@ static void completeFlowComponent( - } - - { -- tbb::mutex::scoped_lock lock(G_InsertMutex); -+ std::lock_guard lock(G_InsertMutex); - vCandidateLoopTwo.push_back(candidate); - } - -@@ -384,7 +385,7 @@ static void cctagDetectionFromEdgesLoopTwoIteration( - float scale, - const Parameters& params) - { -- static tbb::mutex G_InsertMutex; -+ static std::mutex G_InsertMutex; - - const Candidate& candidate = vCandidateLoopTwo[iCandidate]; - -@@ -543,7 +544,7 @@ static void cctagDetectionFromEdgesLoopTwoIteration( - #endif - - { -- tbb::mutex::scoped_lock lock(G_InsertMutex); -+ std::lock_guard lock(G_InsertMutex); - markers.push_back( tag ); // markers takes responsibility for delete - } - #ifdef CCTAG_SERIALIZE -diff --git a/src/cctag/Identification.cpp b/src/cctag/Identification.cpp -index 15c9d9b..99b616a 100644 ---- a/src/cctag/Identification.cpp -+++ b/src/cctag/Identification.cpp -@@ -29,6 +29,7 @@ - - #include - #include -+#include - - #include - -@@ -71,7 +72,7 @@ bool orazioDistanceRobust( - #endif // GRIFF_DEBUG - - const size_t cut_count = cuts.size(); -- static tbb::mutex vscore_mutex; -+ static std::mutex vscore_mutex; - - tbb::parallel_for(size_t(0), cut_count, [&](size_t i) { - const cctag::ImageCut& cut = cuts[i]; -@@ -183,7 +184,7 @@ bool orazioDistanceRobust( - #endif // GRIFF_DEBUG - - { -- tbb::mutex::scoped_lock lock(vscore_mutex); -+ std::lock_guard lock(vscore_mutex); - vScore[idSet.front().first].push_back(idSet.front().second); - } - } diff --git a/ports/cctag/portfile.cmake b/ports/cctag/portfile.cmake index a96d6dd8e5..38a494af4e 100644 --- a/ports/cctag/portfile.cmake +++ b/ports/cctag/portfile.cmake @@ -1,12 +1,10 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alicevision/cctag - REF v1.0.2 - SHA512 ccd62f6b1ca55035a08660052f38e73866260d5295490864fa9c86af779a42ce2ec727d6c88f0ea38f205903cf8f4107069b690849e432219c74d3b9666e3ae2 + REF "v${VERSION}" + SHA512 ccae0829480eca2a25cae70a5bf2cb3fde5ae1f71a08a9b614c05a1bb746ad66d6ac70f590ac8096635ea4fe75590d0ecb1c8c9f1b77189e5eae6f5e59c78cfe HEAD_REF develop PATCHES - 0001-fix-osx.patch - 0002-find-tbb.patch # Includes changes similar to https://github.com/alicevision/CCTag/pull/178/ fix-compatibility-with-boost-1.85.patch ) @@ -49,4 +47,4 @@ if ("apps" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES ${CCTAG_TOOLS} AUTO_CLEAN) endif() -file(INSTALL "${SOURCE_PATH}/COPYING.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.md") diff --git a/ports/cctag/vcpkg.json b/ports/cctag/vcpkg.json index 167bbfebba..7b4a48a1cc 100644 --- a/ports/cctag/vcpkg.json +++ b/ports/cctag/vcpkg.json @@ -1,7 +1,6 @@ { "name": "cctag", - "version-semver": "1.0.2", - "port-version": 7, + "version-semver": "1.0.3", "maintainers": "alicevision-team@googlegroups.com", "description": "Computer vision library for detecting CCTag markers made up of concentric circles", "homepage": "https://github.com/alicevision/CCTag", diff --git a/versions/baseline.json b/versions/baseline.json index 08899b713d..7c025c3c2f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1529,8 +1529,8 @@ "port-version": 12 }, "cctag": { - "baseline": "1.0.2", - "port-version": 7 + "baseline": "1.0.3", + "port-version": 0 }, "cctz": { "baseline": "2.4", diff --git a/versions/c-/cctag.json b/versions/c-/cctag.json index ba3eee9d82..1c8c5d6235 100644 --- a/versions/c-/cctag.json +++ b/versions/c-/cctag.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "43157f8be9e5020e0e2ab708ec931f4cb3266b31", + "version-semver": "1.0.3", + "port-version": 0 + }, { "git-tree": "bc6878b6e5119f0b4b5f90b4b09e02bd50c9b213", "version-semver": "1.0.2",