From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 76CCD138CD4 for ; Sun, 24 May 2015 08:14:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53DDBE0AF9; Sun, 24 May 2015 08:14:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AAA8CE0AF5 for ; Sun, 24 May 2015 08:14:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C4071340BE2 for ; Sun, 24 May 2015 08:14:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 709969FD for ; Sun, 24 May 2015 08:14:38 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1432418913.dc850a29428b2c2bdcba6c7a6a5b08ce21d92775.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/arrayfire/arrayfire-0.9999.ebuild sci-libs/arrayfire/arrayfire-3.0_beta.ebuild X-VCS-Directories: sci-libs/arrayfire/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: dc850a29428b2c2bdcba6c7a6a5b08ce21d92775 X-VCS-Branch: master Date: Sun, 24 May 2015 08:14:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6fde944b-277b-4af4-99f5-f29e2f5e2683 X-Archives-Hash: 7aa1a7772ef4de575ca8f02c8f47cf45 commit: dc850a29428b2c2bdcba6c7a6a5b08ce21d92775 Author: Marius Brehler linux sungazer de> AuthorDate: Sat May 23 22:07:47 2015 +0000 Commit: Justin Lecher gentoo org> CommitDate: Sat May 23 22:08:33 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=dc850a29 sci-libs/arrayfire: Split ebuilds/Typechange sci-libs/arrayfire/arrayfire-0.9999.ebuild | 96 +++++++++++++++++++++++++++- sci-libs/arrayfire/arrayfire-3.0_beta.ebuild | 95 ++++++++++++++++++++++++++- 2 files changed, 189 insertions(+), 2 deletions(-) diff --git a/sci-libs/arrayfire/arrayfire-0.9999.ebuild b/sci-libs/arrayfire/arrayfire-0.9999.ebuild deleted file mode 120000 index 71d00d4..0000000 --- a/sci-libs/arrayfire/arrayfire-0.9999.ebuild +++ /dev/null @@ -1 +0,0 @@ -arrayfire-9999.ebuild \ No newline at end of file diff --git a/sci-libs/arrayfire/arrayfire-0.9999.ebuild b/sci-libs/arrayfire/arrayfire-0.9999.ebuild new file mode 100644 index 0000000..f8b1e5e --- /dev/null +++ b/sci-libs/arrayfire/arrayfire-0.9999.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cmake-utils git-r3 + +GTEST_PV="1.7.0" + +DESCRIPTION="A general purpose GPU library." +HOMEPAGE="http://www.arrayfire.com/" +EGIT_REPO_URI="https://github.com/${PN}/${PN}.git git://github.com/${PN}/${PN}.git" +SRC_URI="test? ( https://googletest.googlecode.com/files/gtest-${GTEST_PV}.zip )" +KEYWORDS="" +# the remote HEAD points to devel, but we want to pull the master instead +EGIT_BRANCH="master" + +LICENSE="BSD" +SLOT="0" +IUSE="+examples +cpu cuda opencl test" + +RDEPEND=" + >=sys-devel/gcc-4.7:* + cuda? ( + >=dev-util/nvidia-cuda-toolkit-6.0 + dev-libs/boost + ) + cpu? ( + virtual/blas + virtual/cblas + sci-libs/fftw:3.0 + ) + opencl? ( + dev-libs/boost + dev-libs/boost-compute + sci-libs/clblas + sci-libs/clfft + )" +DEPEND="${RDEPEND}" + +BUILD_DIR="${S}/build" +CMAKE_BUILD_TYPE=Release + +PATCHES=( + "${FILESDIR}"/${PN}-3.0_beta-FindCBLAS.patch + "${FILESDIR}"/${PN}-3.0_beta-FindBoostCompute.patch + "${FILESDIR}"/${PN}-3.0_beta-opencl_CMakeLists.patch +) + +# We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage +# user is (usually) not in the video group +RESTRICT="userpriv" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + if [[ $(gcc-major-version) -lt 4 ]] || ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) ; then + die "Compilation with gcc older than 4.7 is not supported." + fi + fi +} + +src_unpack() { + git-r3_src_unpack + + if use test; then + mkdir -p "${BUILD_DIR}"/third_party/src/ || die + cd "${BUILD_DIR}"/third_party/src/ || die + unpack ${A} + mv "${BUILD_DIR}"/third_party/src/gtest-"${GTEST_PV}" "${BUILD_DIR}"/third_party/src/googletest || die + fi +} + +src_configure() { + if use cuda; then + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + addwrite /dev/nvidia-uvm + fi + + local mycmakeargs=( + $(cmake-utils_use_build cpu CPU) + $(cmake-utils_use_build cuda CUDA) + $(cmake-utils_use_build opencl OPENCL) + $(cmake-utils_use_build examples EXAMPLES) + $(cmake-utils_use_build test TEST) + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + dobin "${BUILD_DIR}/bin2cpp" +} diff --git a/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild b/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild deleted file mode 120000 index 71d00d4..0000000 --- a/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild +++ /dev/null @@ -1 +0,0 @@ -arrayfire-9999.ebuild \ No newline at end of file diff --git a/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild b/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild new file mode 100644 index 0000000..8a08c8c --- /dev/null +++ b/sci-libs/arrayfire/arrayfire-3.0_beta.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cmake-utils git-r3 + +GTEST_PV="1.7.0" + +DESCRIPTION="A general purpose GPU library." +HOMEPAGE="http://www.arrayfire.com/" +EGIT_REPO_URI="https://github.com/${PN}/${PN}.git git://github.com/${PN}/${PN}.git" +SRC_URI="test? ( https://googletest.googlecode.com/files/gtest-${GTEST_PV}.zip )" +KEYWORDS="~amd64" +EGIT_COMMIT="v3.0beta" + +LICENSE="BSD" +SLOT="0" +IUSE="+examples +cpu cuda opencl test" + +RDEPEND=" + >=sys-devel/gcc-4.7:* + cuda? ( + >=dev-util/nvidia-cuda-toolkit-6.0 + dev-libs/boost + ) + cpu? ( + virtual/blas + virtual/cblas + sci-libs/fftw:3.0 + ) + opencl? ( + dev-libs/boost + dev-libs/boost-compute + sci-libs/clblas + sci-libs/clfft + )" +DEPEND="${RDEPEND}" + +BUILD_DIR="${S}/build" +CMAKE_BUILD_TYPE=Release + +PATCHES=( + "${FILESDIR}"/${P}-FindCBLAS.patch + "${FILESDIR}"/${P}-FindBoostCompute.patch + "${FILESDIR}"/${P}-opencl_CMakeLists.patch +) + +# We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage +# user is (usually) not in the video group +RESTRICT="userpriv" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + if [[ $(gcc-major-version) -lt 4 ]] || ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) ; then + die "Compilation with gcc older than 4.7 is not supported." + fi + fi +} + +src_unpack() { + git-r3_src_unpack + + if use test; then + mkdir -p "${BUILD_DIR}"/third_party/src/ || die + cd "${BUILD_DIR}"/third_party/src/ || die + unpack ${A} + mv "${BUILD_DIR}"/third_party/src/gtest-"${GTEST_PV}" "${BUILD_DIR}"/third_party/src/googletest || die + fi +} + +src_configure() { + if use cuda; then + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + addwrite /dev/nvidia-uvm + fi + + local mycmakeargs=( + $(cmake-utils_use_build cpu CPU) + $(cmake-utils_use_build cuda CUDA) + $(cmake-utils_use_build opencl OPENCL) + $(cmake-utils_use_build examples EXAMPLES) + $(cmake-utils_use_build test TEST) + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + dobin "${BUILD_DIR}/bin2cpp" +}