commit fbba7aaa5c4d61b3b1bc353dc7c895522f432851
Author: Jan RÄ™korajski <[email protected]>
Date:   Fri Mar 11 21:20:40 2022 +0100

    - update deps and fix build with latest ogre

 ogre2.patch | 29 +++++++++++++++++++++++++++++
 opencv.spec | 17 ++++++++++++++---
 2 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/opencv.spec b/opencv.spec
index 31ed1fd..7576051 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -60,7 +60,7 @@ Summary:      A library of programming functions mainly aimed 
at real time computer v
 Summary(pl.UTF-8):     Biblioteka funkcji do grafiki komputerowej w czasie 
rzeczywistym
 Name:          opencv
 Version:       4.5.1
-Release:       7
+Release:       7.1
 Epoch:         1
 %if %{with unicap} || %{with xine}
 License:       GPL (enforced by used libraries), BSD (opencv itself)
@@ -107,12 +107,16 @@ Patch1:           python-install.patch
 Patch2:                pkgconfig-paths.patch
 Patch3:                no-cxx-in-c-header.patch
 Patch4:                gcc11.patch
+Patch5:                ogre2.patch
 URL:           http://www.opencv.org/
 %{?with_pvapi:BuildRequires:   AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:  OpenCL-devel}
 BuildRequires: OpenEXR-devel
 %{?with_opengl:BuildRequires:  OpenGL-GLU-devel}
-%{?with_opengl:BuildRequires:  OpenGL-devel}
+%if %{with opengl}
+BuildRequires: OpenGL-devel
+BuildRequires: libglvnd-libGL-devel
+%endif
 # as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, 
but the result is not used
 %{?with_openni:BuildRequires:  OpenNI-devel}
 %{?with_ximea:BuildRequires:   XIMEA-devel >= 4}
@@ -133,7 +137,10 @@ BuildRequires:     gstreamer-devel >= 1.0
 BuildRequires: gstreamer-plugins-base-devel >= 1.0
 %endif
 BuildRequires: jasper-devel
-%{?with_java:BuildRequires:    jdk}
+%if %{with java}
+BuildRequires: jdk
+BuildRequires: java-xerces
+%endif
 BuildRequires: khrplatform-devel
 BuildRequires: libdc1394-devel >= 2
 %{?with_openmp:BuildRequires:  libgomp-devel}
@@ -353,6 +360,9 @@ done
 cache_file %{SOURCE30} data
 cache_file %{SOURCE40} ade
 
+cd opencv_contrib-%{version}
+%patch5 -p1
+
 %build
 mkdir -p build
 cd build
@@ -370,6 +380,7 @@ fi
 
 %cmake .. \
        $ccache \
+       -DOpenGL_GL_PREFERENCE=GLVND \
        -DENABLE_PRECOMPILED_HEADERS=OFF \
        -DOPENCV_LIB_INSTALL_PATH=%{_libdir} \
        -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \
diff --git a/ogre2.patch b/ogre2.patch
new file mode 100644
index 0000000..c68e9e8
--- /dev/null
+++ b/ogre2.patch
@@ -0,0 +1,29 @@
+From c7b27f8e77e673aa2cb2b9be69f908c464ab5d91 Mon Sep 17 00:00:00 2001
+From: Pavel Rojtberg <[email protected]>
+Date: Mon, 10 May 2021 20:23:46 +0200
+Subject: [PATCH] ovis: allow using OGRE devel
+
+only compatible versions support CMake CONFIG mode.
+Use that to make check more robust.
+---
+ modules/ovis/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/ovis/CMakeLists.txt b/modules/ovis/CMakeLists.txt
+index dc190da980b..912b86a590d 100644
+--- a/modules/ovis/CMakeLists.txt
++++ b/modules/ovis/CMakeLists.txt
+@@ -1,11 +1,11 @@
+ set(the_description "OGRE 3D Visualiser.")
+ 
+-find_package(OGRE QUIET)
++find_package(OGRE QUIET CONFIG)
+ 
+ if(NOT OGRE_FOUND)
+   message(STATUS "Module opencv_ovis disabled because OGRE3D was not found")
+   ocv_module_disable(ovis)
+-elseif(OGRE_VERSION VERSION_LESS 1.11.5 OR OGRE_VERSION VERSION_GREATER 2.0)
++elseif(OGRE_VERSION VERSION_LESS 1.11.5)
+   message(STATUS "Module opencv_ovis disabled because of incompatible OGRE3D 
version (${OGRE_VERSION})")
+   ocv_module_disable(ovis)
+ else() # we need C++11 for OGRE 1.11
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/fbba7aaa5c4d61b3b1bc353dc7c895522f432851

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to