commit: 89e8e9031ccedeef8c39c191c0260825f143b6b2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> AuthorDate: Fri Feb 6 09:08:08 2015 +0000 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> CommitDate: Fri Feb 6 09:08:08 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=89e8e903
New package sci-libs/clfft --- sci-libs/clfft/ChangeLog | 11 ++++ sci-libs/clfft/clfft-2.2.ebuild | 1 + sci-libs/clfft/clfft-9999.ebuild | 60 ++++++++++++++++++++++ sci-libs/clfft/files/clfft-client_CMakeLists.patch | 26 ++++++++++ .../files/clfft-scripts_perf_CMakeLists.patch | 13 +++++ sci-libs/clfft/metadata.xml | 17 ++++++ 6 files changed, 128 insertions(+) diff --git a/sci-libs/clfft/ChangeLog b/sci-libs/clfft/ChangeLog new file mode 100644 index 0000000..15f7e23 --- /dev/null +++ b/sci-libs/clfft/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sci-libs/clfft +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*clfft-2.2 (06 Feb 2015) +*clfft-9999 (06 Feb 2015) + + 06 Feb 2015; Marius Brehler <mar...@linux.sungazer.de> +clfft-2.2.ebuild, + +clfft-9999.ebuild, +files/clfft-client_CMakeLists.patch, + +files/clfft-scripts_perf_CMakeLists.patch, +metadata.xml: + sci-libs/clfft: Inital commit diff --git a/sci-libs/clfft/clfft-2.2.ebuild b/sci-libs/clfft/clfft-2.2.ebuild new file mode 120000 index 0000000..b6c165d --- /dev/null +++ b/sci-libs/clfft/clfft-2.2.ebuild @@ -0,0 +1 @@ +clfft-9999.ebuild \ No newline at end of file diff --git a/sci-libs/clfft/clfft-9999.ebuild b/sci-libs/clfft/clfft-9999.ebuild new file mode 100644 index 0000000..ffe4f5d --- /dev/null +++ b/sci-libs/clfft/clfft-9999.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cmake-utils + +MY_PN="clFFT" + +DESCRIPTION="A software library containing FFT functions written in 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="test" + +RDEPEND=" + >=sys-devel/gcc-4.6 + virtual/opencl + dev-libs/boost" + #test? ( + # dev-cpp/gtest + # sci-libs/fftw:3.0 + #)" +DEPEND="${RDEPEND}" + +# 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}"/clfft-client_CMakeLists.patch + "${FILESDIR}"/clfft-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 test TEST) + ) + cmake-utils_src_configure +} diff --git a/sci-libs/clfft/files/clfft-client_CMakeLists.patch b/sci-libs/clfft/files/clfft-client_CMakeLists.patch new file mode 100644 index 0000000..d779b45 --- /dev/null +++ b/sci-libs/clfft/files/clfft-client_CMakeLists.patch @@ -0,0 +1,26 @@ +Change the client binary's name to clfft-client. + +Patch by Marius Brehler. +--- client/CMakeLists.txt ++++ client/CMakeLists.txt +@@ -43,15 +43,15 @@ endif( ) + # Include standard OpenCL headers + include_directories( ${Boost_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS} ../../../common ${PROJECT_BINARY_DIR}/include ../include ) + +-add_executable( Client ${Client.Files} ) ++add_executable( clfft-client ${Client.Files} ) + +-target_link_libraries( Client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES} ${DL_LIB} ) ++target_link_libraries( clfft-client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES} ${DL_LIB} ) + +-set_target_properties( Client PROPERTIES VERSION ${CLFFT_VERSION} ) +-set_target_properties( Client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) ++set_target_properties( clfft-client PROPERTIES VERSION ${CLFFT_VERSION} ) ++set_target_properties( clfft-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) + + # CPack configuration; include the executable into the package +-install( TARGETS Client ++install( TARGETS clfft-client + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} + ARCHIVE DESTINATION lib${SUFFIX_LIB}/import diff --git a/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch b/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch new file mode 100644 index 0000000..2976a5e --- /dev/null +++ b/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch @@ -0,0 +1,13 @@ +Install Python scripts to /usr/share/clfft 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} ) +\ No newline at end of file ++install( FILES ${GRAPHING_SCRIPTS} DESTINATION share/clfft/${SUFFIX_BIN} ) +\ No newline at end of file diff --git a/sci-libs/clfft/metadata.xml b/sci-libs/clfft/metadata.xml new file mode 100644 index 0000000..14184f9 --- /dev/null +++ b/sci-libs/clfft/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci</herd> + <maintainer> + <email>mar...@linux.sungazer.de</email> + <name>Marius Brehler</name> + </maintainer> + <longdescription> + clFFT is a software library containing FFT functions written in + OpenCL. In addition to GPU devices, the libraries also support + running on CPU devices to facilitate debugging and multicore + programming. + clFFT is part of the clMath sofware library, which is the + successor of APPML. + </longdescription> +</pkgmetadata>