From e8eab8a9acd39b280a06ae8afc2e5e64bed88174 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 17 Oct 2019 11:10:18 +0200 Subject: [PATCH] Fix includes for opencv2 --- opencv-4.1.2-includes.patch | 24 ++++++++++++++++++++++++ opencv.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 opencv-4.1.2-includes.patch diff --git a/opencv-4.1.2-includes.patch b/opencv-4.1.2-includes.patch new file mode 100644 index 0000000..e69588c --- /dev/null +++ b/opencv-4.1.2-includes.patch @@ -0,0 +1,24 @@ +diff -up opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in +--- opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig 2019-10-10 00:53:14.000000000 +0200 ++++ opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in 2019-10-17 11:08:46.626400320 +0200 +@@ -106,7 +106,7 @@ set(OpenCV_SHARED @BUILD_SHARED_LIBS@) + set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@) + + set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@) +-set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@) ++set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@ @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@/opencv2) + + set(OpenCV_INCLUDE_DIRS "") + foreach(d ${__OpenCV_INCLUDE_DIRS}) +diff -up opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig opencv-4.1.2/cmake/templates/opencv-XXX.pc.in +--- opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig 2019-10-10 00:53:14.000000000 +0200 ++++ opencv-4.1.2/cmake/templates/opencv-XXX.pc.in 2019-10-17 11:04:11.486014573 +0200 +@@ -3,7 +3,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir_old=@includedir@/opencv ++includedir_old=@includedir@/opencv2 + includedir_new=@includedir@ + + Name: OpenCV diff --git a/opencv.spec b/opencv.spec index 28bfed5..30ac293 100644 --- a/opencv.spec +++ b/opencv.spec @@ -75,6 +75,7 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz Source3: face_landmark_model.dat.xz Patch0: opencv-4.1.0-install_3rdparty_licenses.patch +Patch1: opencv-4.1.2-includes.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -247,6 +248,7 @@ mkdir 3rdparty/ mv quirc/ 3rdparty/ %patch0 -p1 -b .install_3rdparty_licenses +%patch1 -p1 -b .inc2 pushd %{name}_contrib-%{version} popd