diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/clblas |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/clblas')
-rw-r--r-- | sci-libs/clblas/Manifest | 9 | ||||
-rw-r--r-- | sci-libs/clblas/clblas-2.10.ebuild | 101 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-disable-multilib-cflags.patch | 20 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-fix-blas-dot-calls.patch | 59 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-fix-doxygen-output-dir.patch | 16 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-fix-pthread-linkage.patch | 18 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-use-boost-dynamic-libs.patch | 16 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-2.10-use-system-mathjax.patch | 18 | ||||
-rw-r--r-- | sci-libs/clblas/metadata.xml | 29 |
9 files changed, 286 insertions, 0 deletions
diff --git a/sci-libs/clblas/Manifest b/sci-libs/clblas/Manifest new file mode 100644 index 000000000000..db0565b0be3b --- /dev/null +++ b/sci-libs/clblas/Manifest @@ -0,0 +1,9 @@ +AUX clblas-2.10-disable-multilib-cflags.patch 854 SHA256 3aba58803ca8bdae1abfdd66e8f0fa83f7e09aabee8538990729781224265a99 SHA512 39d144be9667b907bdbf1d0d48684196a959801126fa4a9f3b376a1824eaecfc3a5cb3e7d6b8c233e0f8e807b1b241449f6e9554c46ee49d6eca30779c860bff WHIRLPOOL 118a831c51af0d88c7afb8a330d5cc7c68a40de8b8cb8616b46a32b0b54ebbdd11ee725f3d7d5170877b3b6fb1a0b75f7e213ddd902358204f41b8e67deeda63 +AUX clblas-2.10-fix-blas-dot-calls.patch 2732 SHA256 33625fb6b5a7b42b3623a47041c4e8a2f14c5ac945d35e87954528c0e993c980 SHA512 07c1ac79cf9e9432f0f01cfc01c88c88bf4d733de259236eb1087c7e6b6f0539987cb2caf576ec6db24e6efb15de2d1655bdc5afcbd6512e3d15acedbcfbd995 WHIRLPOOL ac4096aa15fcf3c75e17c2f124c27e27e8cd94f8097fa87166e141f088aaf3c54d8352c4e44445eca0e841ceb9f46183363c48291adbf1fc9a8dd24599d2efea +AUX clblas-2.10-fix-doxygen-output-dir.patch 639 SHA256 dd901a8112f21ee8930181295e583b7df3084a19a2b9d11ce1b0cefb00ea674f SHA512 295dfccb9cd860f354abe775c142e0d68b31d2bc25f427b5b8ec4103865e73ce3a4d43967834eaaf3e40f978f48dddcdac1451138b4d53d5f973321d7f27aa74 WHIRLPOOL 55e07544af479b93eb2316c0631d86d6466f10652f9fdf7afc5ab598b9c6551abdbcc7cadee16b31908429d0d3acec70f9fac7b4fcda8b717e25201b83428f07 +AUX clblas-2.10-fix-pthread-linkage.patch 684 SHA256 be1870fe257cbb8ab08fe9a174032cf4d80da23d2a62cc6d2944044e458a95df SHA512 ae42cb7a59caa407df20ec3cfd8e593003bd2653dd43471c39591907159bc6b557c1b7fc4062f662b5986de8fd89cf9b2a287f4b6116701b55baf3ad6acab273 WHIRLPOOL fbcfb0aa5bc88397cf8d4ba709038c368d1104d9825b95282f29dabf5576d5599e7659878059ff553688d6bffbe04eb107a47359979478ccb623c7b4a3e9d680 +AUX clblas-2.10-use-boost-dynamic-libs.patch 579 SHA256 441a4357b219d51fd836dfc8fb071ba3622e662f5153429597ab87b160696ae3 SHA512 a07163684bcf69dba8c2df69d120a25ca7186104d40c27bf4d0267a21320460f3585d3fb1fb132df5cc5a1bca2905623c0285bffceb125c1f7d89129a3cc4f65 WHIRLPOOL edb3b929e3816a33ebca0cc926396b3b5be17688d57ee3d305259d732008909085edd1c3b0e826cabb163330a3a3897b3a8226de0b6acc1e332196b8ddb141b1 +AUX clblas-2.10-use-system-mathjax.patch 765 SHA256 09fd3d40d1876823c34a28b142839cfff3dd688a0503a95648a70a3cc28ec168 SHA512 156a0a664bbab80a17f3032c759656769eee36db0a93e4fd4a983eb584ef56d2023aef37b565c8cf81adb507f00f6b83ca9d31ace66c620f2279ca82aa512744 WHIRLPOOL d25b48bc46ef37b65d49685d6db801069e63a66da04adeb9a6b577c63f7a6dbf8397371b05e5c2127ad5ce95010df84acb91736e219d08e9546007da710d79bc +DIST clblas-2.10.tar.gz 1154117 SHA256 72a46cb92f6057d10b503ce23d62db73d7332eb0645bb8bca3337f4c0558b429 SHA512 5ed43104aae565292e0df4cc9e014cf483ccc0ff89257ebb5817f6508bfc9593585ed658da639f2167fbfb5d92ef116be4d5de3694f56e1a1e228bd42b1c05c6 WHIRLPOOL 1a96142dc0e7aad076d1e61508b943da8ac176bd889cac89a3cab1aab64a1d8a6bc207bda4483be7dc726af600b660370548ee06db4d28d4b6643b7bff9419e8 +EBUILD clblas-2.10.ebuild 2360 SHA256 aae478b056d18b93a6c32958e8efa5bdc5cdd86982bc20c447a47c5b77bf2407 SHA512 18dd363b3d05ec498c1edcfb86e6c01f0ee1379a21e42ffe6d0a07654c4c3d581cacc94c6a9d6332745fb99f2e04098c96b7e1bd6e2311d56fa53d3a121361bc WHIRLPOOL a5b85e26429b90f85a9f47efcbd5cc6a379a409be62ed4f6669a304eb2f5055f3929edf35f61a2213b28c53dfca7ad5e4d30b1fe0907fb8dd3d5536b2bb3d822 +MISC metadata.xml 1029 SHA256 c583aac269e9107ec05f28a78e3d5e6ff5b41e9ab3fa1ed9b36e1721bfe5cd06 SHA512 62e2f6461060977e68d8f175f40d8de1801f5c4f635e33817ffb04dba9b8a19747bcd99206972e21b8780f5f0499290ff8b0d46bf5bdc1463659a8dd5cebb483 WHIRLPOOL d67a1803c079a4dcafedbfdde75081b7eba04f40a6700e15a19252d3216d610ccbe9daffbe64cc922912f973bb4ee68c37653880a148a2e0c8ba7549d59b1618 diff --git a/sci-libs/clblas/clblas-2.10.ebuild b/sci-libs/clblas/clblas-2.10.ebuild new file mode 100644 index 000000000000..de0b41541ea3 --- /dev/null +++ b/sci-libs/clblas/clblas-2.10.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) +FORTRAN_NEEDED=test + +inherit cmake-utils python-single-r1 toolchain-funcs fortran-2 + +MYPN="clBLAS" + +DESCRIPTION="Library containing BLAS routines for OpenCL" +HOMEPAGE="https://github.com/clMathLibraries/clBLAS" +SRC_URI="https://github.com/clMathLibraries/${MYPN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/2" # soname version +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+client doc examples ktest performance test" + +REQUIRED_USE="performance? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + virtual/opencl + doc? ( dev-libs/mathjax ) + performance? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + test? ( + dev-cpp/gtest + dev-libs/boost + virtual/pkgconfig + virtual/blas + ) +" + +S="${WORKDIR}/${MYPN}-${PV}" +CMAKE_USE_DIR="${S}/src" + +PATCHES=( + "${FILESDIR}"/${P}-disable-multilib-cflags.patch + "${FILESDIR}"/${P}-fix-blas-dot-calls.patch + "${FILESDIR}"/${P}-fix-doxygen-output-dir.patch + "${FILESDIR}"/${P}-fix-pthread-linkage.patch + "${FILESDIR}"/${P}-use-boost-dynamic-libs.patch + "${FILESDIR}"/${P}-use-system-mathjax.patch +) + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_RUNTIME=ON + -DBUILD_SAMPLE=OFF + -DBUILD_CLIENT="$(usex client)" + -DBUILD_KTEST="$(usex ktest)" + -DBUILD_PERFORMANCE="$(usex performance)" + ) + if use test; then + mycmakeargs+=( + -DBUILD_TEST=ON + -DUSE_SYSTEM_GTEST=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)" + ) + else + mycmakeargs+=( -DBUILD_TEST=OFF ) + fi + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + if use doc; then + cd doc + doxygen clBLAS.doxy || die + fi +} + +src_test() { + pushd "${BUILD_DIR}/staging" > /dev/null + LD_LIBRARY_PATH="${BUILD_DIR}/library:${LD_LIBRARY_PATH}" \ + ./test-short + popd > /dev/null + + # horrible hack to avoid installing compiled tests + # this will trigger some overcompilation + mycmakeargs+=( -DBUILD_TEST=OFF ) + cmake-utils_src_configure +} + +src_install() { + use doc && HTML_DOCS=( doc/html/. ) + cmake-utils_src_install + dodoc CHANGELOG CONTRIBUTING.md NOTICE README.md + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r src/samples/* + docompress -x /usr/share/doc/${PF}/examples + fi +} diff --git a/sci-libs/clblas/files/clblas-2.10-disable-multilib-cflags.patch b/sci-libs/clblas/files/clblas-2.10-disable-multilib-cflags.patch new file mode 100644 index 000000000000..a7e59d913f06 --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-disable-multilib-cflags.patch @@ -0,0 +1,20 @@ +Description: disable multilib flags +Author: Ghislain Antony Vaillant <ghisvail@gmail.com> +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -296,9 +296,9 @@ + # Don't use -rpath. + set(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE) + +- set(CMAKE_C_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_C_FLAGS}") +- set(CMAKE_CXX_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_CXX_FLAGS}") +- set(CMAKE_Fortran_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_Fortran_FLAGS}") ++ #set(CMAKE_C_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_C_FLAGS}") ++ #set(CMAKE_CXX_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_CXX_FLAGS}") ++ #set(CMAKE_Fortran_FLAGS "-m${TARGET_PLATFORM} ${CMAKE_Fortran_FLAGS}") + + if(TARGET_PLATFORM EQUAL 32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin") diff --git a/sci-libs/clblas/files/clblas-2.10-fix-blas-dot-calls.patch b/sci-libs/clblas/files/clblas-2.10-fix-blas-dot-calls.patch new file mode 100644 index 000000000000..cc2c6c3c1766 --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-fix-blas-dot-calls.patch @@ -0,0 +1,59 @@ +diff --git a/src/tests/correctness/blas-lapack.c b/src/tests/correctness/blas-lapack.c +index 9687bdf..54666b1 100644 +--- a/src/tests/correctness/blas-lapack.c ++++ b/src/tests/correctness/blas-lapack.c +@@ -655,7 +655,7 @@ complex cdotu( int n, complex *x, int incx, complex *y, int incy) + #elif defined( __APPLE__) + cblas_cdotu_sub(n, x, incx, y, incy, &ans); + #else +- cdotusub_(&n, x, &incx, y, &incy, &ans); ++ ans = cdotu_(&n, x, &incx, y, &incy); + #endif + + return ans; +@@ -670,7 +670,7 @@ doublecomplex zdotu( int n, doublecomplex *x, int incx, doublecomplex *y, int i + #elif defined(__APPLE__) + cblas_zdotu_sub(n, x, incx, y, incy, &ans); + #else +- zdotusub_(&n, x, &incx, y, &incy, &ans); ++ ans = zdotu_(&n, x, &incx, y, &incy); + #endif + + return ans; +@@ -685,7 +685,7 @@ complex cdotc( int n, complex *x, int incx, complex *y, int incy) + #elif defined(__APPLE__) + cblas_cdotc_sub(n, x, incx, y, incy, &ans); + #else +- cdotcsub_(&n, x, &incx, y, &incy, &ans); ++ ans = cdotc_(&n, x, &incx, y, &incy); + #endif + + return ans; +@@ -700,7 +700,7 @@ doublecomplex zdotc( int n, doublecomplex *x, int incx, doublecomplex *y, int i + #elif defined(__APPLE__) + cblas_zdotc_sub(n, x, incx, y, incy, &ans); + #else +- zdotcsub_(&n, x, &incx, y, &incy, &ans); ++ ans = zdotc_(&n, x, &incx, y, &incy); + #endif + + return ans; +diff --git a/src/tests/correctness/blas-lapack.h b/src/tests/correctness/blas-lapack.h +index d2db1aa..8619e1e 100644 +--- a/src/tests/correctness/blas-lapack.h ++++ b/src/tests/correctness/blas-lapack.h +@@ -1170,10 +1170,10 @@ double ddot_(int *n, double *x, int *incx, double* y, int *incy); + complex cdotc_(int *n, complex *x, int *incx, complex* y, int *incy); + doublecomplex zdotc_(int *n, doublecomplex *x, int *incx, doublecomplex* y, int *incy); + #else +- void cdotusub_(int *n, complex *x, int *incx, complex* y, int *incy, complex *ans); +- void zdotusub_(int *n, doublecomplex *x, int *incx, doublecomplex* y, int *incy, doublecomplex *ans); +- void cdotcsub_(int *n, complex *x, int *incx, complex* y, int *incy, complex *ans); +- void zdotcsub_(int *n, doublecomplex *x, int *incx, doublecomplex* y, int *incy, doublecomplex *ans); ++ complex cdotu_(int *n, complex *x, int *incx, complex* y, int *incy); ++ doublecomplex zdotu_(int *n, doublecomplex *x, int *incx, doublecomplex* y, int *incy); ++ complex cdotc_(int *n, complex *x, int *incx, complex* y, int *incy); ++ doublecomplex zdotc_(int *n, doublecomplex *x, int *incx, doublecomplex* y, int *incy); + #endif + + void sswap_(int *n, float *x, int *incx, float* y, int *incy); diff --git a/sci-libs/clblas/files/clblas-2.10-fix-doxygen-output-dir.patch b/sci-libs/clblas/files/clblas-2.10-fix-doxygen-output-dir.patch new file mode 100644 index 000000000000..31abb89b1c3a --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-fix-doxygen-output-dir.patch @@ -0,0 +1,16 @@ +Description: use system mathjax instead of remote +Author: Ghislain Antony Vaillant <ghisvail@gmail.com> +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/clBLAS.doxy ++++ b/doc/clBLAS.doxy +@@ -52,7 +52,7 @@ + # If a relative path is entered, it will be relative to the location + # where doxygen was started. If left blank the current directory will be used. + +-OUTPUT_DIRECTORY = ..\..\bin\clBLAS.doxy ++OUTPUT_DIRECTORY = + + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create + # 4096 sub-directories (in 2 levels) under the output directory of each output diff --git a/sci-libs/clblas/files/clblas-2.10-fix-pthread-linkage.patch b/sci-libs/clblas/files/clblas-2.10-fix-pthread-linkage.patch new file mode 100644 index 000000000000..aa99529df034 --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-fix-pthread-linkage.patch @@ -0,0 +1,18 @@ +Description: fix missing linkage with pthread +Author: Ghislain Antony Vaillant <ghisvail@gmail.com> +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -888,6 +888,10 @@ + set_target_properties( clBLAS PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) + target_link_libraries(clBLAS ${OPENCL_LIBRARIES} ${MATH_LIBRARY}) + ++set(THREADS_PREFER_PTHREAD_FLAG ON) ++find_package(Threads REQUIRED) ++target_link_libraries(clBLAS ${CMAKE_THREAD_LIBS_INIT}) ++ + # CPack configuration; include the executable into the package + install( TARGETS clBLAS + EXPORT Library diff --git a/sci-libs/clblas/files/clblas-2.10-use-boost-dynamic-libs.patch b/sci-libs/clblas/files/clblas-2.10-use-boost-dynamic-libs.patch new file mode 100644 index 000000000000..57c585da11fc --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-use-boost-dynamic-libs.patch @@ -0,0 +1,16 @@ +Description: use Boost shared libraries instead of static +Author: Ghislain Antony Vaillant <ghisvail@gmail.com> +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -270,7 +270,7 @@ + + # Find Boost on the system, and configure the type of boost build we want + set( Boost_USE_MULTITHREADED ON ) +-set( Boost_USE_STATIC_LIBS ON ) ++set( Boost_USE_STATIC_LIBS OFF ) + set( Boost_DETAILED_FAILURE_MSG ON ) + set( Boost_DEBUG ON ) + set( Boost_ADDITIONAL_VERSIONS "1.44.0" "1.44" "1.47.0" "1.47" ) diff --git a/sci-libs/clblas/files/clblas-2.10-use-system-mathjax.patch b/sci-libs/clblas/files/clblas-2.10-use-system-mathjax.patch new file mode 100644 index 000000000000..775a669e96a8 --- /dev/null +++ b/sci-libs/clblas/files/clblas-2.10-use-system-mathjax.patch @@ -0,0 +1,18 @@ +Description: fix output directory for documentation + Use default doxygen directory, i.e. under docs/html, rather than the + inappropriate path set by upstream. +Author: Ghislain Antony Vaillant <ghisvail@gmail.com> +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/clBLAS.doxy ++++ b/doc/clBLAS.doxy +@@ -1223,7 +1223,7 @@ + # installing MathJax. However, it is strongly recommended to install a local + # copy of MathJax from http://www.mathjax.org before deployment. + +-MATHJAX_RELPATH = http://www.mathjax.org/mathjax ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension + # names that should be enabled during MathJax rendering. diff --git a/sci-libs/clblas/metadata.xml b/sci-libs/clblas/metadata.xml new file mode 100644 index 000000000000..cad01ed8bce0 --- /dev/null +++ b/sci-libs/clblas/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription> + clBLAS is the code for the OpenCL BLAS portion of clMath. The + complete set of BLAS level 1, 2 and 3 routines is implemented. See + Netlib BLAS for the list of supported routines. In addition to GPU + devices, the library also supports running on CPU devices to + facilitate debugging and multicore programming. + </longdescription> + <use> + <flag name="client"> + Build a command line clBLAS client program. + </flag> + <flag name="ktest"> + A command line tool for testing single clBLAS kernel. + </flag> + <flag name="performance"> + Copy performance scripts that can measure and graph performance. + </flag> + </use> + <upstream> + <remote-id type="github">clMathLibraries/clBLAS</remote-id> + </upstream> +</pkgmetadata> |