aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Brehler <marbre@linux.sungazer.de>2015-01-10 13:03:12 +0100
committerMarius Brehler <marbre@linux.sungazer.de>2015-01-10 13:03:12 +0100
commit8c3bb69148954714ff4e8614fce7acbb02e95bd8 (patch)
tree182ed4ce2c48abdb3836cc8de28d0f69c295926a /sci-libs
parentAdd patch to install examples (diff)
downloadsci-8c3bb69148954714ff4e8614fce7acbb02e95bd8.tar.gz
sci-8c3bb69148954714ff4e8614fce7acbb02e95bd8.tar.bz2
sci-8c3bb69148954714ff4e8614fce7acbb02e95bd8.zip
Get arrayfire working
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/arrayfire/arrayfire-9999.ebuild68
-rw-r--r--sci-libs/arrayfire/metadata.xml4
2 files changed, 23 insertions, 49 deletions
diff --git a/sci-libs/arrayfire/arrayfire-9999.ebuild b/sci-libs/arrayfire/arrayfire-9999.ebuild
index 06295ca4e..0a241169a 100644
--- a/sci-libs/arrayfire/arrayfire-9999.ebuild
+++ b/sci-libs/arrayfire/arrayfire-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit cmake-utils eutils git-r3 toolchain-funcs
+inherit cmake-utils eutils git-r3
DESCRIPTION="A general purpose GPU library."
HOMEPAGE="http://www.arrayfire.com/"
@@ -13,7 +13,7 @@ KEYWORDS="~amd64"
LICENSE="ArrayFire"
SLOT="0"
-IUSE="+examples +cpu cuda"
+IUSE="+examples +cpu cuda test"
RDEPEND="
>=sys-devel/gcc-4.7.3-r1
@@ -21,7 +21,12 @@ RDEPEND="
virtual/cblas
cuda? ( >=dev-util/nvidia-cuda-toolkit-6.0 )
sci-libs/fftw:3.0"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ test? ( dev-vcs/subversion )"
+
+S="${WORKDIR}/${P}"
+BUILD_DIR="${S}/build"
+CMAKE_BUILD_TYPE=Release
# We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage
# user is (usually) not in the video group
@@ -29,23 +34,14 @@ if use cuda; then
RESTRICT="userpriv"
fi
-S="${WORKDIR}/${P}"
-
-QA_PREBUILT="/usr/share/arrayfire/examples/helloworld_cpu
- /usr/share/arrayfire/examples/pi_cpu
- /usr/share/arrayfire/examples/vectorize_cpu
- /usr/share/arrayfire/examples/helloworld_cuda
- /usr/share/arrayfire/examples/pi_cuda
- /usr/share/arrayfire/examples/vectorize_cuda"
-
-src_unpack() {
- git-r3_src_unpack
-}
-
src_prepare() {
if use cpu; then
epatch "${FILESDIR}/FindCBLAS.patch"
fi
+ if use examples; then
+ epatch "${FILESDIR}/CMakeLists_examples.patch"
+ fi
+
cmake-utils_src_prepare
}
@@ -56,20 +52,14 @@ src_configure() {
addwrite /dev/nvidia-uvm
fi
- local mycmakeargs="
- -DCMAKE_BUILD_TYPE=Release
- $(cmake-utils_use_build cpu CPU)
- $(cmake-utils_use_build cuda CUDA)
- -DBUILD_OPENCL=OFF
- $(cmake-utils_use_build examples EXAMPLES)
- -DBUILD_TEST=OFF
- "
-
- BUILD_DIR="${S}/build" cmake-utils_src_configure
-}
-
-src_compile() {
- BUILD_DIR="${S}/build" cmake-utils_src_compile
+ local mycmakeargs=(
+ $(cmake-utils_use_build cpu CPU)
+ $(cmake-utils_use_build cuda CUDA)
+ -DBUILD_OPENCL=OFF
+ $(cmake-utils_use_build examples EXAMPLES)
+ $(cmake-utils_use_build test TEST)
+ )
+ cmake-utils_src_configure
}
src_install() {
@@ -77,20 +67,4 @@ src_install() {
exeinto /usr/bin
doexe "build/bin2cpp"
-
- if use examples; then
- ebegin "Installing examples"
- exeinto /usr/share/arrayfire/examples/
- if use cpu; then
- doexe "build/examples/helloworld_cpu"
- doexe "build/examples/pi_cpu"
- doexe "build/examples/vectorize_cpu"
- fi
- if use cuda; then
- doexe "build/examples/helloworld_cuda"
- doexe "build/examples/pi_cuda"
- doexe "build/examples/vectorize_cuda"
- fi
- eend
- fi
-} \ No newline at end of file
+}
diff --git a/sci-libs/arrayfire/metadata.xml b/sci-libs/arrayfire/metadata.xml
index cf929e4bf..3daddf26e 100644
--- a/sci-libs/arrayfire/metadata.xml
+++ b/sci-libs/arrayfire/metadata.xml
@@ -11,7 +11,7 @@
Enable CPU Build.
</flag>flag>
<flag name="cuda">
- Enable CUDA Build.
- </flag>
+ Enable CUDA Build.
+ </flag>
</use>
</pkgmetadata>