From 1a3c69d2dfb41c41d89ba7c11bb67141b90bcd82 Mon Sep 17 00:00:00 2001 From: jyu49 Date: Mon, 8 Apr 2024 14:55:31 +0800 Subject: [PATCH 1/8] [alicevision] Add new port --- ports/alicevision/portfile.cmake | 20 ++++++++++++++++++++ ports/alicevision/vcpkg.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ports/alicevision/portfile.cmake create mode 100644 ports/alicevision/vcpkg.json diff --git a/ports/alicevision/portfile.cmake b/ports/alicevision/portfile.cmake new file mode 100644 index 00000000000000..3f25e72847188f --- /dev/null +++ b/ports/alicevision/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alicevision/AliceVision + REF v3.2.0 + SHA512 448e20b2bb6623034ab89ea56b0c7fdf09af34d7d0d47740590fa9cd9aa2b6864f3950c4e968d260c660a41a2f5877c10edf8cfd0dcdd18e58ce289b7336e9ec + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${options} +) + +vcpkg_cmake_install() +#vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.md") diff --git a/ports/alicevision/vcpkg.json b/ports/alicevision/vcpkg.json new file mode 100644 index 00000000000000..73f20127699492 --- /dev/null +++ b/ports/alicevision/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "alicevision", + "version-semver": "3.2.0", + "description": "AliceVision is a Photogrammetric Computer Vision Framework which provides a 3D Reconstruction and Camera Tracking algorithms.", + "homepage": "https://alicevision.org/association/#", + "license": "MIT", + "dependencies": [ + "boost", + "openexr", + "openimageio", + "expat", + "eigen3" + ], + "features": { + "nls": { + "description": "Enable native language support", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "gettext-libintl" + ] + } + } +} From 58c2f64d8a38579436a2070a269b8249972b6ee4 Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Mon, 8 Apr 2024 21:28:00 +0800 Subject: [PATCH 2/8] fix build --- ports/alicevision/fix-dynamic-boost.patch | 13 ++++++ ports/alicevision/portfile.cmake | 54 +++++++++++++++++++++-- ports/alicevision/vcpkg.json | 42 ++++++++++-------- 3 files changed, 87 insertions(+), 22 deletions(-) create mode 100644 ports/alicevision/fix-dynamic-boost.patch diff --git a/ports/alicevision/fix-dynamic-boost.patch b/ports/alicevision/fix-dynamic-boost.patch new file mode 100644 index 00000000000000..b1c153bbda2d56 --- /dev/null +++ b/ports/alicevision/fix-dynamic-boost.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8fcdd67..566890c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -288,7 +288,7 @@ else() + endif() + + +-if(WIN32) ++if(OFF) + # Disable BOOST autolink + add_definitions(-DBOOST_ALL_NO_LIB) + diff --git a/ports/alicevision/portfile.cmake b/ports/alicevision/portfile.cmake index 3f25e72847188f..57e86c2515657b 100644 --- a/ports/alicevision/portfile.cmake +++ b/ports/alicevision/portfile.cmake @@ -2,19 +2,65 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alicevision/AliceVision REF v3.2.0 - SHA512 448e20b2bb6623034ab89ea56b0c7fdf09af34d7d0d47740590fa9cd9aa2b6864f3950c4e968d260c660a41a2f5877c10edf8cfd0dcdd18e58ce289b7336e9ec + SHA512 448e20b2bb6623034ab89ea56b0c7fdf09af34d7d0d47740590fa9cd9aa2b6864f3950c4e968d260c660a41a2f5877c10edf8cfd0dcdd18e58ce289b7336e9ec HEAD_REF master + PATCHES fix-dynamic-boost.patch ) +# MeshSDFilter +vcpkg_from_github( + OUT_SOURCE_PATH MESHSDFILTER_SOURCE_PATH + REPO bldeng/MeshSDFilter + REF 71c3028eda6fc29517e658c54833e280f9abad51 + SHA512 61367aab7117922b6f0f56d58e95cd328ac8177b184add11530b2ce9a8474be4947c7b27de135d7ad2980d6d49cc8a44b066eb673784dd553e1b9e78e994b3bb + HEAD_REF master +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/src/dependencies/MeshSDFilter") +file(RENAME "${MESHSDFILTER_SOURCE_PATH}" "${SOURCE_PATH}/src/dependencies/MeshSDFilter") + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - ${options} + -DALICEVISION_BUILD_SFM=OFF + -DALICEVISION_BUILD_MVS=ON + -DALICEVISION_BUILD_HDR=ON + -DALICEVISION_BUILD_SEGMENTATION=ON + -DALICEVISION_BUILD_STEREOPHOTOMETRY=ON + -DALICEVISION_BUILD_PANORAMA=ON + -DALICEVISION_BUILD_SOFTWARE=ON + -DALICEVISION_BUILD_COVERAGE=OFF + -DALICEVISION_BUILD_DOC=OFF + -DALICEVISION_USE_OPENMP=OFF + -DALICEVISION_USE_CCTAG=OFF + -DALICEVISION_USE_APRILTAG=OFF + -DALICEVISION_USE_POPSIFT=OFF + -DALICEVISION_USE_OPENGV=OFF + -DALICEVISION_USE_ALEMBIC=OFF + -DALICEVISION_USE_UNCERTAINTYTE=OFF + -DALICEVISION_USE_ONNX=OFF + -DALICEVISION_USE_ONNX_GPU=OFF + -DALICEVISION_USE_CUDA=OFF + -DALICEVISION_USE_NVTX_PROFILING=OFF + -DALICEVISION_NVCC_WARNINGS=OFF + -DALICEVISION_USE_OPENCV=OFF + -DALICEVISION_USE_OPENCV_CONTRIB=OFF + -DALICEVISION_USE_OCVSIFT=OFF + -DALICEVISION_USE_MESHSDFILTER=ON + -DALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE=ON + -DALICEVISION_USE_RPATH=ON + -DALICEVISION_BUILD_TESTS=OFF + -DBOOST_NO_CXX11=OFF ) vcpkg_cmake_install() -#vcpkg_fixup_pkgconfig() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_cmake_config_fixup(PACKAGE_NAME AliceVision CONFIG_PATH share/aliceVision/cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/include/aliceVision/image/image_test" + "${CURRENT_PACKAGES_DIR}/include/aliceVision/image/share" + "${CURRENT_PACKAGES_DIR}/include/aliceVision/sfmDataIO/compatibilityData" + "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.md") diff --git a/ports/alicevision/vcpkg.json b/ports/alicevision/vcpkg.json index 73f20127699492..d3a50de476e0e5 100644 --- a/ports/alicevision/vcpkg.json +++ b/ports/alicevision/vcpkg.json @@ -5,25 +5,31 @@ "homepage": "https://alicevision.org/association/#", "license": "MIT", "dependencies": [ - "boost", + "boost-atomic", + "boost-container", + "boost-date-time", + "boost-filesystem", + "boost-graph", + "boost-json", + "boost-log", + "boost-program-options", + "boost-regex", + "boost-serialization", + "boost-system", + "boost-thread", + "boost-timer", + "eigen3", + "expat", + "nanoflann", "openexr", "openimageio", - "expat", - "eigen3" - ], - "features": { - "nls": { - "description": "Enable native language support", - "dependencies": [ - { - "name": "gettext", - "host": true, - "features": [ - "tools" - ] - }, - "gettext-libintl" - ] + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } - } + ] } From 3b93f119e84181b6d669f44140a1a731c414a465 Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Mon, 8 Apr 2024 21:29:05 +0800 Subject: [PATCH 3/8] version --- versions/a-/alicevision.json | 9 +++++++++ versions/baseline.json | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 versions/a-/alicevision.json diff --git a/versions/a-/alicevision.json b/versions/a-/alicevision.json new file mode 100644 index 00000000000000..33039929e0a414 --- /dev/null +++ b/versions/a-/alicevision.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "7002a4801670ef616f19a8e1b60c38c0b4260797", + "version-semver": "3.2.0", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 5db40a273ec268..03f0ddb4918524 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -76,6 +76,10 @@ "baseline": "1.8.6", "port-version": 0 }, + "alicevision": { + "baseline": "3.2.0", + "port-version": 0 + }, "aliyun-oss-c-sdk": { "baseline": "3.10.1", "port-version": 0 From f65fd5b29ef95743e949af009e9fb19b154c6d7a Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Sat, 13 Apr 2024 11:59:22 +0800 Subject: [PATCH 4/8] Arm is unsupported --- ports/alicevision/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/alicevision/vcpkg.json b/ports/alicevision/vcpkg.json index d3a50de476e0e5..38aed7e504a53e 100644 --- a/ports/alicevision/vcpkg.json +++ b/ports/alicevision/vcpkg.json @@ -4,6 +4,7 @@ "description": "AliceVision is a Photogrammetric Computer Vision Framework which provides a 3D Reconstruction and Camera Tracking algorithms.", "homepage": "https://alicevision.org/association/#", "license": "MIT", + "supports": "!arm", "dependencies": [ "boost-atomic", "boost-container", From d484ae10f23c62af65c8ef193897710434285a83 Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Sat, 13 Apr 2024 12:00:11 +0800 Subject: [PATCH 5/8] version --- versions/a-/alicevision.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/alicevision.json b/versions/a-/alicevision.json index 33039929e0a414..eb600797eec9f4 100644 --- a/versions/a-/alicevision.json +++ b/versions/a-/alicevision.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7002a4801670ef616f19a8e1b60c38c0b4260797", + "git-tree": "1791a747fcf5de693c34680819cbe19604f06d30", "version-semver": "3.2.0", "port-version": 0 } From 85933c8b0356188633c37b8d2013f8f6ae9f0e3a Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Sun, 5 May 2024 22:41:54 +0800 Subject: [PATCH 6/8] Add feature sfm and set as default feature --- ports/alicevision/portfile.cmake | 8 ++++++- ports/alicevision/vcpkg.json | 38 +++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/ports/alicevision/portfile.cmake b/ports/alicevision/portfile.cmake index 57e86c2515657b..2e0b54e0c1dc99 100644 --- a/ports/alicevision/portfile.cmake +++ b/ports/alicevision/portfile.cmake @@ -7,6 +7,12 @@ vcpkg_from_github( PATCHES fix-dynamic-boost.patch ) +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + sfm ALICEVISION_BUILD_SFM +) + # MeshSDFilter vcpkg_from_github( OUT_SOURCE_PATH MESHSDFILTER_SOURCE_PATH @@ -22,7 +28,7 @@ file(RENAME "${MESHSDFILTER_SOURCE_PATH}" "${SOURCE_PATH}/src/dependencies/MeshS vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DALICEVISION_BUILD_SFM=OFF + ${FEATURE_OPTIONS} -DALICEVISION_BUILD_MVS=ON -DALICEVISION_BUILD_HDR=ON -DALICEVISION_BUILD_SEGMENTATION=ON diff --git a/ports/alicevision/vcpkg.json b/ports/alicevision/vcpkg.json index 38aed7e504a53e..b9d708b036dbec 100644 --- a/ports/alicevision/vcpkg.json +++ b/ports/alicevision/vcpkg.json @@ -32,5 +32,41 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "default-features": [ + "sfm" + ], + "features": { + "sfm": { + "description": "Install non-standard files required for building Apache httpd", + "dependencies": [ + { + "name": "assimp", + "default-features": false + }, + { + "name": "ceres", + "default-features": false, + "features": [ + "suitesparse" + ] + }, + "coin-or-clp", + "coin-or-osi", + { + "name": "coinutils", + "default-features": false + }, + { + "name": "flann", + "default-features": false + }, + { + "name": "geogram", + "default-features": false + }, + "liblemon" + ] + } + } } From 80df09c402e14fbac7e3e311d20367cd23777af0 Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Sun, 5 May 2024 23:25:04 +0800 Subject: [PATCH 7/8] add feature openmp and set as default feature --- ports/alicevision/portfile.cmake | 4 ++-- ports/alicevision/vcpkg.json | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/alicevision/portfile.cmake b/ports/alicevision/portfile.cmake index 2e0b54e0c1dc99..6d2e5f3189f106 100644 --- a/ports/alicevision/portfile.cmake +++ b/ports/alicevision/portfile.cmake @@ -10,7 +10,8 @@ vcpkg_from_github( vcpkg_check_features( OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - sfm ALICEVISION_BUILD_SFM + sfm ALICEVISION_BUILD_SFM + openmp ALICEVISION_USE_OPENMP ) # MeshSDFilter @@ -37,7 +38,6 @@ vcpkg_cmake_configure( -DALICEVISION_BUILD_SOFTWARE=ON -DALICEVISION_BUILD_COVERAGE=OFF -DALICEVISION_BUILD_DOC=OFF - -DALICEVISION_USE_OPENMP=OFF -DALICEVISION_USE_CCTAG=OFF -DALICEVISION_USE_APRILTAG=OFF -DALICEVISION_USE_POPSIFT=OFF diff --git a/ports/alicevision/vcpkg.json b/ports/alicevision/vcpkg.json index b9d708b036dbec..2cfe917b58cd60 100644 --- a/ports/alicevision/vcpkg.json +++ b/ports/alicevision/vcpkg.json @@ -34,11 +34,15 @@ } ], "default-features": [ + "openmp", "sfm" ], "features": { + "openmp": { + "description": "Enable OpenMP parallelization" + }, "sfm": { - "description": "Install non-standard files required for building Apache httpd", + "description": "Build AliceVision SfM part", "dependencies": [ { "name": "assimp", From 4fddfab82a12b1b697378a97d67ac0b70f221561 Mon Sep 17 00:00:00 2001 From: JackBoosY <398808571@qq.com> Date: Sun, 5 May 2024 23:26:16 +0800 Subject: [PATCH 8/8] Apply suggestion --- ports/alicevision/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/alicevision/portfile.cmake b/ports/alicevision/portfile.cmake index 6d2e5f3189f106..284e2277c3c8bc 100644 --- a/ports/alicevision/portfile.cmake +++ b/ports/alicevision/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alicevision/AliceVision - REF v3.2.0 + REF "v${VERSION}" SHA512 448e20b2bb6623034ab89ea56b0c7fdf09af34d7d0d47740590fa9cd9aa2b6864f3950c4e968d260c660a41a2f5877c10edf8cfd0dcdd18e58ce289b7336e9ec HEAD_REF master PATCHES fix-dynamic-boost.patch