Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/
Date: Thu, 01 Oct 2015 06:06:52
Message-Id: 1443372753.c37b3b8088af3b2ec210ca9d0e27ee517dcb3308.jlec@gentoo
1 commit: c37b3b8088af3b2ec210ca9d0e27ee517dcb3308
2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
3 AuthorDate: Sun Sep 27 16:52:33 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 27 16:52:33 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=c37b3b80
7
8 sci-libs/arrayfire: Version bump
9
10 Package-Manager: portage-2.2.20.1
11
12 sci-libs/arrayfire/ChangeLog | 6 ++
13 sci-libs/arrayfire/arrayfire-3.1.2.ebuild | 108 ++++++++++++++++++++++++++++++
14 2 files changed, 114 insertions(+)
15
16 diff --git a/sci-libs/arrayfire/ChangeLog b/sci-libs/arrayfire/ChangeLog
17 index 7c122a1..b369ea9 100644
18 --- a/sci-libs/arrayfire/ChangeLog
19 +++ b/sci-libs/arrayfire/ChangeLog
20 @@ -1,6 +1,12 @@
21 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
22 # $Id$
23
24 +*arrayfire-3.1.2 (27 Sep 2015)
25 +
26 + 27 Sep 2015; Marius Brehler <marbre@××××××××××××××.de>
27 + +arrayfire-3.1.2.ebuild:
28 + sci-libs/arrayfire: Version bump
29 +
30 *arrayfire-3.1.1-r2 (20 Sep 2015)
31
32 20 Sep 2015; Marius Brehler <marbre@××××××××××××××.de>
33
34 diff --git a/sci-libs/arrayfire/arrayfire-3.1.2.ebuild b/sci-libs/arrayfire/arrayfire-3.1.2.ebuild
35 new file mode 100644
36 index 0000000..a11b2be
37 --- /dev/null
38 +++ b/sci-libs/arrayfire/arrayfire-3.1.2.ebuild
39 @@ -0,0 +1,108 @@
40 +# Copyright 1999-2015 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +# $Id$
43 +
44 +EAPI=5
45 +
46 +inherit cmake-utils multilib
47 +
48 +GTEST_PV="1.7.0"
49 +
50 +DESCRIPTION="A general purpose GPU library"
51 +HOMEPAGE="http://www.arrayfire.com/"
52 +SRC_URI="http://arrayfire.com/arrayfire_source/${PN}-full-${PV}.tar.bz2 -> ${P}.tar.bz2
53 +test? ( https://googletest.googlecode.com/files/gtest-${GTEST_PV}.zip )"
54 +KEYWORDS="~amd64"
55 +
56 +LICENSE="BSD
57 + nonfree? ( OpenSIFT )"
58 +SLOT="0"
59 +IUSE="+examples +cpu cuda nonfree opencl test graphics"
60 +
61 +RDEPEND="
62 + >=sys-devel/gcc-4.7:*
63 + media-libs/freeimage
64 + cuda? (
65 + >=dev-util/nvidia-cuda-toolkit-7.5.18-r1
66 + dev-libs/boost
67 + )
68 + cpu? (
69 + virtual/blas
70 + virtual/cblas
71 + virtual/lapacke
72 + sci-libs/fftw:3.0
73 + )
74 + opencl? (
75 + virtual/blas
76 + virtual/cblas
77 + virtual/lapacke
78 + dev-libs/boost
79 + dev-libs/boost-compute
80 + >=sci-libs/clblas-2.4
81 + >=sci-libs/clfft-2.6.1
82 + )
83 + graphics? (
84 + media-libs/glew
85 + >=media-libs/glfw-3.1.1
86 + =sci-visualization/forge-3.1.2
87 + )"
88 +DEPEND="${RDEPEND}"
89 +
90 +S="${WORKDIR}/${PN}-full-${PV}"
91 +BUILD_DIR="${S}/build"
92 +CMAKE_BUILD_TYPE=Release
93 +
94 +# We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage
95 +# user is (usually) not in the video group
96 +RESTRICT="userpriv"
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 7 ]] ) ; then
101 + die "Compilation with gcc older than 4.7 is not supported."
102 + fi
103 + fi
104 +}
105 +
106 +src_unpack() {
107 + default
108 +
109 + if ! use nonfree; then
110 + find "${WORKDIR}" -name "*_nonfree*" -delete || die
111 + fi
112 +
113 + if use test; then
114 + mkdir -p "${BUILD_DIR}"/third_party/src/ || die
115 + mv "${WORKDIR}"/gtest-"${GTEST_PV}" "${BUILD_DIR}"/third_party/src/googletest || die
116 + fi
117 +}
118 +
119 +src_configure() {
120 + if use cuda; then
121 + addwrite /dev/nvidiactl
122 + addwrite /dev/nvidia0
123 + addwrite /dev/nvidia-uvm
124 + fi
125 +
126 + local mycmakeargs=(
127 + $(cmake-utils_use_build cpu CPU)
128 + $(cmake-utils_use_build cuda CUDA)
129 + $(cmake-utils_use_build opencl OPENCL)
130 + $(cmake-utils_use_build examples EXAMPLES)
131 + $(cmake-utils_use_build test TEST)
132 + $(cmake-utils_use_build graphics GRAPHICS)
133 + $(cmake-utils_use_build nonfree NONFREE)
134 + -DUSE_SYSTEM_BOOST_COMPUTE=ON
135 + -DUSE_SYSTEM_CLBLAS=ON
136 + -DUSE_SYSTEM_CLFFT=ON
137 + -DUSE_SYSTEM_FORGE=ON
138 + -DAF_INSTALL_CMAKE_DIR=/usr/${get_libdir}/cmake/ArrayFire
139 + )
140 + cmake-utils_src_configure
141 +}
142 +
143 +src_install() {
144 + cmake-utils_src_install
145 +
146 + dobin "${BUILD_DIR}/bin2cpp"
147 +}