opencv: add new version, variant, and patch (#27374)

* opencv: add new version, variant, and patch

- added version 4.5.4
- added tesseract variant
- added patch to not add system paths

* Add leptonica depends and contrib conflicts

* Add dependencies for 1394 support

- new package: libraw1394
- add sdl dependency to libdc1394
- add conflict for openjpeg and jasper

* Adjust dependencies and conflicts for opencv modules

* rewrite of opencv

- all prebuilt apps are now variants and can be installed
- core is no longer a variant. It was always built anyway so it was not
  really a variant.
- contrib is no longer a variant. All of the contrib modules are now
  available as variants.
- components that can not be built with Spack are no longer variants.
  They are set to 'off' to prevent pulling from system.
- handle the case where a module and a component have the same name
- use `with when` framework
- adjust dependencies and conflicts
- new package: libraw1394
- have libdc1394 depend on libraw1394
- patch to find clp
- patch to find onnx
- patch for cvv to find Qt
- format with black

* Incorporate recommended changes

- fix variants and dependencies on packages that depend on opencv
- remove opencv-3.2 and patches
- add some new patches to handle different versions
- cntk needs further work
- the openvslam package was markde deprecated as it is no longer an
  active project and the repository has no code

* Remove gmake dependency.

* Remove sdl support

SDL is only used in an example case, but the examples are not built.

* remove openvslam

* Remove opencv+flann variant from 3dtk

* Back out cfitsio constraint from py-astropy

* remove opencv+flann variant from dlib

* remove boost constraint from 3dtk

* Remove non-opencv related bohrium changes

* Adjustments for cntk

- protobuf constraint at version 3.10
- need specific variants for opencv
- improve patch

* Deprecate CNTK package

* variant tweaks

- added appropriate conflicts for cublas
- made cuda/cudev relationship explicit
- moved openx to pending components as it needs an openvx package

* fix isort style error

* Use date version from kaldi rather than commit

* Revert changes from a bad rebase

* Add +flann to 3dtk and dlib

* Use compression support with libtiff

* remove `+datasets` from opencv dependency 

The py-torchgeo package does not need opencv+datasets.

* fix typo

zip --> zlib
This commit is contained in:
Glenn Johnson 2022-01-31 21:24:03 -06:00 committed by GitHub
parent 6e99f328b6
commit 21524f5149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 1126 additions and 687 deletions

View File

@ -46,9 +46,7 @@ class _3dtk(CMakePackage):
depends_on('gl', when='+opengl')
depends_on('glew', when='+opengl')
depends_on('freeglut', when='+opengl')
depends_on('opencv+calib3d+contrib+core+features2d+highgui+imgcodecs+imgproc+ml+videoio', when='+opencv')
# Because concretizer is broken
depends_on('opencv+flann', when='+opencv')
depends_on('opencv+aruco+calib3d+features2d+ffmpeg+highgui+imgcodecs+imgproc+ml+videoio+flann', when='+opencv')
depends_on('cuda', when='+cuda')
# TODO: add Spack packages for these instead of using vendored copies

View File

@ -68,8 +68,6 @@ class Bohrium(CMakePackage, CudaPackage):
conflicts('~node~proxy')
conflicts('~openmp~opencl~cuda')
conflicts('+cbridge', when='~python')
#
# Dependencies
#
@ -86,10 +84,9 @@ class Bohrium(CMakePackage, CudaPackage):
depends_on('blas', when="+blas")
# Make sure an appropriate opencv is used
depends_on('opencv+imgproc', when="+opencv")
depends_on('opencv+imgproc+cuda', when="+opencv+cuda")
depends_on('opencv+imgproc+openmp', when="+opencv+openmp")
depends_on('opencv+imgproc+openmp+cuda', when="+opencv+openmp+cuda")
depends_on('opencv@:3+imgproc', when="+opencv")
depends_on('opencv+cudev', when="+opencv+cuda")
depends_on('opencv+openmp', when="+opencv+openmp")
depends_on('python', type="build", when="~python")
depends_on('python', type=("build", "link", "test"), when="+python")

View File

@ -37,13 +37,13 @@ class Caffe(CMakePackage, CudaPackage):
depends_on('boost +python', when='+python')
depends_on('cuda', when='+cuda')
depends_on('blas')
depends_on('protobuf')
depends_on('protobuf@:3.17')
depends_on('glog')
depends_on('gflags')
depends_on('hdf5 +hl +cxx')
# Optional dependencies
depends_on('opencv@3.2.0:3.4.12+core+highgui+imgproc+imgcodecs', when='+opencv')
depends_on('opencv@:3+highgui+imgproc+imgcodecs', when='+opencv')
depends_on('leveldb', when='+leveldb')
depends_on('lmdb', when='+lmdb')
depends_on('python@2.7:', when='+python')

View File

@ -26,7 +26,7 @@ class CandleBenchmarks(Package):
depends_on('py-matplotlib +image@:2.2.3', type=('build', 'run'))
depends_on('py-tqdm', type=('build', 'run'))
depends_on('py-scikit-learn', type=('build', 'run'))
depends_on('opencv@3.2.0: +core +highgui +imgproc +jpeg +png +tiff -dnn ~eigen ~gtk')
depends_on('opencv@3.2.0: +highgui +imgproc +jpeg +png +tiff ~dnn ~eigen ~gtk')
depends_on('py-mdanalysis', type=('build', 'run'))
depends_on('py-mpi4py', when='+mpi', type=('build', 'run'))
depends_on('py-h5py~mpi', when='~mpi', type=('build', 'run'))

View File

@ -16,7 +16,7 @@ class Dbow2(CMakePackage):
version('shinsumicco', git='https://github.com/shinsumicco/DBoW2.git', branch='master')
depends_on('cmake@3.0:', type='build')
depends_on('opencv+calib3d+core+features2d+highgui+imgproc')
depends_on('opencv+calib3d+features2d+highgui+imgproc')
depends_on('boost')
depends_on('dlib')
depends_on('eigen', type='link')

View File

@ -15,7 +15,4 @@ class Dlib(CMakePackage):
version('master', branch='master')
depends_on('cmake@3.0:', type='build')
depends_on('opencv+calib3d+core+features2d+highgui+imgproc+imgcodecs')
# Because concretizer is broken...
# TODO: remove when original concretizer is obsolete
depends_on('opencv+flann')
depends_on('opencv+calib3d+features2d+highgui+imgproc+imgcodecs+flann')

View File

@ -189,7 +189,7 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage):
# LBANN wraps OpenCV calls in OpenMP parallel loops, build without OpenMP
# Additionally disable video related options, they incorrectly link in a
# bad OpenMP library when building with clang or Intel compilers
depends_on('opencv@4.1.0: build_type=RelWithDebInfo +core +highgui '
depends_on('opencv@4.1.0: build_type=RelWithDebInfo +highgui '
'+imgcodecs +imgproc +jpeg +png +tiff +fast-math ~cuda',
when='+vision')

View File

@ -65,7 +65,7 @@ def flag_handler(self, name, flags):
depends_on('cmake@3.5:', type='build')
depends_on('ffmpeg@:4', type='build')
depends_on('protobuf@:3', type='build')
depends_on('opencv@:3.4 +calib3d+core+features2d+highgui+imgcodecs+imgproc+video+videoio+flann+photo+objdetect', type='build')
depends_on('opencv@:3.4 +calib3d+features2d+highgui+imgcodecs+imgproc+video+videoio+flann+photo+objdetect', type='build')
depends_on('rocm-opencl@3.5.0', when='@1.7')
depends_on('rocm-cmake@3.5.0', type='build', when='@1.7')
depends_on('miopen-opencl@3.5.0', when='@1.7')

View File

@ -63,7 +63,7 @@ class Mxnet(CMakePackage, CudaPackage):
depends_on('cuda@:11.3', when='@2.0.0: +cuda')
depends_on('cudnn', when='+cudnn')
depends_on('nccl', when='+nccl')
depends_on('opencv+core+highgui+imgproc+imgcodecs', when='+opencv')
depends_on('opencv+highgui+imgproc+imgcodecs', when='+opencv')
depends_on('lapack', when='+lapack')
depends_on('onednn', when='+mkldnn')

View File

@ -0,0 +1,38 @@
diff -ru a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2021-10-09 10:48:26.000000000 -0500
+++ b/CMakeLists.txt 2021-11-11 17:29:04.189734621 -0600
@@ -161,34 +161,6 @@
include(cmake/OpenCVDetectCXXCompiler.cmake)
ocv_cmake_hook(POST_DETECT_COMPILER)
-# Add these standard paths to the search paths for FIND_LIBRARY
-# to find libraries from these locations first
-if(UNIX AND NOT ANDROID)
- if(X86_64 OR CMAKE_SIZEOF_VOID_P EQUAL 8)
- if(EXISTS /lib64)
- list(APPEND CMAKE_LIBRARY_PATH /lib64)
- else()
- list(APPEND CMAKE_LIBRARY_PATH /lib)
- endif()
- if(EXISTS /usr/lib64)
- list(APPEND CMAKE_LIBRARY_PATH /usr/lib64)
- else()
- list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
- endif()
- elseif(X86 OR CMAKE_SIZEOF_VOID_P EQUAL 4)
- if(EXISTS /lib32)
- list(APPEND CMAKE_LIBRARY_PATH /lib32)
- else()
- list(APPEND CMAKE_LIBRARY_PATH /lib)
- endif()
- if(EXISTS /usr/lib32)
- list(APPEND CMAKE_LIBRARY_PATH /usr/lib32)
- else()
- list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
- endif()
- endif()
-endif()
-
# Add these standard paths to the search paths for FIND_PATH
# to find include files from these locations first
if(MINGW)

View File

@ -1,14 +0,0 @@
--- a/cmake/OpenCVCompilerOptions.cmake 2016-12-23 06:54:44.000000000 -0600
+++ b/cmake/OpenCVCompilerOptions.cmake 2021-06-16 11:51:11.616354728 -0500
@@ -18,9 +18,9 @@
message(STATUS "Unable to compile program with enabled ccache, reverting...")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${__OLD_RULE_LAUNCH_COMPILE}")
endif()
- else()
- message(STATUS "Looking for ccache - not found")
endif()
+ else()
+ message(STATUS "Looking for ccache - not found")
endif()
endif()

View File

@ -1,107 +0,0 @@
commit b1d208891b9f6ae3968730b120a5d0dcbba679d0
Author: Jonathan Viney <jonathan.viney@gmail.com>
Date: Sun Nov 19 07:08:41 2017 +1300
Merge pull request #10011 from jviney:master
Fix build with FFmpeg master. Some deprecated APIs have been removed. (#10011)
* Fix build with FFmpeg master.
* ffmpeg: update AVFMT_RAWPICTURE support removal
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
index 5f51e65134..46461483a7 100644
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
@@ -149,6 +149,10 @@ extern "C" {
#define AV_PIX_FMT_GRAY16BE PIX_FMT_GRAY16BE
#endif
+#ifndef PKT_FLAG_KEY
+#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
+#endif
+
#if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 \
? CALC_FFMPEG_VERSION(52, 38, 100) : CALC_FFMPEG_VERSION(52, 13, 0))
#define USE_AV_FRAME_GET_BUFFER 1
@@ -1570,7 +1574,11 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
// some formats want stream headers to be seperate
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
{
+#if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0)
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+#else
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+#endif
}
#endif
@@ -1598,23 +1606,24 @@ static int icv_av_write_frame_FFMPEG( AVFormatContext * oc, AVStream * video_st,
#endif
int ret = OPENCV_NO_FRAMES_WRITTEN_CODE;
- if (oc->oformat->flags & AVFMT_RAWPICTURE) {
+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
+ if (oc->oformat->flags & AVFMT_RAWPICTURE)
+ {
/* raw video case. The API will change slightly in the near
futur for that */
AVPacket pkt;
av_init_packet(&pkt);
-#ifndef PKT_FLAG_KEY
-#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
-#endif
-
pkt.flags |= PKT_FLAG_KEY;
pkt.stream_index= video_st->index;
pkt.data= (uint8_t *)picture;
pkt.size= sizeof(AVPicture);
ret = av_write_frame(oc, &pkt);
- } else {
+ }
+ else
+#endif
+ {
/* encode the image */
AVPacket pkt;
av_init_packet(&pkt);
@@ -1772,7 +1781,9 @@ void CvVideoWriter_FFMPEG::close()
/* write the trailer, if any */
if(ok && oc)
{
- if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 )
+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
+ if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
+#endif
{
for(;;)
{
@@ -2071,7 +2082,11 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
outbuf = NULL;
- if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
+
+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
+ if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
+#endif
+ {
/* allocate output buffer */
/* assume we will never get codec output with more than 4 bytes per pixel... */
outbuf_size = width*height*4;
@@ -2376,7 +2391,11 @@ AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC
// some formats want stream headers to be seperate
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
{
- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ #if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0)
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ #else
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ #endif
}
#endif

View File

@ -1,20 +0,0 @@
diff -ru opencv-3.2.0.org/modules/core/include/opencv2/core/hal/intrin_neon.hpp opencv-3.2.0/modules/core/include/opencv2/core/hal/intrin_neon.hpp
--- opencv-3.2.0.org/modules/core/include/opencv2/core/hal/intrin_neon.hpp 2016-12-23 21:54:44.000000000 +0900
+++ opencv-3.2.0/modules/core/include/opencv2/core/hal/intrin_neon.hpp 2020-05-27 14:39:11.288700481 +0900
@@ -282,10 +282,16 @@
{ return (int16x4_t)a; }
template <typename T> static inline float16x4_t vreinterpret_f16_s16(T a)
{ return (float16x4_t)a; }
+#ifdef vld1_f16
+#undef vld1_f16
+#endif
template <typename T> static inline float16x4_t vld1_f16(const T* ptr)
{ return vreinterpret_f16_s16(vld1_s16((const short*)ptr)); }
+#ifdef vst1_f16
+#undef vst1_f16
+#endif
template <typename T> static inline void vst1_f16(T* ptr, float16x4_t a)
{ vst1_s16((short*)ptr, vreinterpret_s16_f16(a)); }
struct v_float16x4
{

View File

@ -1,22 +0,0 @@
commit 0c4328fbf3da0da57a91b2133578c5100370b867
Author: ilovezfs <ilovezfs@icloud.com>
Date: Tue Jul 3 06:31:39 2018 +0000
Python 3.7 compatability
The result of PyUnicode_AsUTF8() is now of type const char * rather of
char *.
diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp
index e16fcbacf2..5a6bf7ef62 100644
--- a/modules/python/src2/cv2.cpp
+++ b/modules/python/src2/cv2.cpp
@@ -916,7 +916,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name)
(void)name;
if(!obj || obj == Py_None)
return true;
- char* str = PyString_AsString(obj);
+ const char* str = PyString_AsString(obj);
if(!str)
return false;
value = String(str);

View File

@ -1,119 +0,0 @@
commit 235889ddbb1aaa4f0dfaee730f42a8476c0e50f0
Author: jasjuang <jasjuang@gmail.com>
Date: Thu Dec 21 01:33:25 2017 -0800
handle legacy VTK functions
diff --git a/modules/viz/src/clouds.cpp b/modules/viz/src/clouds.cpp
index 48d057d2a8..ab8fd43e40 100644
--- a/modules/viz/src/clouds.cpp
+++ b/modules/viz/src/clouds.cpp
@@ -77,7 +77,9 @@ cv::viz::WCloud::WCloud(cv::InputArray cloud, cv::InputArray colors, cv::InputAr
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
VtkUtils::SetInputData(mapper, cloud_source->GetOutput());
mapper->SetScalarModeToUsePointData();
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->SetScalarRange(0, 255);
mapper->ScalarVisibilityOn();
@@ -117,7 +119,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud)
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput()));
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->ScalarVisibilityOn();
mapper->SetColorModeToMapScalars();
@@ -143,7 +147,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud, const Point3d& p1, const
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput()));
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->ScalarVisibilityOn();
mapper->SetColorModeToMapScalars();
@@ -182,7 +188,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud, const Point3d& p1, const
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput()));
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->ScalarVisibilityOn();
mapper->SetColorModeToMapScalars();
mapper->SetLookupTable(color_transfer);
@@ -211,7 +219,9 @@ cv::viz::WCloudCollection::WCloudCollection()
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(append_filter->GetOutputPort());
mapper->SetScalarModeToUsePointData();
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->SetScalarRange(0, 255);
mapper->ScalarVisibilityOn();
@@ -416,7 +426,9 @@ cv::viz::WMesh::WMesh(const Mesh &mesh)
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetScalarModeToUsePointData();
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
VtkUtils::SetInputData(mapper, polydata);
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
@@ -468,7 +480,9 @@ cv::viz::WWidgetMerger::WWidgetMerger()
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(append_filter->GetOutputPort());
mapper->SetScalarModeToUsePointData();
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
mapper->SetScalarRange(0, 255);
mapper->ScalarVisibilityOn();
diff --git a/modules/viz/src/widget.cpp b/modules/viz/src/widget.cpp
index 0473c274bc..b324a4e26c 100644
--- a/modules/viz/src/widget.cpp
+++ b/modules/viz/src/widget.cpp
@@ -91,7 +91,9 @@ cv::viz::Widget cv::viz::Widget::fromPlyFile(const String &file_name)
vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();
mapper->SetInputConnection( reader->GetOutputPort() );
+#if VTK_MAJOR_VERSION < 8
mapper->ImmediateModeRenderingOff();
+#endif
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->GetProperty()->SetInterpolationToFlat();
@@ -113,7 +115,11 @@ void cv::viz::Widget::setRenderingProperty(int property, double value)
case POINT_SIZE: actor->GetProperty()->SetPointSize(float(value)); break;
case OPACITY: actor->GetProperty()->SetOpacity(value); break;
case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break;
+#if VTK_MAJOR_VERSION < 8
case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break;
+#else
+ case IMMEDIATE_RENDERING: std::cerr << "this property has no effect" << std::endl; break;
+#endif
case AMBIENT: actor->GetProperty()->SetAmbient(float(value)); break;
case LIGHTING:
{
@@ -191,8 +197,11 @@ double cv::viz::Widget::getRenderingProperty(int property) const
case POINT_SIZE: value = actor->GetProperty()->GetPointSize(); break;
case OPACITY: value = actor->GetProperty()->GetOpacity(); break;
case LINE_WIDTH: value = actor->GetProperty()->GetLineWidth(); break;
+#if VTK_MAJOR_VERSION < 8
case IMMEDIATE_RENDERING: value = actor->GetMapper()->GetImmediateModeRendering(); break;
-
+#else
+ case IMMEDIATE_RENDERING: std::cerr << "this property has no effect" << std::endl; break;
+#endif
case FONT_SIZE:
{
vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor);

View File

@ -1,20 +0,0 @@
commit d810c73396ec7931addf3e7f75b17daf4e184bf4
Author: Adam Rankin <adam.rankin@gmail.com>
Date: Sun Mar 11 22:28:18 2018 -0400
Update precomp.hpp
Enabling build of visualization module when using VTK 9 (current HEAD of d5bbb9e99bbc6d11d2196c48bfd8f33508554551)
diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp
index 369db191d3..dc5a5db1ea 100644
--- a/modules/viz/src/precomp.hpp
+++ b/modules/viz/src/precomp.hpp
@@ -104,6 +104,7 @@
#include <vtkMath.h>
#include <vtkExtractEdges.h>
#include <vtkFrustumSource.h>
+#include <vtkTexture.h>
#include <vtkTextureMapToPlane.h>
#include <vtkPolyDataNormals.h>
#include <vtkAlgorithmOutput.h>

View File

@ -0,0 +1,14 @@
diff -ru a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
--- a/cmake/OpenCVFindLibsPerf.cmake 2019-04-06 16:43:23.000000000 -0500
+++ b/cmake/OpenCVFindLibsPerf.cmake 2021-11-26 18:35:50.606453927 -0600
@@ -62,9 +62,7 @@
PKG_CHECK_MODULES(CLP clp)
if(CLP_FOUND)
set(HAVE_CLP TRUE)
- if(NOT ${CLP_INCLUDE_DIRS} STREQUAL "")
- ocv_include_directories(${CLP_INCLUDE_DIRS})
- endif()
+ ocv_include_directories(${CLP_INCLUDE_DIRS})
link_directories(${CLP_LIBRARY_DIRS})
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CLP_LIBRARIES})
endif()

View File

@ -0,0 +1,9 @@
diff -ru a/opencv_contrib/modules/cvv/CMakeLists.txt b/opencv_contrib/modules/cvv/CMakeLists.txt
--- a/opencv_contrib/modules/cvv/CMakeLists.txt 2021-11-26 18:39:03.000000000 -0600
+++ b/opencv_contrib/modules/cvv/CMakeLists.txt 2021-11-26 18:57:51.215905427 -0600
@@ -1,4 +1,4 @@
-if(NOT HAVE_QT5)
+if(NOT HAVE_QT)
ocv_module_disable(cvv)
return()
endif()

View File

@ -0,0 +1,14 @@
diff -ru a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
--- a/cmake/OpenCVFindLibsPerf.cmake 2020-10-10 15:14:29.000000000 -0500
+++ b/cmake/OpenCVFindLibsPerf.cmake 2021-11-26 18:30:13.861053938 -0600
@@ -120,9 +120,7 @@
ocv_check_modules(CLP clp)
if(CLP_FOUND)
set(HAVE_CLP TRUE)
- if(NOT ${CLP_INCLUDE_DIRS} STREQUAL "")
- ocv_include_directories(${CLP_INCLUDE_DIRS})
- endif()
+ ocv_include_directories(${CLP_INCLUDE_DIRS})
list(APPEND OPENCV_LINKER_LIBS ${CLP_LIBRARIES})
endif()
endif()

View File

@ -0,0 +1,9 @@
diff -ru a/opencv_contrib/modules/cvv/CMakeLists.txt b/opencv_contrib/modules/cvv/CMakeLists.txt
--- a/opencv_contrib/modules/cvv/CMakeLists.txt 2021-11-21 21:42:44.000000000 -0600
+++ b/opencv_contrib/modules/cvv/CMakeLists.txt 2021-11-22 12:57:40.359680713 -0600
@@ -1,4 +1,4 @@
-if(NOT HAVE_QT5 OR NOT HAVE_CXX11)
+if(NOT HAVE_QT OR NOT HAVE_CXX11)
ocv_module_disable(cvv)
return()
endif()

View File

@ -0,0 +1,14 @@
diff -ru a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
--- a/cmake/OpenCVFindLibsPerf.cmake 2019-04-07 12:09:10.000000000 -0500
+++ b/cmake/OpenCVFindLibsPerf.cmake 2021-11-26 18:18:49.532203131 -0600
@@ -62,9 +62,7 @@
PKG_CHECK_MODULES(CLP clp)
if(CLP_FOUND)
set(HAVE_CLP TRUE)
- if(NOT ${CLP_INCLUDE_DIRS} STREQUAL "")
- ocv_include_directories(${CLP_INCLUDE_DIRS})
- endif()
+ ocv_include_directories(${CLP_INCLUDE_DIRS})
link_directories(${CLP_LIBRARY_DIRS})
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CLP_LIBRARIES})
endif()

