1 |
commit: 3ffcac2a5a87d307207a3e9a0ff1e571ade6593d |
2 |
Author: Ted Tanberry <ted.tanberry <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Dec 2 19:25:42 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 2 19:25:42 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3ffcac2a |
7 |
|
8 |
sci-libs/blas-reference: update pkg-config handling |
9 |
|
10 |
.../blas-reference/blas-reference-20151113.ebuild | 11 ++- |
11 |
.../files/lapack-fix-build-system.patch | 92 ++++++++++++++++++++++ |
12 |
2 files changed, 100 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/sci-libs/blas-reference/blas-reference-20151113.ebuild b/sci-libs/blas-reference/blas-reference-20151113.ebuild |
15 |
index e997988..d1d70b4 100644 |
16 |
--- a/sci-libs/blas-reference/blas-reference-20151113.ebuild |
17 |
+++ b/sci-libs/blas-reference/blas-reference-20151113.ebuild |
18 |
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python2_7 ) |
19 |
|
20 |
NUMERIC_MODULE_NAME="refblas" |
21 |
|
22 |
-inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs |
23 |
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs eutils |
24 |
|
25 |
LPN=lapack |
26 |
LPV=3.6.0 |
27 |
@@ -30,8 +30,13 @@ DEPEND="${RDEPEND} |
28 |
virtual/pkgconfig" |
29 |
|
30 |
S="${WORKDIR}/${LPN}-${LPV}" |
31 |
+PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" ) |
32 |
|
33 |
src_prepare() { |
34 |
+ # the lapack(e)/(c)blas build system is somewhat broken |
35 |
+ # with respect to its pkg-config files. |
36 |
+ epatch "${PATCHES[@]}" |
37 |
+ |
38 |
# rename library to avoid collision with other blas implementations |
39 |
# ${LIBNAME} and ${PROFNAME} are not defined here, they are in single |
40 |
# quotes in the following seds. They are later set by defining cmake |
41 |
@@ -42,8 +47,8 @@ src_prepare() { |
42 |
CMakeLists.txt \ |
43 |
BLAS/SRC/CMakeLists.txt || die |
44 |
sed -i \ |
45 |
- -e '/Name: /s:blas:${PROFNAME}:' \ |
46 |
- -e 's:-lblas:-l${LIBNAME}:g' \ |
47 |
+ -e '/Name: /s:blas:@PROFNAME@:' \ |
48 |
+ -e 's:-lblas:-l@LIBNAME@:g' \ |
49 |
BLAS/blas.pc.in || die |
50 |
sed -i \ |
51 |
-e 's:blas):${LIBNAME}):' \ |
52 |
|
53 |
diff --git a/sci-libs/blas-reference/files/lapack-fix-build-system.patch b/sci-libs/blas-reference/files/lapack-fix-build-system.patch |
54 |
new file mode 100644 |
55 |
index 0000000..8661709 |
56 |
--- /dev/null |
57 |
+++ b/sci-libs/blas-reference/files/lapack-fix-build-system.patch |
58 |
@@ -0,0 +1,92 @@ |
59 |
+--- lapack-3.6.0/BLAS/blas.pc.in |
60 |
++++ lapack-3.6.0/BLAS/blas.pc.in |
61 |
+@@ -1,5 +1,7 @@ |
62 |
+-prefix=@prefix@ |
63 |
+-libdir=@libdir@ |
64 |
++prefix=@CMAKE_INSTALL_PREFIX@ |
65 |
++exec_prefix=${prefix} |
66 |
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ |
67 |
++includedir=${prefix}/include |
68 |
+ |
69 |
+ Name: blas |
70 |
+ Description: Basic Linear Algebra Subprograms F77 reference implementations |
71 |
+--- lapack-3.6.0/BLAS/CMakeLists.txt |
72 |
++++ lapack-3.6.0/BLAS/CMakeLists.txt |
73 |
+@@ -2,7 +2,7 @@ |
74 |
+ if(BUILD_TESTING) |
75 |
+ add_subdirectory(TESTING) |
76 |
+ endif(BUILD_TESTING) |
77 |
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc) |
78 |
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY) |
79 |
+ install(FILES |
80 |
+ ${CMAKE_CURRENT_BINARY_DIR}/blas.pc |
81 |
+ DESTINATION ${PKG_CONFIG_DIR} |
82 |
+--- lapack-3.6.0/CBLAS/cblas.pc.in |
83 |
++++ lapack-3.6.0/CBLAS/cblas.pc.in |
84 |
+@@ -1,5 +1,7 @@ |
85 |
+-prefix=@prefix@ |
86 |
+-libdir=@libdir@ |
87 |
++prefix=@CMAKE_INSTALL_PREFIX@ |
88 |
++exec_prefix=${prefix} |
89 |
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ |
90 |
++includedir=${prefix}/include |
91 |
+ |
92 |
+ Name: lapacke |
93 |
+ Description: C Standard Interface to BLAS Linear Algebra PACKage |
94 |
+--- lapack-3.6.0/CBLAS/CMakeLists.txt |
95 |
++++ lapack-3.6.0/CBLAS/CMakeLists.txt |
96 |
+@@ -71,7 +71,7 @@ |
97 |
+ ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY) |
98 |
+ |
99 |
+ |
100 |
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc) |
101 |
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc @ONLY) |
102 |
+ install(FILES |
103 |
+ ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc |
104 |
+ DESTINATION ${PKG_CONFIG_DIR} |
105 |
+--- lapack-3.6.0/CMakeLists.txt |
106 |
++++ lapack-3.6.0/CMakeLists.txt |
107 |
+@@ -333,7 +333,7 @@ |
108 |
+ ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY) |
109 |
+ |
110 |
+ |
111 |
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc) |
112 |
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY) |
113 |
+ install(FILES |
114 |
+ ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc |
115 |
+ DESTINATION ${PKG_CONFIG_DIR} |
116 |
+--- lapack-3.6.0/LAPACKE/CMakeLists.txt |
117 |
++++ lapack-3.6.0/LAPACKE/CMakeLists.txt |
118 |
+@@ -65,7 +65,7 @@ |
119 |
+ endif(BUILD_TESTING) |
120 |
+ |
121 |
+ |
122 |
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc) |
123 |
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY) |
124 |
+ install(FILES |
125 |
+ ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc |
126 |
+ DESTINATION ${PKG_CONFIG_DIR} |
127 |
+--- lapack-3.6.0/LAPACKE/lapacke.pc.in |
128 |
++++ lapack-3.6.0/LAPACKE/lapacke.pc.in |
129 |
+@@ -1,5 +1,7 @@ |
130 |
+-prefix=@prefix@ |
131 |
+-libdir=@libdir@ |
132 |
++prefix=@CMAKE_INSTALL_PREFIX@ |
133 |
++exec_prefix=${prefix} |
134 |
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ |
135 |
++includedir=${prefix}/include |
136 |
+ |
137 |
+ Name: lapacke |
138 |
+ Description: C Standard Interface to LAPACK Linear Algebra PACKage |
139 |
+--- lapack-3.6.0/lapack.pc.in |
140 |
++++ lapack-3.6.0/lapack.pc.in |
141 |
+@@ -1,5 +1,7 @@ |
142 |
+-prefix=@prefix@ |
143 |
+-libdir=@libdir@ |
144 |
++prefix=@CMAKE_INSTALL_PREFIX@ |
145 |
++exec_prefix=${prefix} |
146 |
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ |
147 |
++includedir=${prefix}/include |
148 |
+ |
149 |
+ Name: lapack |
150 |
+ Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage |