1 |
commit: f8cc16d8d29ac37adc78c77d28956ce1bd20cd80 |
2 |
Author: Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de> |
3 |
AuthorDate: Mon Dec 28 14:08:16 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 29 01:54:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8cc16d8 |
7 |
|
8 |
sci-libs/libgeodecomp: Fix build with OpenCV enabled |
9 |
|
10 |
Closes: https://bugs.gentoo.org/762196 |
11 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
12 |
Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/18850 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
.../libgeodecomp-0.5.0_pre20201009-opencv.patch | 186 +++++++++++++++++++++ |
17 |
.../libgeodecomp-0.5.0_pre20201009.ebuild | 5 +- |
18 |
2 files changed, 190 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch b/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..0a063281249 |
23 |
--- /dev/null |
24 |
+++ b/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch |
25 |
@@ -0,0 +1,186 @@ |
26 |
+From 3a20ca303ccc8d9d7cfd9787b392f1436d266243 Mon Sep 17 00:00:00 2001 |
27 |
+From: Kurt Kanzenbach <kurt@×××××××××××××.de> |
28 |
+Date: Mon, 28 Dec 2020 15:03:16 +0100 |
29 |
+Subject: [PATCH] cmake: Fix build with OpenCV |
30 |
+ |
31 |
+The FindOpenCV module assumes that OpenCV in installed into a separate |
32 |
+directory which makes sense for cluster machines etc. |
33 |
+ |
34 |
+However, on Gentoo OpenCV is installed by portage and the corresponding Cmake |
35 |
+module can be used directly. |
36 |
+ |
37 |
+Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de> |
38 |
+--- |
39 |
+ CMakeModules/FindOpenCV.cmake | 160 ---------------------------------- |
40 |
+ 1 file changed, 160 deletions(-) |
41 |
+ delete mode 100644 CMakeModules/FindOpenCV.cmake |
42 |
+ |
43 |
+diff --git a/CMakeModules/FindOpenCV.cmake b/CMakeModules/FindOpenCV.cmake |
44 |
+deleted file mode 100644 |
45 |
+index 68d629da5a4d..000000000000 |
46 |
+--- a/CMakeModules/FindOpenCV.cmake |
47 |
++++ /dev/null |
48 |
+@@ -1,160 +0,0 @@ |
49 |
+-########################################################### |
50 |
+-# Find OpenCV Library |
51 |
+-# See http://sourceforge.net/projects/opencvlibrary/ |
52 |
+-#---------------------------------------------------------- |
53 |
+-# |
54 |
+-## 1: Setup: |
55 |
+-# The following variables are optionally searched for defaults |
56 |
+-# OpenCV_DIR: Base directory of OpenCv tree to use. |
57 |
+-# |
58 |
+-## 2: Variable |
59 |
+-# The following are set after configuration is done: |
60 |
+-# |
61 |
+-# OpenCV_FOUND |
62 |
+-# OpenCV_LIBS |
63 |
+-# OpenCV_INCLUDE_DIR |
64 |
+-# OpenCV_VERSION (OpenCV_VERSION_MAJOR, OpenCV_VERSION_MINOR, OpenCV_VERSION_PATCH) |
65 |
+-# |
66 |
+-# |
67 |
+-# Deprecated variable are used to maintain backward compatibility with |
68 |
+-# the script of Jan Woetzel (2006/09): www.mip.informatik.uni-kiel.de/~jw |
69 |
+-# OpenCV_INCLUDE_DIRS |
70 |
+-# OpenCV_LIBRARIES |
71 |
+-# OpenCV_LINK_DIRECTORIES |
72 |
+-# |
73 |
+-## 3: Version |
74 |
+-# |
75 |
+-# 2010/04/07 Benoit Rat, Correct a bug when OpenCVConfig.cmake is not found. |
76 |
+-# 2010/03/24 Benoit Rat, Add compatibility for when OpenCVConfig.cmake is not found. |
77 |
+-# 2010/03/22 Benoit Rat, Creation of the script. |
78 |
+-# |
79 |
+-# |
80 |
+-# tested with: |
81 |
+-# - OpenCV 2.1: MinGW, MSVC2008 |
82 |
+-# - OpenCV 2.0: MinGW, MSVC2008, GCC4 |
83 |
+-# |
84 |
+-# |
85 |
+-## 4: Licence: |
86 |
+-# |
87 |
+-# LGPL 2.1 : GNU Lesser General Public License Usage |
88 |
+-# Alternatively, this file may be used under the terms of the GNU Lesser |
89 |
+- |
90 |
+-# General Public License version 2.1 as published by the Free Software |
91 |
+-# Foundation and appearing in the file LICENSE.LGPL included in the |
92 |
+-# packaging of this file. Please review the following information to |
93 |
+-# ensure the GNU Lesser General Public License version 2.1 requirements |
94 |
+-# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
95 |
+-# |
96 |
+-#---------------------------------------------------------- |
97 |
+- |
98 |
+- |
99 |
+-find_path(OpenCV_DIR "OpenCVConfig.cmake" /usr/share/OpenCV DOC "Root directory of OpenCV") |
100 |
+- |
101 |
+-##==================================================== |
102 |
+-## Find OpenCV libraries |
103 |
+-##---------------------------------------------------- |
104 |
+-if(EXISTS "${OpenCV_DIR}") |
105 |
+- |
106 |
+- #When its possible to use the Config script use it. |
107 |
+- if(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") |
108 |
+- |
109 |
+- ## Include the standard CMake script |
110 |
+- include("${OpenCV_DIR}/OpenCVConfig.cmake") |
111 |
+- |
112 |
+- ## Search for a specific version |
113 |
+- set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") |
114 |
+- |
115 |
+- #Otherwise it try to guess it. |
116 |
+- else(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") |
117 |
+- |
118 |
+- set(OPENCV_LIB_COMPONENTS cxcore cv ml highgui cvaux) |
119 |
+- find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "") |
120 |
+- if(EXISTS ${OpenCV_INCLUDE_DIR}) |
121 |
+- include_directories(${OpenCV_INCLUDE_DIR}) |
122 |
+- endif(EXISTS ${OpenCV_INCLUDE_DIR}) |
123 |
+- |
124 |
+- #Find OpenCV version by looking at cvver.h |
125 |
+- file(STRINGS ${OpenCV_INCLUDE_DIR}/cvver.h OpenCV_VERSIONS_TMP REGEX "^#define CV_[A-Z]+_VERSION[ \t]+[0-9]+$") |
126 |
+- string(REGEX REPLACE ".*#define CV_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MAJOR ${OpenCV_VERSIONS_TMP}) |
127 |
+- string(REGEX REPLACE ".*#define CV_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MINOR ${OpenCV_VERSIONS_TMP}) |
128 |
+- string(REGEX REPLACE ".*#define CV_SUBMINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_PATCH ${OpenCV_VERSIONS_TMP}) |
129 |
+- set(OpenCV_VERSION ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH} CACHE STRING "" FORCE) |
130 |
+- set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") |
131 |
+- |
132 |
+- endif(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") |
133 |
+- |
134 |
+- |
135 |
+- |
136 |
+- |
137 |
+- ## Initiate the variable before the loop |
138 |
+- set(GLOBAL OpenCV_LIBS "") |
139 |
+- set(OpenCV_FOUND_TMP true) |
140 |
+- |
141 |
+- ## Loop over each components |
142 |
+- foreach(__CVLIB ${OPENCV_LIB_COMPONENTS}) |
143 |
+- |
144 |
+- find_library(OpenCV_${__CVLIB}_LIBRARY_DEBUG NAMES "${__CVLIB}${CVLIB_SUFFIX}d" "lib${__CVLIB}${CVLIB_SUFFIX}d" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) |
145 |
+- find_library(OpenCV_${__CVLIB}_LIBRARY_RELEASE NAMES "${__CVLIB}${CVLIB_SUFFIX}" "lib${__CVLIB}${CVLIB_SUFFIX}" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) |
146 |
+- |
147 |
+- #Remove the cache value |
148 |
+- set(OpenCV_${__CVLIB}_LIBRARY "" CACHE STRING "" FORCE) |
149 |
+- |
150 |
+- #both debug/release |
151 |
+- if(OpenCV_${__CVLIB}_LIBRARY_DEBUG AND OpenCV_${__CVLIB}_LIBRARY_RELEASE) |
152 |
+- set(OpenCV_${__CVLIB}_LIBRARY debug ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} optimized ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) |
153 |
+- #only debug |
154 |
+- elseif(OpenCV_${__CVLIB}_LIBRARY_DEBUG) |
155 |
+- set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} CACHE STRING "" FORCE) |
156 |
+- #only release |
157 |
+- elseif(OpenCV_${__CVLIB}_LIBRARY_RELEASE) |
158 |
+- set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) |
159 |
+- #no library found |
160 |
+- else() |
161 |
+- set(OpenCV_FOUND_TMP false) |
162 |
+- endif() |
163 |
+- |
164 |
+- #Add to the general list |
165 |
+- if(OpenCV_${__CVLIB}_LIBRARY) |
166 |
+- set(OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_${__CVLIB}_LIBRARY}) |
167 |
+- endif(OpenCV_${__CVLIB}_LIBRARY) |
168 |
+- |
169 |
+- endforeach(__CVLIB) |
170 |
+- |
171 |
+- |
172 |
+- set(OpenCV_FOUND ${OpenCV_FOUND_TMP} CACHE BOOL "" FORCE) |
173 |
+- |
174 |
+- |
175 |
+-else(EXISTS "${OpenCV_DIR}") |
176 |
+- set(ERR_MSG "Please specify OpenCV directory using OpenCV_DIR env. variable") |
177 |
+-endif(EXISTS "${OpenCV_DIR}") |
178 |
+-##==================================================== |
179 |
+- |
180 |
+- |
181 |
+-##==================================================== |
182 |
+-## Print message |
183 |
+-##---------------------------------------------------- |
184 |
+-if(NOT OpenCV_FOUND) |
185 |
+- # make FIND_PACKAGE friendly |
186 |
+- if(NOT OpenCV_FIND_QUIETLY) |
187 |
+- if(OpenCV_FIND_REQUIRED) |
188 |
+- message(FATAL_ERROR "OpenCV required but some headers or libs not found. ${ERR_MSG}") |
189 |
+- else(OpenCV_FIND_REQUIRED) |
190 |
+- message(STATUS "WARNING: OpenCV was not found. ${ERR_MSG}") |
191 |
+- endif(OpenCV_FIND_REQUIRED) |
192 |
+- endif(NOT OpenCV_FIND_QUIETLY) |
193 |
+-endif(NOT OpenCV_FOUND) |
194 |
+-##==================================================== |
195 |
+- |
196 |
+- |
197 |
+-##==================================================== |
198 |
+-## Backward compatibility |
199 |
+-##---------------------------------------------------- |
200 |
+-if(OpenCV_FOUND) |
201 |
+- option(OpenCV_BACKWARD_COMPA "Add some variable to make this script compatible with the other version of FindOpenCV.cmake" false) |
202 |
+- if(OpenCV_BACKWARD_COMPA) |
203 |
+- find_path(OpenCV_INCLUDE_DIRS "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") |
204 |
+- find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") |
205 |
+- set(OpenCV_LIBRARIES "${OpenCV_LIBS}" CACHE STRING "" FORCE) |
206 |
+- endif(OpenCV_BACKWARD_COMPA) |
207 |
+-endif(OpenCV_FOUND) |
208 |
+-##==================================================== |
209 |
+-- |
210 |
+2.26.2 |
211 |
+ |
212 |
|
213 |
diff --git a/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild b/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild |
214 |
index 70aa2285270..3b63da93513 100644 |
215 |
--- a/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild |
216 |
+++ b/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild |
217 |
@@ -42,7 +42,10 @@ DEPEND="${RDEPEND} |
218 |
|
219 |
S="${WORKDIR}/libgeodecomp-${MY_COMMIT}" |
220 |
|
221 |
-PATCHES=( "${FILESDIR}/${P}-mpi.patch" ) |
222 |
+PATCHES=( |
223 |
+ "${FILESDIR}/${P}-mpi.patch" |
224 |
+ "${FILESDIR}/${P}-opencv.patch" |
225 |
+) |
226 |
|
227 |
DOCS=( README ) |