Gentoo Archives: gentoo-commits

From: Christoph Junghans <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/clfft/files/, sci-libs/clfft/
Date: Sun, 08 Feb 2015 21:07:51
Message-Id: 1423213688.89e8e9031ccedeef8c39c191c0260825f143b6b2.ottxor@gentoo
1 commit: 89e8e9031ccedeef8c39c191c0260825f143b6b2
2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
3 AuthorDate: Fri Feb 6 09:08:08 2015 +0000
4 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 6 09:08:08 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=89e8e903
7
8 New package sci-libs/clfft
9
10 ---
11 sci-libs/clfft/ChangeLog | 11 ++++
12 sci-libs/clfft/clfft-2.2.ebuild | 1 +
13 sci-libs/clfft/clfft-9999.ebuild | 60 ++++++++++++++++++++++
14 sci-libs/clfft/files/clfft-client_CMakeLists.patch | 26 ++++++++++
15 .../files/clfft-scripts_perf_CMakeLists.patch | 13 +++++
16 sci-libs/clfft/metadata.xml | 17 ++++++
17 6 files changed, 128 insertions(+)
18
19 diff --git a/sci-libs/clfft/ChangeLog b/sci-libs/clfft/ChangeLog
20 new file mode 100644
21 index 0000000..15f7e23
22 --- /dev/null
23 +++ b/sci-libs/clfft/ChangeLog
24 @@ -0,0 +1,11 @@
25 +# ChangeLog for sci-libs/clfft
26 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
27 +# $Header: $
28 +
29 +*clfft-2.2 (06 Feb 2015)
30 +*clfft-9999 (06 Feb 2015)
31 +
32 + 06 Feb 2015; Marius Brehler <marbre@××××××××××××××.de> +clfft-2.2.ebuild,
33 + +clfft-9999.ebuild, +files/clfft-client_CMakeLists.patch,
34 + +files/clfft-scripts_perf_CMakeLists.patch, +metadata.xml:
35 + sci-libs/clfft: Inital commit
36
37 diff --git a/sci-libs/clfft/clfft-2.2.ebuild b/sci-libs/clfft/clfft-2.2.ebuild
38 new file mode 120000
39 index 0000000..b6c165d
40 --- /dev/null
41 +++ b/sci-libs/clfft/clfft-2.2.ebuild
42 @@ -0,0 +1 @@
43 +clfft-9999.ebuild
44 \ No newline at end of file
45
46 diff --git a/sci-libs/clfft/clfft-9999.ebuild b/sci-libs/clfft/clfft-9999.ebuild
47 new file mode 100644
48 index 0000000..ffe4f5d
49 --- /dev/null
50 +++ b/sci-libs/clfft/clfft-9999.ebuild
51 @@ -0,0 +1,60 @@
52 +# Copyright 1999-2015 Gentoo Foundation
53 +# Distributed under the terms of the GNU General Public License v2
54 +# $Header: $
55 +
56 +EAPI=5
57 +
58 +inherit cmake-utils
59 +
60 +MY_PN="clFFT"
61 +
62 +DESCRIPTION="A software library containing FFT functions written in OpenCL"
63 +HOMEPAGE="https://github.com/clMathLibraries/clFFT"
64 +
65 +if [ ${PV} == "9999" ] ; then
66 + inherit git-r3
67 + EGIT_REPO_URI="https://github.com/clMathLibraries/${MY_PN}.git git://github.com/clMathLibraries/${MY_PN}.git"
68 + S="${WORKDIR}/${P}/src"
69 +else
70 + SRC_URI="https://github.com/clMathLibraries/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
71 + KEYWORDS="~amd64"
72 + S="${WORKDIR}/${MY_PN}-${PV}/src"
73 +fi
74 +
75 +LICENSE="Apache-2.0"
76 +SLOT="0"
77 +IUSE="test"
78 +
79 +RDEPEND="
80 + >=sys-devel/gcc-4.6
81 + virtual/opencl
82 + dev-libs/boost"
83 + #test? (
84 + # dev-cpp/gtest
85 + # sci-libs/fftw:3.0
86 + #)"
87 +DEPEND="${RDEPEND}"
88 +
89 +# The tests only get compiled to an executable named Test, which is not recogniozed by cmake.
90 +# Therefore src_test() won't execute any test.
91 +RESTRICT="test"
92 +
93 +PATCHES=(
94 + "${FILESDIR}"/clfft-client_CMakeLists.patch
95 + "${FILESDIR}"/clfft-scripts_perf_CMakeLists.patch
96 +)
97 +
98 +pkg_pretend() {
99 + if [[ ${MERGE_TYPE} != binary ]]; then
100 + if [[ $(gcc-major-version) -lt 4 ]] || ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) ; then
101 + die "Compilation with gcc older than 4.6 is not supported."
102 + fi
103 + fi
104 +}
105 +
106 +src_configure() {
107 + local mycmakeargs=(
108 + $(cmake-utils_use_build test TEST)
109 + )
110 + cmake-utils_src_configure
111 +}
112
113 diff --git a/sci-libs/clfft/files/clfft-client_CMakeLists.patch b/sci-libs/clfft/files/clfft-client_CMakeLists.patch
114 new file mode 100644
115 index 0000000..d779b45
116 --- /dev/null
117 +++ b/sci-libs/clfft/files/clfft-client_CMakeLists.patch
118 @@ -0,0 +1,26 @@
119 +Change the client binary's name to clfft-client.
120 +
121 +Patch by Marius Brehler.
122 +--- client/CMakeLists.txt
123 ++++ client/CMakeLists.txt
124 +@@ -43,15 +43,15 @@ endif( )
125 + # Include standard OpenCL headers
126 + include_directories( ${Boost_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS} ../../../common ${PROJECT_BINARY_DIR}/include ../include )
127 +
128 +-add_executable( Client ${Client.Files} )
129 ++add_executable( clfft-client ${Client.Files} )
130 +
131 +-target_link_libraries( Client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES} ${DL_LIB} )
132 ++target_link_libraries( clfft-client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES} ${DL_LIB} )
133 +
134 +-set_target_properties( Client PROPERTIES VERSION ${CLFFT_VERSION} )
135 +-set_target_properties( Client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
136 ++set_target_properties( clfft-client PROPERTIES VERSION ${CLFFT_VERSION} )
137 ++set_target_properties( clfft-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
138 +
139 + # CPack configuration; include the executable into the package
140 +-install( TARGETS Client
141 ++install( TARGETS clfft-client
142 + RUNTIME DESTINATION bin${SUFFIX_BIN}
143 + LIBRARY DESTINATION lib${SUFFIX_LIB}
144 + ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
145
146 diff --git a/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch b/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch
147 new file mode 100644
148 index 0000000..2976a5e
149 --- /dev/null
150 +++ b/sci-libs/clfft/files/clfft-scripts_perf_CMakeLists.patch
151 @@ -0,0 +1,13 @@
152 +Install Python scripts to /usr/share/clfft and not to /usr/bin.
153 +
154 +Patch by Marius Brehler.
155 +--- scripts/perf/CMakeLists.txt
156 ++++ scripts/perf/CMakeLists.txt
157 +@@ -21,4 +21,4 @@ set(GRAPHING_SCRIPTS measurePerformance
158 + performanceUtility.py
159 + )
160 +
161 +-install( FILES ${GRAPHING_SCRIPTS} DESTINATION bin${SUFFIX_BIN} )
162 +\ No newline at end of file
163 ++install( FILES ${GRAPHING_SCRIPTS} DESTINATION share/clfft/${SUFFIX_BIN} )
164 +\ No newline at end of file
165
166 diff --git a/sci-libs/clfft/metadata.xml b/sci-libs/clfft/metadata.xml
167 new file mode 100644
168 index 0000000..14184f9
169 --- /dev/null
170 +++ b/sci-libs/clfft/metadata.xml
171 @@ -0,0 +1,17 @@
172 +<?xml version="1.0" encoding="UTF-8"?>
173 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
174 +<pkgmetadata>
175 + <herd>sci</herd>
176 + <maintainer>
177 + <email>marbre@××××××××××××××.de</email>
178 + <name>Marius Brehler</name>
179 + </maintainer>
180 + <longdescription>
181 + clFFT is a software library containing FFT functions written in
182 + OpenCL. In addition to GPU devices, the libraries also support
183 + running on CPU devices to facilitate debugging and multicore
184 + programming.
185 + clFFT is part of the clMath sofware library, which is the
186 + successor of APPML.
187 + </longdescription>
188 +</pkgmetadata>