diff options
author | Marius Brehler <marbre@linux.sungazer.de> | 2015-03-23 16:02:06 +0100 |
---|---|---|
committer | Marius Brehler <marbre@linux.sungazer.de> | 2015-03-23 16:02:06 +0100 |
commit | eab7e733b7a463fb96e654334e70834c6234259c (patch) | |
tree | f6dc91e193be3d0f195409a2b7e128be8843e5b2 /sci-libs/clblas | |
parent | sci-libs/arrayfire: Add 3.0_beta (diff) | |
download | sci-eab7e733b7a463fb96e654334e70834c6234259c.tar.gz sci-eab7e733b7a463fb96e654334e70834c6234259c.tar.bz2 sci-eab7e733b7a463fb96e654334e70834c6234259c.zip |
sci-libs/clblas: New package
Package-Manager: portage-2.2.14
Diffstat (limited to 'sci-libs/clblas')
-rw-r--r-- | sci-libs/clblas/ChangeLog | 12 | ||||
-rw-r--r-- | sci-libs/clblas/Manifest | 1 | ||||
l--------- | sci-libs/clblas/clblas-2.2.ebuild | 1 | ||||
-rw-r--r-- | sci-libs/clblas/clblas-9999.ebuild | 67 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-library_tools_tune_CMakeLists.patch | 14 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-samples_CMakeLists.patch | 20 | ||||
-rw-r--r-- | sci-libs/clblas/files/clblas-scripts_perf_CMakeLists.patch | 11 | ||||
-rw-r--r-- | sci-libs/clblas/metadata.xml | 23 |
8 files changed, 149 insertions, 0 deletions
diff --git a/sci-libs/clblas/ChangeLog b/sci-libs/clblas/ChangeLog new file mode 100644 index 000000000..9649bfff8 --- /dev/null +++ b/sci-libs/clblas/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sci-libs/clblas +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*clblas-2.2 (23 Mar 2015) +*clblas-9999 (23 Mar 2015) + + 23 Mar 2015; Marius Brehler <marbre@linux.sungazer.de> +clblas-2.2.ebuild, + +clblas-9999.ebuild, +files/clblas-library_tools_tune_CMakeLists.patch, + +files/clblas-samples_CMakeLists.patch, + +files/clblas-scripts_perf_CMakeLists.patch, +metadata.xml: + New package diff --git a/sci-libs/clblas/Manifest b/sci-libs/clblas/Manifest new file mode 100644 index 000000000..ab7c77875 --- /dev/null +++ b/sci-libs/clblas/Manifest @@ -0,0 +1 @@ +DIST clblas-2.2.tar.gz 794888 SHA256 0563e028485d240f8b6e6efcae61677049627b19e924dcb1ef8014065b6416df SHA512 9f094845d854130d3901d639606069050da10a33b05985757d72188b2d8ef6e7836edc105f5ad8bf2d0922eb19e9a178388260b2a9da34e2fe27dc731233ec85 WHIRLPOOL 2f81de82d584ec4f2158c1165d02221cacf3775cdb9c96617ca2e3ea1fbb7844c833e50cbd8c7b2601585771ddb81a48795dd1534200806b560954a069cf4ec1 diff --git a/sci-libs/clblas/clblas-2.2.ebuild b/sci-libs/clblas/clblas-2.2.ebuild new file mode 120000 index 000000000..9729dfdc2 --- /dev/null +++ b/sci-libs/clblas/clblas-2.2.ebuild @@ -0,0 +1 @@ +clblas-9999.ebuild
\ No newline at end of file diff --git a/sci-libs/clblas/clblas-9999.ebuild b/sci-libs/clblas/clblas-9999.ebuild new file mode 100644 index 000000000..d03793801 --- /dev/null +++ b/sci-libs/clblas/clblas-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cmake-utils + +MY_PN="clBLAS" + +DESCRIPTION="A software library containing BLAS routines for OpenCL" +HOMEPAGE="https://github.com/clMathLibraries/clFFT" + +if [ ${PV} == "9999" ] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/clMathLibraries/${MY_PN}.git git://github.com/clMathLibraries/${MY_PN}.git" + S="${WORKDIR}/${P}/src" +else + SRC_URI="https://github.com/clMathLibraries/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${MY_PN}-${PV}/src" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="client examples +ktest performance test" + +RDEPEND=" + >=sys-devel/gcc-4.6:* + virtual/opencl + || ( >=dev-util/amdapp-2.9 dev-util/intel-ocl-sdk ) + dev-libs/boost + performance? ( dev-lang/python ) + " +DEPEND="${RDEPEND}" +# test? ( +# >=dev-cpp/gtest-1.6.0 +# >=sci-libs/acml-6.1.0.3 +# )" + +# The tests only get compiled to an executable named Test, which is not recogniozed by cmake. +# Therefore src_test() won't execute any test. +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/clblas-library_tools_tune_CMakeLists.patch + "${FILESDIR}"/clblas-samples_CMakeLists.patch + "${FILESDIR}"/clblas-scripts_perf_CMakeLists.patch +) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + if [[ $(gcc-major-version) -lt 4 ]] || ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) ; then + die "Compilation with gcc older than 4.6 is not supported." + fi + fi +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_build examples SAMPLE) + $(cmake-utils_use_build ktest KTEST) + $(cmake-utils_use_build performance PERFORMANCE) + $(cmake-utils_use_build test TEST) + ) + cmake-utils_src_configure +} diff --git a/sci-libs/clblas/files/clblas-library_tools_tune_CMakeLists.patch b/sci-libs/clblas/files/clblas-library_tools_tune_CMakeLists.patch new file mode 100644 index 000000000..5f1f763fe --- /dev/null +++ b/sci-libs/clblas/files/clblas-library_tools_tune_CMakeLists.patch @@ -0,0 +1,14 @@ +Install tune as clBLAS-tune. + +Patch by Marius Brehler. +--- library/tools/tune/CMakeLists.txt ++++ library/tools/tune/CMakeLists.txt +@@ -138,7 +138,7 @@ endif() + add_executable(tune ${TOOLS_SRC} ${TOOLS_EXTERNAL_SRC}) + add_dependencies(tune GENERATE_CLT) + target_link_libraries(tune ${OPENCL_LIBRARIES} ${TIME_LIBRARY} ${MATH_LIBRARY}) +-set_target_properties( tune PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) ++set_target_properties( tune PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" OUTPUT_NAME clBLAS-tune ) + + # CPack configuration; include the executable into the package + install( TARGETS tune diff --git a/sci-libs/clblas/files/clblas-samples_CMakeLists.patch b/sci-libs/clblas/files/clblas-samples_CMakeLists.patch new file mode 100644 index 000000000..8b5a762b1 --- /dev/null +++ b/sci-libs/clblas/files/clblas-samples_CMakeLists.patch @@ -0,0 +1,20 @@ +Install samples to /usr/share/clBLAS/samples. + +Patch by Marius Brehler. +--- samples/CMakeLists.txt ++++ samples/CMakeLists.txt +@@ -274,7 +274,7 @@ install( TARGETS example_sgemm example_s + example_snrm2 example_sasum example_isamax + + version +- RUNTIME DESTINATION bin${SUFFIX_BIN} ++ RUNTIME DESTINATION share/clBLAS/samples + LIBRARY DESTINATION lib${SUFFIX_LIB} + ARCHIVE DESTINATION lib${SUFFIX_LIB}/import + ) +@@ -333,4 +333,4 @@ install(FILES + ${PROJECT_BINARY_DIR}/samples/CMakeLists.txt + + DESTINATION +- samples ) ++ share/clBLAS/samples/src ) diff --git a/sci-libs/clblas/files/clblas-scripts_perf_CMakeLists.patch b/sci-libs/clblas/files/clblas-scripts_perf_CMakeLists.patch new file mode 100644 index 000000000..7b9b58d97 --- /dev/null +++ b/sci-libs/clblas/files/clblas-scripts_perf_CMakeLists.patch @@ -0,0 +1,11 @@ +Install Python scripts to /usr/share/clBLAS and not to /usr/bin. + +Patch by Marius Brehler. +--- scripts/perf/CMakeLists.txt ++++ scripts/perf/CMakeLists.txt +@@ -21,4 +21,4 @@ set(GRAPHING_SCRIPTS measurePerformance + performanceUtility.py + ) + +-install( FILES ${GRAPHING_SCRIPTS} DESTINATION bin${SUFFIX_BIN} ) ++install( FILES ${GRAPHING_SCRIPTS} DESTINATION share/clBLAS ) diff --git a/sci-libs/clblas/metadata.xml b/sci-libs/clblas/metadata.xml new file mode 100644 index 000000000..fe45c3c20 --- /dev/null +++ b/sci-libs/clblas/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci</herd> + <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> +</pkgmetadata> |