git: c2a3859c0750 - main - graphics/openmvs: Update 2.0.1 -> 2.1.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 30 Nov 2022 11:48:03 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c2a3859c075092dd3fb2606ca4755476f91559c5

commit c2a3859c075092dd3fb2606ca4755476f91559c5
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-11-30 11:47:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-30 11:47:59 +0000

    graphics/openmvs: Update 2.0.1 -> 2.1.0
    
    Reported by:    portscout
---
 graphics/openmvs/Makefile                          |  9 ++++++---
 graphics/openmvs/distinfo                          |  6 +++---
 graphics/openmvs/files/patch-libs_Common_Config.h  | 13 -------------
 graphics/openmvs/files/patch-libs_MVS_DepthMap.cpp | 16 ++++++++++++++++
 graphics/openmvs/pkg-plist                         |  2 ++
 5 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/graphics/openmvs/Makefile b/graphics/openmvs/Makefile
index 527cf3b6c2b9..1f95f379416c 100644
--- a/graphics/openmvs/Makefile
+++ b/graphics/openmvs/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	openmvs
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.0.1
-PORTREVISION=	2
+DISTVERSION=	2.1.0
 CATEGORIES=	graphics
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -18,13 +17,15 @@ BUILD_DEPENDS=	cgal>0:math/cgal \
 		vcglib>0:devel/vcglib
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libceres.so:math/ceres-solver \
+		libgflags.so:devel/gflags \
+		libglog.so:devel/glog \
 		libgmp.so:math/gmp \
 		libmpfr.so:math/mpfr \
 		libopencv_core.so:graphics/opencv \
 		libpng16.so:graphics/png \
 		libtiff.so:graphics/tiff
 
-USES=		cmake compiler:c++17-lang eigen:3 jpeg
+USES=		cmake:testing compiler:c++17-lang eigen:3 jpeg
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	cdcseacave
@@ -32,7 +33,9 @@ GH_PROJECT=	openMVS
 
 CMAKE_ON=	BUILD_SHARED_LIBS OpenMVS_USE_CERES
 CMAKE_OFF=	OpenMVS_BUILD_TOOLS # tools can't be built because of https://github.com/cdcseacave/openMVS/issues/846
+CMAKE_OFF+=	OpenMVS_ENABLE_TESTS
 CMAKE_ARGS=	-DVCG_ROOT=${LOCALBASE}/include/vcglib
+CMAKE_TESTING_ON=	OpenMVS_ENABLE_TESTS # tests fail to configure, see https://github.com/cdcseacave/openMVS/issues/911
 
 .include <bsd.port.options.mk>
 
diff --git a/graphics/openmvs/distinfo b/graphics/openmvs/distinfo
index f1cd535257a8..ed7281b7e5c1 100644
--- a/graphics/openmvs/distinfo
+++ b/graphics/openmvs/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1657645144
-SHA256 (cdcseacave-openMVS-v2.0.1_GH0.tar.gz) = 0dcbf4e0c2f797cf74e72ca4f853d27e86dc3cce64b6764b6daf93025caceaea
-SIZE (cdcseacave-openMVS-v2.0.1_GH0.tar.gz) = 813850
+TIMESTAMP = 1669798300
+SHA256 (cdcseacave-openMVS-v2.1.0_GH0.tar.gz) = c09f5741abeae8b3f9da91ded943ab10aafa60567b68e6f7bec81014e1375901
+SIZE (cdcseacave-openMVS-v2.1.0_GH0.tar.gz) = 2136278
diff --git a/graphics/openmvs/files/patch-libs_Common_Config.h b/graphics/openmvs/files/patch-libs_Common_Config.h
deleted file mode 100644
index 571b88947aad..000000000000
--- a/graphics/openmvs/files/patch-libs_Common_Config.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- libs/Common/Config.h.orig	2022-07-26 08:34:06 UTC
-+++ libs/Common/Config.h
-@@ -144,7 +144,9 @@
- #endif
- 
- 
--#if defined(__arm__) || defined (__arm64__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARMT)
-+#if defined(__powerpc__)
-+#define _PLATFFORM_PPC 1
-+#elif defined(__arm__) || defined (__arm64__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARMT)
- #define _PLATFORM_ARM 1
- #else
- #define _PLATFORM_X86 1
diff --git a/graphics/openmvs/files/patch-libs_MVS_DepthMap.cpp b/graphics/openmvs/files/patch-libs_MVS_DepthMap.cpp
new file mode 100644
index 000000000000..21c143ad6a94
--- /dev/null
+++ b/graphics/openmvs/files/patch-libs_MVS_DepthMap.cpp
@@ -0,0 +1,16 @@
+- workarounf for https://github.com/cdcseacave/openMVS/issues/910
+
+--- libs/MVS/DepthMap.cpp.orig	2022-11-30 10:06:45 UTC
++++ libs/MVS/DepthMap.cpp
+@@ -2036,9 +2036,9 @@ bool MVS::ImportDepthDataRaw(const String& fileName, S
+ 	// read image file name
+ 	STATIC_ASSERT(sizeof(String::value_type) == sizeof(char));
+ 	uint16_t nFileNameSize;
+-	fread(&nFileNameSize, sizeof(uint16_t), 1, f);
++	fread((void*)&nFileNameSize, sizeof(uint16_t), 1, f);
+ 	imageFileName.resize(nFileNameSize);
+-	fread(imageFileName.data(), sizeof(char), nFileNameSize, f);
++	fread((void*)imageFileName.data(), sizeof(char), nFileNameSize, f);
+ 
+ 	// read neighbor IDs
+ 	STATIC_ASSERT(sizeof(uint32_t) == sizeof(IIndex));
diff --git a/graphics/openmvs/pkg-plist b/graphics/openmvs/pkg-plist
index 90e4d9df28e8..04aa70e11d36 100644
--- a/graphics/openmvs/pkg-plist
+++ b/graphics/openmvs/pkg-plist
@@ -79,6 +79,8 @@ include/OpenMVS/Math/Common.h
 include/OpenMVS/Math/IBFS/IBFS.h
 include/OpenMVS/Math/LBP.h
 include/OpenMVS/Math/LMFit/lmmin.h
+include/OpenMVS/Math/RobustNorms.h
+include/OpenMVS/Math/SimilarityTransform.h
 include/OpenMVS/Math/TRWS/MRFEnergy.h
 include/OpenMVS/Math/TRWS/MRFEnergy.inl
 include/OpenMVS/Math/TRWS/instances.h