View File

@ -0,0 +1,14 @@
diff -ru a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
--- a/cmake/OpenCVFindLibsPerf.cmake 2021-10-09 10:48:26.000000000 -0500
+++ b/cmake/OpenCVFindLibsPerf.cmake 2021-11-19 19:10:47.895667720 -0600
@@ -128,9 +128,7 @@
ocv_check_modules(CLP clp)
if(CLP_FOUND)
set(HAVE_CLP TRUE)
- if(NOT ${CLP_INCLUDE_DIRS} STREQUAL "")
- ocv_include_directories(${CLP_INCLUDE_DIRS})
- endif()
+ ocv_include_directories(${CLP_INCLUDE_DIRS})
list(APPEND OPENCV_LINKER_LIBS ${CLP_LIBRARIES})
endif()
endif()

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Openvslam(CMakePackage):
"""OpenVSLAM is a monocular, stereo, and RGBD visual SLAM system."""
homepage = "https://openvslam.readthedocs.io/"
git = "https://github.com/xdspacelab/openvslam.git"
version('master', branch='master')
# https://openvslam.readthedocs.io/en/master/installation.html
depends_on('cmake@3.1:', type='build')
depends_on('eigen@3.3.0:')
depends_on('g2o')
depends_on('dbow2@shinsumicco')
depends_on('yaml-cpp@0.6.0:')
depends_on('opencv@3.3.1:+core+imgcodecs+videoio+features2d+calib3d+highgui')
depends_on('pangolin')
patch('https://github.com/xdspacelab/openvslam/commit/eeb58880443700fd79688d9646fd633c42fa60eb.patch',
sha256='131159b0042300614d039ceb3538defe4d302b59dc748b02287fc8ff895e6bbd')
@run_after('install')
def post_install(self):
# https://github.com/xdspacelab/openvslam/issues/501
mkdir(self.prefix.bin)
with working_dir(self.build_directory):
install('run_*', self.prefix.bin)
install(join_path('lib*', 'libpangolin_viewer.*'), self.prefix.lib)