1 |
johu 14/07/27 11:55:54 |
2 |
|
3 |
Added: cmake-3.0.0-FindBoost-python.patch |
4 |
cmake-3.0.0-FindBLAS.patch |
5 |
cmake-3.0.0-prefix-dirs.patch |
6 |
cmake-3.0.0-FindLAPACK.patch |
7 |
Log: |
8 |
Version bump by Michael Palimaka <kensington@g.o>, bug #513682. |
9 |
|
10 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: cmake-3.0.0-FindBoost-python.patch |
19 |
=================================================================== |
20 |
From 934ec9add33d413e4d5c9cec1cb3ebb5cbfd81f4 Mon Sep 17 00:00:00 2001 |
21 |
From: Michael Palimaka <kensington@g.o> |
22 |
Date: Thu, 19 Jun 2014 00:17:48 +1000 |
23 |
Subject: [PATCH] Fix detection of PYTHON_ABI-versioned Boost Python libraries |
24 |
wrt bug #400969. |
25 |
|
26 |
--- |
27 |
Modules/FindBoost.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ |
28 |
1 file changed, 41 insertions(+) |
29 |
|
30 |
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake |
31 |
index dfd4460..70bfb4f 100644 |
32 |
--- a/Modules/FindBoost.cmake |
33 |
+++ b/Modules/FindBoost.cmake |
34 |
@@ -952,6 +952,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) |
35 |
set( _boost_docstring_release "Boost ${COMPONENT} library (release)") |
36 |
set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)") |
37 |
|
38 |
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") |
39 |
+ # Get version of Python. |
40 |
+ if (NOT PYTHON_EXECUTABLE) |
41 |
+ #if a certain version of python was detected by cmake before use that one |
42 |
+ set(PYTHON_EXECUTABLE "python") |
43 |
+ endif (NOT PYTHON_EXECUTABLE) |
44 |
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version) |
45 |
+ endif() |
46 |
+ |
47 |
# Compute component-specific hints. |
48 |
set(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT "") |
49 |
if(${COMPONENT} STREQUAL "mpi" OR ${COMPONENT} STREQUAL "mpi_python" OR |
50 |
@@ -984,6 +993,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) |
51 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} |
52 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} |
53 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) |
54 |
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") |
55 |
+ list(APPEND _boost_RELEASE_NAMES |
56 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} |
57 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} |
58 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} |
59 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} |
60 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} ) |
61 |
+ endif() |
62 |
+ |
63 |
if(_boost_STATIC_RUNTIME_WORKAROUND) |
64 |
set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") |
65 |
list(APPEND _boost_RELEASE_NAMES |
66 |
@@ -991,6 +1009,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) |
67 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} |
68 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
69 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) |
70 |
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") |
71 |
+ list(APPEND _boost_RELEASE_NAMES |
72 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
73 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} |
74 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
75 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) |
76 |
+ endif() |
77 |
endif() |
78 |
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") |
79 |
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES}) |
80 |
@@ -1020,6 +1045,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) |
81 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} |
82 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED} |
83 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) |
84 |
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") |
85 |
+ list(APPEND _boost_DEBUG_NAMES |
86 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} |
87 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} |
88 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} |
89 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} |
90 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED} |
91 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} ) |
92 |
+ endif() |
93 |
if(_boost_STATIC_RUNTIME_WORKAROUND) |
94 |
set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") |
95 |
list(APPEND _boost_DEBUG_NAMES |
96 |
@@ -1027,6 +1061,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) |
97 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} |
98 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
99 |
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) |
100 |
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") |
101 |
+ list(APPEND _boost_DEBUG_NAMES |
102 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
103 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} |
104 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
105 |
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) |
106 |
+ endif() |
107 |
endif() |
108 |
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") |
109 |
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES}) |
110 |
-- |
111 |
1.8.5.5 |
112 |
|
113 |
|
114 |
|
115 |
|
116 |
1.1 dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch |
117 |
|
118 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch?rev=1.1&view=markup |
119 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch?rev=1.1&content-type=text/plain |
120 |
|
121 |
Index: cmake-3.0.0-FindBLAS.patch |
122 |
=================================================================== |
123 |
--- Modules/FindBLAS.cmake |
124 |
+++ Modules/FindBLAS.cmake |
125 |
@@ -4,6 +4,10 @@ |
126 |
# |
127 |
# Find BLAS library |
128 |
# |
129 |
+# Version modified for Gentoo Linux. |
130 |
+# If a valid PkgConfig configuration is found, this overrides and cancels |
131 |
+# all further checks. |
132 |
+# |
133 |
# This module finds an installed fortran library that implements the |
134 |
# BLAS linear-algebra interface (see http://www.netlib.org/blas/). The |
135 |
# list of libraries searched for is taken from the autoconf macro file, |
136 |
@@ -50,6 +54,23 @@ |
137 |
# (To distribute this file outside of CMake, substitute the full |
138 |
# License text for the above reference.) |
139 |
|
140 |
+# first, try PkgConfig |
141 |
+# |
142 |
+find_package(PkgConfig REQUIRED) |
143 |
+pkg_check_modules(PC_BLAS blas) |
144 |
+if(PC_BLAS_FOUND) |
145 |
+ foreach(PC_LIB ${PC_BLAS_LIBRARIES}) |
146 |
+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_BLAS_LIBRARY_DIRS} ) |
147 |
+ if (NOT ${PC_LIB}_LIBRARY) |
148 |
+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_BLAS_LIBRARY_DIRS}") |
149 |
+ endif (NOT ${PC_LIB}_LIBRARY) |
150 |
+ list(APPEND BLAS_LIBRARIES ${${PC_LIB}_LIBRARY}) |
151 |
+ endforeach(PC_LIB) |
152 |
+ find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARIES) |
153 |
+ mark_as_advanced(BLAS_LIBRARIES) |
154 |
+else(PC_BLAS_FOUND) |
155 |
+message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.") |
156 |
+ |
157 |
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) |
158 |
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) |
159 |
|
160 |
@@ -688,3 +709,5 @@ |
161 |
endif() |
162 |
|
163 |
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) |
164 |
+ |
165 |
+endif(PC_BLAS_FOUND) |
166 |
|
167 |
|
168 |
|
169 |
1.1 dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch |
170 |
|
171 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch?rev=1.1&view=markup |
172 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch?rev=1.1&content-type=text/plain |
173 |
|
174 |
Index: cmake-3.0.0-prefix-dirs.patch |
175 |
=================================================================== |
176 |
From e7ce3e523f8cfa1bc749118f381753230766827f Mon Sep 17 00:00:00 2001 |
177 |
From: Michael Palimaka <kensington@g.o> |
178 |
Date: Thu, 19 Jun 2014 00:08:13 +1000 |
179 |
Subject: [PATCH] Set some proper paths to make cmake find our tools. |
180 |
|
181 |
The ebuild now adds an extra / at the end of $EPREFIX so that it is |
182 |
never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains |
183 |
correct) |
184 |
|
185 |
Original patch by Heiko Przybyl. |
186 |
Updated by Chris Reffett (cmake-2.8.8) |
187 |
Updated by Johannes Huber (cmake-2.8.9) |
188 |
Updated by Michael Palimaka (cmake-2.8.10) |
189 |
Updated by Chris Reffett (cmake-2.8.11) |
190 |
Updated by Michael Palimaka (cmake-3.0.0) |
191 |
--- |
192 |
Modules/Platform/Darwin.cmake | 12 +++++++---- |
193 |
Modules/Platform/UnixPaths.cmake | 43 ++++++++++++++++++++-------------------- |
194 |
2 files changed, 29 insertions(+), 26 deletions(-) |
195 |
|
196 |
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake |
197 |
index e25df1e..9b22a6a 100644 |
198 |
--- a/Modules/Platform/Darwin.cmake |
199 |
+++ b/Modules/Platform/Darwin.cmake |
200 |
@@ -132,9 +132,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) |
201 |
set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) |
202 |
set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) |
203 |
|
204 |
-# default to searching for frameworks first |
205 |
+# default to searching for frameworks last |
206 |
if(NOT DEFINED CMAKE_FIND_FRAMEWORK) |
207 |
- set(CMAKE_FIND_FRAMEWORK FIRST) |
208 |
+ set(CMAKE_FIND_FRAMEWORK LAST) |
209 |
endif() |
210 |
|
211 |
# Older OS X linkers do not report their framework search path |
212 |
@@ -156,6 +156,8 @@ endif() |
213 |
|
214 |
# set up the default search directories for frameworks |
215 |
set(CMAKE_SYSTEM_FRAMEWORK_PATH |
216 |
+ @GENTOO_PORTAGE_EPREFIX@Frameworks |
217 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib |
218 |
~/Library/Frameworks |
219 |
) |
220 |
if(_CMAKE_OSX_SYSROOT_PATH) |
221 |
@@ -187,13 +189,15 @@ if(CMAKE_OSX_SYSROOT) |
222 |
endif() |
223 |
endif() |
224 |
|
225 |
-# default to searching for application bundles first |
226 |
+# default to searching for application bundles last |
227 |
if(NOT DEFINED CMAKE_FIND_APPBUNDLE) |
228 |
- set(CMAKE_FIND_APPBUNDLE FIRST) |
229 |
+ set(CMAKE_FIND_APPBUNDLE LAST) |
230 |
endif() |
231 |
# set up the default search directories for application bundles |
232 |
set(_apps_paths) |
233 |
foreach(_path |
234 |
+ @GENTOO_PORTAGE_EPREFIX@Applications |
235 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin |
236 |
"~/Applications" |
237 |
"/Applications" |
238 |
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ |
239 |
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake |
240 |
index 20ee1d1..3481ca8 100644 |
241 |
--- a/Modules/Platform/UnixPaths.cmake |
242 |
+++ b/Modules/Platform/UnixPaths.cmake |
243 |
@@ -33,6 +33,7 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) |
244 |
# search types. |
245 |
list(APPEND CMAKE_SYSTEM_PREFIX_PATH |
246 |
# Standard |
247 |
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ |
248 |
/usr/local /usr / |
249 |
|
250 |
# CMake install location |
251 |
@@ -53,43 +54,41 @@ endif() |
252 |
|
253 |
# List common include file locations not under the common prefixes. |
254 |
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH |
255 |
- # Windows API on Cygwin |
256 |
- /usr/include/w32api |
257 |
- |
258 |
- # X11 |
259 |
- /usr/X11R6/include /usr/include/X11 |
260 |
- |
261 |
- # Other |
262 |
- /usr/pkg/include |
263 |
- /opt/csw/include /opt/include |
264 |
- /usr/openwin/include |
265 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include |
266 |
) |
267 |
|
268 |
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH |
269 |
- # Windows API on Cygwin |
270 |
- /usr/lib/w32api |
271 |
- |
272 |
- # X11 |
273 |
- /usr/X11R6/lib /usr/lib/X11 |
274 |
- |
275 |
- # Other |
276 |
- /usr/pkg/lib |
277 |
- /opt/csw/lib /opt/lib |
278 |
- /usr/openwin/lib |
279 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc |
280 |
+ @GENTOO_PORTAGE_GCCLIBDIR@ |
281 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64 |
282 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32 |
283 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32 |
284 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib |
285 |
+ @GENTOO_PORTAGE_EPREFIX@lib |
286 |
) |
287 |
|
288 |
list(APPEND CMAKE_SYSTEM_PROGRAM_PATH |
289 |
- /usr/pkg/bin |
290 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin |
291 |
+ @GENTOO_PORTAGE_EPREFIX@bin |
292 |
) |
293 |
|
294 |
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES |
295 |
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 |
296 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc |
297 |
+ @GENTOO_PORTAGE_GCCLIBDIR@ |
298 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64 |
299 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32 |
300 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32 |
301 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib |
302 |
+ @GENTOO_PORTAGE_EPREFIX@lib |
303 |
+ /lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 |
304 |
) |
305 |
|
306 |
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES |
307 |
+ GENTOO_PORTAGE_EPREFIX@usr/include |
308 |
/usr/include |
309 |
) |
310 |
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES |
311 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include |
312 |
/usr/include |
313 |
) |
314 |
|
315 |
-- |
316 |
1.8.5.5 |
317 |
|
318 |
|
319 |
|
320 |
|
321 |
1.1 dev-util/cmake/files/cmake-3.0.0-FindLAPACK.patch |
322 |
|
323 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindLAPACK.patch?rev=1.1&view=markup |
324 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-3.0.0-FindLAPACK.patch?rev=1.1&content-type=text/plain |
325 |
|
326 |
Index: cmake-3.0.0-FindLAPACK.patch |
327 |
=================================================================== |
328 |
--- Modules/FindLAPACK.cmake |
329 |
+++ Modules/FindLAPACK.cmake |
330 |
@@ -4,6 +4,10 @@ |
331 |
# |
332 |
# Find LAPACK library |
333 |
# |
334 |
+# Version modified for Gentoo Linux. |
335 |
+# If a valid PkgConfig configuration is found, this overrides and cancels |
336 |
+# all further checks. |
337 |
+# |
338 |
# This module finds an installed fortran library that implements the |
339 |
# LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). |
340 |
# |
341 |
@@ -72,6 +76,24 @@ |
342 |
# N.B. _prefix is the prefix applied to the names of all cached variables that |
343 |
# are generated internally and marked advanced by this macro. |
344 |
|
345 |
+# |
346 |
+# first, try PkgConfig |
347 |
+# |
348 |
+find_package(PkgConfig REQUIRED) |
349 |
+pkg_check_modules(PC_LAPACK lapack) |
350 |
+if(PC_LAPACK_FOUND) |
351 |
+ foreach(PC_LIB ${PC_LAPACK_LIBRARIES}) |
352 |
+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} ) |
353 |
+ if (NOT ${PC_LIB}_LIBRARY) |
354 |
+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}") |
355 |
+ endif (NOT ${PC_LIB}_LIBRARY) |
356 |
+ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY}) |
357 |
+ endforeach(PC_LIB) |
358 |
+ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES) |
359 |
+ mark_as_advanced(LAPACK_LIBRARIES) |
360 |
+else(PC_LAPACK_FOUND) |
361 |
+message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.") |
362 |
+ |
363 |
set(_libraries_work TRUE) |
364 |
set(${LIBRARIES}) |
365 |
set(_combined_name) |
366 |
@@ -348,3 +370,5 @@ |
367 |
endif() |
368 |
|
369 |
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) |
370 |
+ |
371 |
+endif(PC_LAPACK_FOUND) |