Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/clblas/, sci-libs/clblas/files/
Date: Tue, 29 Dec 2020 12:57:43
Message-Id: 1609246645.184456970fa09df86d419c48020fdad2b5b3911a.soap@gentoo
1 commit: 184456970fa09df86d419c48020fdad2b5b3911a
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 29 12:57:25 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 29 12:57:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18445697
7
8 sci-libs/clblas: Version bump to 2.12
9
10 Bug: https://bugs.gentoo.org/608086
11 Bug: https://bugs.gentoo.org/741386
12 Bug: https://bugs.gentoo.org/737410
13 Package-Manager: Portage-3.0.12, Repoman-3.0.2
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 sci-libs/clblas/Manifest | 1 +
17 sci-libs/clblas/clblas-2.12.ebuild | 82 ++++++++++++++++++++++
18 ....12-Detect-CBLAS-when-building-the-client.patch | 24 +++++++
19 .../clblas-2.12-disable-multilib-cflags.patch | 26 +++++++
20 .../files/clblas-2.12-fix-doxygen-output-dir.patch | 16 +++++
21 .../files/clblas-2.12-fix-pthread-linkage.patch | 18 +++++
22 .../files/clblas-2.12-reproducible-build.patch | 17 +++++
23 .../files/clblas-2.12-use-boost-dynamic-libs.patch | 16 +++++
24 .../files/clblas-2.12-use-system-mathjax.patch | 18 +++++
25 9 files changed, 218 insertions(+)
26
27 diff --git a/sci-libs/clblas/Manifest b/sci-libs/clblas/Manifest
28 index 304f9e7bde3..d282335f29d 100644
29 --- a/sci-libs/clblas/Manifest
30 +++ b/sci-libs/clblas/Manifest
31 @@ -1 +1,2 @@
32 DIST clblas-2.10.tar.gz 1154117 BLAKE2B 67035b03ab3a8fa07f32cb8d1d40af39fd885ceb21d9754f8a49a62adcfacbeeec703dfdae922ec0fc915a2dcadff2fc2f07a6c5ced74db3da6cd85c6c63f4d5 SHA512 5ed43104aae565292e0df4cc9e014cf483ccc0ff89257ebb5817f6508bfc9593585ed658da639f2167fbfb5d92ef116be4d5de3694f56e1a1e228bd42b1c05c6
33 +DIST clblas-2.12.tar.gz 1157445 BLAKE2B 27352a7775db94808ce21f2b4a39fe505d4f37be4305dc7fb5a4068a86d3f51a9e4863931f634150762b31256f9f7e8e5d0d8b70f404b5a9ddb8a489b800aea6 SHA512 5d9b0c58adde69e83d95e9c713e0cdc5f64785fe7e05553a14c57fa483c4ef39e9dc780c26880a7f15924967d5ce4ea29035c29d63eac7ee5a2ae5ddacac2b72
34
35 diff --git a/sci-libs/clblas/clblas-2.12.ebuild b/sci-libs/clblas/clblas-2.12.ebuild
36 new file mode 100644
37 index 00000000000..700aa880f9f
38 --- /dev/null
39 +++ b/sci-libs/clblas/clblas-2.12.ebuild
40 @@ -0,0 +1,82 @@
41 +# Copyright 1999-2020 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +PYTHON_COMPAT=( python3_{6..9} )
47 +
48 +inherit python-any-r1 toolchain-funcs cmake
49 +
50 +MYPN="clBLAS"
51 +
52 +DESCRIPTION="Library containing BLAS routines for OpenCL"
53 +HOMEPAGE="https://github.com/clMathLibraries/clBLAS"
54 +SRC_URI="https://github.com/clMathLibraries/${MYPN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
55 +
56 +LICENSE="Apache-2.0"
57 +SLOT="0/2" # soname version
58 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
59 +IUSE="+client doc examples ktest performance test"
60 +# the testsuite is hopelessly broken and upstream is pretty much dead
61 +RESTRICT="test"
62 +
63 +RDEPEND="
64 + virtual/opencl
65 + client? ( virtual/cblas )
66 + doc? ( dev-libs/mathjax )"
67 +DEPEND="${RDEPEND}"
68 +BDEPEND="
69 + ${PYTHON_DEPS}
70 + doc? ( app-doc/doxygen )
71 + client? ( virtual/pkgconfig )"
72 +
73 +S="${WORKDIR}/${MYPN}-${PV}"
74 +CMAKE_USE_DIR="${S}/src"
75 +
76 +PATCHES=(
77 + "${FILESDIR}"/${PN}-2.12-disable-multilib-cflags.patch
78 + "${FILESDIR}"/${PN}-2.12-fix-pthread-linkage.patch
79 + "${FILESDIR}"/${PN}-2.12-fix-doxygen-output-dir.patch
80 + "${FILESDIR}"/${PN}-2.12-use-system-mathjax.patch
81 + "${FILESDIR}"/${PN}-2.12-reproducible-build.patch
82 + "${FILESDIR}"/${PN}-2.12-use-boost-dynamic-libs.patch
83 + "${FILESDIR}"/${PN}-2.12-Detect-CBLAS-when-building-the-client.patch
84 +)
85 +
86 +src_configure() {
87 + local mycmakeargs=(
88 + -DBUILD_RUNTIME=ON
89 + -DBUILD_SAMPLE=OFF
90 + # tests are beyond repair
91 + -DBUILD_TEST=OFF
92 + -DBUILD_CLIENT=$(usex client)
93 + -DBUILD_KTEST=$(usex ktest)
94 + -DBUILD_PERFORMANCE=$(usex performance)
95 + -DPYTHON_EXECUTABLE="${PYTHON}"
96 + )
97 + use client && mycmakeargs+=(
98 + -DNetlib_LIBRARIES="$($(tc-getPKG_CONFIG) --libs cblas blas)"
99 + )
100 + cmake_src_configure
101 +}
102 +
103 +src_compile() {
104 + cmake_src_compile
105 +
106 + if use doc; then
107 + cd doc || die
108 + doxygen clBLAS.doxy || die
109 + HTML_DOCS=( doc/html/. )
110 + fi
111 +}
112 +
113 +src_install() {
114 + cmake_src_install
115 +
116 + dodoc CHANGELOG CONTRIBUTING.md NOTICE README.md
117 + if use examples; then
118 + docinto examples
119 + dodoc -r src/samples/.
120 + docompress -x /usr/share/doc/${PF}/examples
121 + fi
122 +}
123
124 diff --git a/sci-libs/clblas/files/clblas-2.12-Detect-CBLAS-when-building-the-client.patch b/sci-libs/clblas/files/clblas-2.12-Detect-CBLAS-when-building-the-client.patch
125 new file mode 100644
126 index 00000000000..bfe94dfd707
127 --- /dev/null
128 +++ b/sci-libs/clblas/files/clblas-2.12-Detect-CBLAS-when-building-the-client.patch
129 @@ -0,0 +1,24 @@
130 +From: Ghislain Antony Vaillant <ghisvail@×××××.com>
131 +Date: Sat, 21 Jan 2017 16:49:27 +0000
132 +Subject: Detect CBLAS when building the client
133 +
134 +---
135 + src/CMakeLists.txt | 5 +----
136 + 1 file changed, 1 insertion(+), 4 deletions(-)
137 +
138 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
139 +index bf351c1..28d6a60 100644
140 +--- a/src/CMakeLists.txt
141 ++++ b/src/CMakeLists.txt
142 +@@ -267,10 +267,7 @@ if( BUILD_TEST )
143 + endif( )
144 +
145 + if( BUILD_CLIENT )
146 +- if( NETLIB_FOUND )
147 +- else( )
148 +- message( WARNING "Not find Netlib; BUILD_CLIENT needs the Netlib CBLAS library" )
149 +- endif()
150 ++ find_package( Netlib COMPONENTS BLAS REQUIRED )
151 + endif()
152 +
153 +
154
155 diff --git a/sci-libs/clblas/files/clblas-2.12-disable-multilib-cflags.patch b/sci-libs/clblas/files/clblas-2.12-disable-multilib-cflags.patch
156 new file mode 100644
157 index 00000000000..8e8f14871ef
158 --- /dev/null
159 +++ b/sci-libs/clblas/files/clblas-2.12-disable-multilib-cflags.patch
160 @@ -0,0 +1,26 @@
161 +Description: disable multilib flags
162 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
163 +Forwarded: not-needed
164 +---
165 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
166 +--- a/src/CMakeLists.txt
167 ++++ b/src/CMakeLists.txt
168 +@@ -305,18 +305,6 @@
169 + # Don't use -rpath.
170 + set(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE)
171 +
172 +- # Need to determine the target machine of the C compiler, because
173 +- # the '-m32' and '-m64' flags are supported on x86 but not on e.g. ARM.
174 +- exec_program( "${CMAKE_C_COMPILER} -dumpmachine"
175 +- OUTPUT_VARIABLE CMAKE_C_COMPILER_MACHINE )
176 +- message( STATUS "CMAKE_C_COMPILER_MACHINE: ${CMAKE_C_COMPILER_MACHINE}" )
177 +- # The "86" regular expression matches x86, x86_64, i686, etc.
178 +- if(${CMAKE_C_COMPILER_MACHINE} MATCHES "86")
179 +- set(CMAKE_C_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_C_FLAGS}")
180 +- set(CMAKE_CXX_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_CXX_FLAGS}")
181 +- set(CMAKE_Fortran_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_Fortran_FLAGS}")
182 +- endif()
183 +-
184 + if(TARGET_PLATFORM EQUAL 32)
185 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
186 + endif()
187
188 diff --git a/sci-libs/clblas/files/clblas-2.12-fix-doxygen-output-dir.patch b/sci-libs/clblas/files/clblas-2.12-fix-doxygen-output-dir.patch
189 new file mode 100644
190 index 00000000000..31abb89b1c3
191 --- /dev/null
192 +++ b/sci-libs/clblas/files/clblas-2.12-fix-doxygen-output-dir.patch
193 @@ -0,0 +1,16 @@
194 +Description: use system mathjax instead of remote
195 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
196 +Forwarded: not-needed
197 +---
198 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
199 +--- a/doc/clBLAS.doxy
200 ++++ b/doc/clBLAS.doxy
201 +@@ -52,7 +52,7 @@
202 + # If a relative path is entered, it will be relative to the location
203 + # where doxygen was started. If left blank the current directory will be used.
204 +
205 +-OUTPUT_DIRECTORY = ..\..\bin\clBLAS.doxy
206 ++OUTPUT_DIRECTORY =
207 +
208 + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
209 + # 4096 sub-directories (in 2 levels) under the output directory of each output
210
211 diff --git a/sci-libs/clblas/files/clblas-2.12-fix-pthread-linkage.patch b/sci-libs/clblas/files/clblas-2.12-fix-pthread-linkage.patch
212 new file mode 100644
213 index 00000000000..c920c8140d8
214 --- /dev/null
215 +++ b/sci-libs/clblas/files/clblas-2.12-fix-pthread-linkage.patch
216 @@ -0,0 +1,18 @@
217 +Description: fix missing linkage with pthread
218 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
219 +Forwarded: no
220 +---
221 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
222 +--- a/src/library/CMakeLists.txt
223 ++++ b/src/library/CMakeLists.txt
224 +@@ -889,6 +889,10 @@
225 + set_target_properties( clBLAS PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
226 + target_link_libraries(clBLAS ${OPENCL_LIBRARIES} ${MATH_LIBRARY} ${THREAD_LIBRARY})
227 +
228 ++set(THREADS_PREFER_PTHREAD_FLAG ON)
229 ++find_package(Threads REQUIRED)
230 ++target_link_libraries(clBLAS ${CMAKE_THREAD_LIBS_INIT})
231 ++
232 + # CPack configuration; include the executable into the package
233 + install( TARGETS clBLAS
234 + EXPORT Library
235
236 diff --git a/sci-libs/clblas/files/clblas-2.12-reproducible-build.patch b/sci-libs/clblas/files/clblas-2.12-reproducible-build.patch
237 new file mode 100644
238 index 00000000000..9d7c2b771e4
239 --- /dev/null
240 +++ b/sci-libs/clblas/files/clblas-2.12-reproducible-build.patch
241 @@ -0,0 +1,17 @@
242 +Description: make package build reproducible
243 + By disabling the HTML timestamp setting in Doxygen.
244 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
245 +Forwarded: not-needed
246 +---
247 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
248 +--- a/doc/clBLAS.doxy
249 ++++ b/doc/clBLAS.doxy
250 +@@ -974,7 +974,7 @@
251 + # page will contain the date and time when the page was generated. Setting
252 + # this to NO can help when comparing the output of multiple runs.
253 +
254 +-HTML_TIMESTAMP = YES
255 ++HTML_TIMESTAMP = NO
256 +
257 + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
258 + # documentation will contain sections that can be hidden and shown after the
259
260 diff --git a/sci-libs/clblas/files/clblas-2.12-use-boost-dynamic-libs.patch b/sci-libs/clblas/files/clblas-2.12-use-boost-dynamic-libs.patch
261 new file mode 100644
262 index 00000000000..64388c90dc4
263 --- /dev/null
264 +++ b/sci-libs/clblas/files/clblas-2.12-use-boost-dynamic-libs.patch
265 @@ -0,0 +1,16 @@
266 +Description: use Boost shared libraries instead of static
267 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
268 +Forwarded: no
269 +---
270 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
271 +--- a/src/CMakeLists.txt
272 ++++ b/src/CMakeLists.txt
273 +@@ -279,7 +279,7 @@
274 +
275 + # Find Boost on the system, and configure the type of boost build we want
276 + set( Boost_USE_MULTITHREADED ON )
277 +-set( Boost_USE_STATIC_LIBS ON )
278 ++set( Boost_USE_STATIC_LIBS OFF )
279 + set( Boost_DETAILED_FAILURE_MSG ON )
280 + # set( Boost_DEBUG ON )
281 + set( Boost_ADDITIONAL_VERSIONS "1.44.0" "1.44" "1.47.0" "1.47" "1.60.0" "1.60" )
282
283 diff --git a/sci-libs/clblas/files/clblas-2.12-use-system-mathjax.patch b/sci-libs/clblas/files/clblas-2.12-use-system-mathjax.patch
284 new file mode 100644
285 index 00000000000..775a669e96a
286 --- /dev/null
287 +++ b/sci-libs/clblas/files/clblas-2.12-use-system-mathjax.patch
288 @@ -0,0 +1,18 @@
289 +Description: fix output directory for documentation
290 + Use default doxygen directory, i.e. under docs/html, rather than the
291 + inappropriate path set by upstream.
292 +Author: Ghislain Antony Vaillant <ghisvail@×××××.com>
293 +Forwarded: no
294 +---
295 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
296 +--- a/doc/clBLAS.doxy
297 ++++ b/doc/clBLAS.doxy
298 +@@ -1223,7 +1223,7 @@
299 + # installing MathJax. However, it is strongly recommended to install a local
300 + # copy of MathJax from http://www.mathjax.org before deployment.
301 +
302 +-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
303 ++MATHJAX_RELPATH = /usr/share/javascript/mathjax
304 +
305 + # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
306 + # names that should be enabled during MathJax rendering.