Merge branch 'master' of git+ssh://git.gentoo.org/repo/gentoo
[gentoo.git] / dev-libs / vc / vc-1.1.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit cmake-utils
8
9 DESCRIPTION="SIMD Vector Class Library for C++"
10 HOMEPAGE="https://github.com/VcDevel/Vc"
11
12 VC_TEST_DATA=( reference-{acos,asin,atan,ln,log2,log10,sincos}-{dp,sp}.dat )
13 for i in ${VC_TEST_DATA[@]}; do
14         SRC_URI+="test? ( http://compeng.uni-frankfurt.de/~kretz/Vc-testdata/$i -> ${P}-${i} ) "
15 done
16
17 SRC_URI+="https://github.com/VcDevel/Vc/archive/${PV}.tar.gz -> ${P}.tar.gz"
18
19 LICENSE="LGPL-3"
20 SLOT="0"
21 KEYWORDS="~amd64 ~amd64-linux ~x86 ~x86-linux"
22 IUSE="test"
23
24 src_unpack() {
25         default_src_unpack
26         S="${WORKDIR}"/Vc-${PV}
27         if use test ; then
28                 mkdir -p "${WORKDIR}"/${P}_build/tests || die
29                 for i in ${VC_TEST_DATA[@]}; do
30                         cp "${DISTDIR}"/${P}-$i "${WORKDIR}"/${P}_build/tests/${i} || die
31                 done
32         fi
33 }
34
35 src_configure() {
36         local mycmakeargs=(
37                 $(cmake-utils_use_build test)
38         )
39         cmake-utils_src_configure
40 }