commit:     3f4a03852147c9d973553c04b3b8a55db7883841
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  9 08:56:12 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Sep  9 08:56:12 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3f4a0385

Revert "Moved to tree"

This reverts commit a61f96baf2878bf949096a45ad824a0ccb7a0bec.

 dev-util/nvidia-cuda-gdk/ChangeLog                 |  36 ++++
 dev-util/nvidia-cuda-gdk/files/nvidia-healthmon    |   9 +
 dev-util/nvidia-cuda-gdk/metadata.xml              |  25 +++
 .../nvidia-cuda-gdk/nvidia-cuda-gdk-340.29.ebuild  | 131 +++++++++++++++
 .../nvidia-cuda-gdk/nvidia-cuda-gdk-346.46.ebuild  | 121 ++++++++++++++
 .../nvidia-cuda-gdk/nvidia-cuda-gdk-352.07.ebuild  | 183 +++++++++++++++++++++
 dev-util/nvidia-cuda-toolkit/ChangeLog             |   9 +
 dev-util/nvidia-cuda-toolkit/files/cuda-config.in  |  28 ++++
 dev-util/nvidia-cuda-toolkit/metadata.xml          |  14 ++
 .../nvidia-cuda-toolkit-7.5.18.ebuild              | 143 ++++++++++++++++
 .../nvidia-cuda-toolkit-7.5.7.ebuild               | 152 +++++++++++++++++
 11 files changed, 851 insertions(+)

diff --git a/dev-util/nvidia-cuda-gdk/ChangeLog 
b/dev-util/nvidia-cuda-gdk/ChangeLog
new file mode 100644
index 0000000..8f96e13
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/ChangeLog
@@ -0,0 +1,36 @@
+# ChangeLog for dev-util/nvidia-cuda-gdk
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Id$
+
+*nvidia-cuda-gdk-352.07 (21 Jul 2015)
+
+  21 Jul 2015; Marius Brehler <[email protected]>
+  +nvidia-cuda-gdk-352.07.ebuild, metadata.xml:
+  dev-util/nvidia-cuda-gdk: Version bump
+
+*nvidia-cuda-gdk-346.46 (19 Mar 2015)
+
+  19 Mar 2015; Marius Brehler <[email protected]>
+  +nvidia-cuda-gdk-346.46.ebuild:
+  Version bump
+
+  19 Jan 2015; Marius Brehler <[email protected]>
+  nvidia-cuda-gdk-340.29.ebuild:
+  Fix /opt/bin/nvidia-healthmon
+
+  01 Dec 2014; Justin Lecher <[email protected]> nvidia-cuda-gdk-340.29.ebuild:
+  Drop empty lines, clean variable names and quoting
+
+  30 Nov 2014; Marius Brehler <[email protected]>
+  nvidia-cuda-gdk-340.29.ebuild:
+  Fix symlink
+
+  19 Nov 2014; Marius Brehler <[email protected]>
+  nvidia-cuda-gdk-340.29.ebuild:
+  Add ~x86 keyword
+
+*nvidia-cuda-gdk-340.29 (18 Nov 2014)
+
+  18 Nov 2014; Marius Brehler <[email protected]>
+  +files/nvidia-healthmon, +metadata.xml, +nvidia-cuda-gdk-340.29.ebuild:
+  Inital commit.

diff --git a/dev-util/nvidia-cuda-gdk/files/nvidia-healthmon 
b/dev-util/nvidia-cuda-gdk/files/nvidia-healthmon
new file mode 100644
index 0000000..caf1b00
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/files/nvidia-healthmon
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+while getopts ":c" opt
+do
+       case $opt in
+               c) exec /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon "$@";;
+               *) exec /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon -c 
/etc/nvidia-healthmon/nvidia-healthmon.conf "$@";;
+       esac
+done
\ No newline at end of file

diff --git a/dev-util/nvidia-cuda-gdk/metadata.xml 
b/dev-util/nvidia-cuda-gdk/metadata.xml
new file mode 100644
index 0000000..73b4e6c
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <herd>sci</herd>
+  <maintainer>
+    <email>[email protected]</email>
+    <name>Marius Brehler</name>
+  </maintainer>
+  <longdescription>
+    The GPU Deployment Kit (previously known as the Tesla Deployment
+    Kit) is a set of tools provided for the NVIDIA Tesla™, GRID™ and
+    Quadro™ GPUs.
+  </longdescription>
+  <use>
+    <flag name="healthmon">
+                       Install nvidia-healthmon.
+               </flag>
+    <flag name="nvml">
+                       Install the NVIDIA Managment Library.
+               </flag>
+    <flag name="nvvs">
+      Install the NVIDIA Validation Suite.
+    </flag>
+  </use>
+</pkgmetadata>

diff --git a/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-340.29.ebuild 
b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-340.29.ebuild
new file mode 100644
index 0000000..b6b736b
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-340.29.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils portability toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
+
+DESCRIPTION="NVIDIA GPU Deployment Kit"
+HOMEPAGE="https://developer.nvidia.com/gpu-deployment-kit";
+CURI="http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers";
+SRC_URI="
+       amd64? ( ${CURI}/cuda_${MYD}_gdk_linux_64.run )
+       x86? ( ${CURI}/cuda_${MYD}_gdk_linux_32.run )"
+
+LICENSE="NVIDIA-gdk"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+healthmon +nvml +doc examples"
+
+RDEPEND="
+       >=dev-util/nvidia-cuda-toolkit-6.5
+       media-libs/freeglut
+       examples? ( >=x11-drivers/nvidia-drivers-340.32[uvm] )
+       "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/payload"
+
+QA_PREBUILT="/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/gpu_rdma_bw
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/ibv_rdma_bw
+       /opt/cuda/gdk/nvml/lib/libnvidia-ml.so.1"
+
+src_unpack() {
+       unpacker
+}
+
+src_compile() {
+       use examples || return
+       cd "${S}"/nvml/example || die
+       emake
+}
+
+src_install() {
+       local i j f t _arch
+       if use amd64; then
+               _arch=amd64;
+       elif use x86; then
+               _arch=x86;
+       else
+               die;
+       fi
+
+       if use doc; then
+               if use healthmon ; then
+                       ebegin "Installing healthmon docs..."
+                               doman 
nvidia-healthmon/docs/man/man8/nvidia-healthmon.8
+                               cd 
"${S}/nvidia-healthmon/nvidia-healthmon-${_arch}-${PV}" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYING.txt -o -name "*.pdf" \)) \
+                                       
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/ -type f -name readme.txt | sed -e 
"s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+
+               if use nvml ; then
+                       ebegin "Installing nvml docs..."
+                               doman nvml/doc/man/man3/*.3
+                               cd "${S}/nvml/" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYRIGHT.txt -o -name "*.pdf" \)) \
+                                       "${ED}"/usr/share/doc/${PF}/nvml/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvml/ -type f -name readme.txt | sed -e "s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+       fi
+
+       ebegin "Cleaning before installation..."
+               find -type f \
+                       \( -name "*.o" -o -name "*.pdf" -o -name "*.txt" -o 
-name "*.3" \) -delete \
+                       || die
+               rm -f "${S}"/nvml/lib/libnvidia-ml.so
+       eend
+
+       if use healthmon; then
+               ebegin "Installing nvidia-healthmon"
+                       exeinto 
/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-${_arch}-${PV}/bin"/{*,*.*}
+                       exeinto /opt/cuda/gdk/nvidia-healthmon/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-${_arch}-${PV}"/nvidia-healthmon
+                       insinto /etc/nvidia-healthmon/
+                       doins 
"nvidia-healthmon/nvidia-healthmon-${_arch}-${PV}"/nvidia-healthmon.conf
+
+                       # install launch script
+                       exeinto /opt/bin
+                       doexe "${FILESDIR}"/nvidia-healthmon
+               eend
+       fi
+
+       if use nvml; then
+               ebegin "Installing nvml"
+                       cd "${S}/nvml" || die
+                       for f in $(find .); do
+                               local t="$(dirname ${f})"
+                               if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == 
"a" ]]; then
+                                       continue
+                               fi
+
+                               if [[ ! -d "${f}" ]]; then
+                                       if [[ -x "${f}" ]]; then
+                                               exeinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doexe "${f}"
+                                       else
+                                               insinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doins "${f}"
+                                       fi
+                               fi
+                       done
+
+                       dosym libnvidia-ml.so.1 
/opt/cuda/gdk/nvml/lib/libnvidia-ml.so
+                       cd "${S}/" || die
+               eend
+       fi
+}

diff --git a/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-346.46.ebuild 
b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-346.46.ebuild
new file mode 100644
index 0000000..20c6d53
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-346.46.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils portability toolchain-funcs unpacker versionator
+
+HEALTMON_PV="346.45"
+
+DESCRIPTION="NVIDIA GPU Deployment Kit"
+HOMEPAGE="https://developer.nvidia.com/gpu-deployment-kit";
+SRC_URI="http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_${PV}_gdk_linux.run";
+
+LICENSE="NVIDIA-gdk"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+IUSE="+healthmon +nvml +doc examples"
+
+RDEPEND="
+       >=dev-util/nvidia-cuda-toolkit-7.0
+       media-libs/freeglut
+       examples? ( >=x11-drivers/nvidia-drivers-346.47[uvm] )
+       "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/payload"
+
+QA_PREBUILT="/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/gpu_rdma_bw
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/ibv_rdma_bw
+       /opt/cuda/gdk/nvml/lib/libnvidia-ml.so.1"
+
+src_unpack() {
+       unpacker
+}
+
+src_compile() {
+       use examples || return
+       cd "${S}"/nvml/example || die
+       emake
+}
+
+src_install() {
+       local i j f t
+
+       if use doc; then
+               if use healthmon ; then
+                       ebegin "Installing healthmon docs..."
+                               doman 
nvidia-healthmon/docs/man/man8/nvidia-healthmon.8
+                               cd 
"${S}/nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYING.txt -o -name "*.pdf" \)) \
+                                       
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/ -type f -name readme.txt | sed -e 
"s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+
+               if use nvml ; then
+                       ebegin "Installing nvml docs..."
+                               doman nvml/doc/man/man3/*.3
+                               cd "${S}/nvml/" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYRIGHT.txt -o -name "*.pdf" \)) \
+                                       "${ED}"/usr/share/doc/${PF}/nvml/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvml/ -type f -name readme.txt | sed -e "s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+       fi
+
+       ebegin "Cleaning before installation..."
+               find -type f \
+                       \( -name "*.o" -o -name "*.pdf" -o -name "*.txt" -o 
-name "*.3" \) -delete \
+                       || die
+               rm -f "${S}"/nvml/lib/libnvidia-ml.so
+       eend
+
+       if use healthmon; then
+               ebegin "Installing nvidia-healthmon"
+                       exeinto 
/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}/bin"/{*,*.*}
+                       exeinto /opt/cuda/gdk/nvidia-healthmon/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon
+                       insinto /etc/nvidia-healthmon/
+                       doins 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon.conf
+
+                       # install launch script
+                       exeinto /opt/bin
+                       doexe "${FILESDIR}"/nvidia-healthmon
+               eend
+       fi
+
+       if use nvml; then
+               ebegin "Installing nvml"
+                       cd "${S}/nvml" || die
+                       for f in $(find .); do
+                               local t="$(dirname ${f})"
+                               if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == 
"a" ]]; then
+                                       continue
+                               fi
+
+                               if [[ ! -d "${f}" ]]; then
+                                       if [[ -x "${f}" ]]; then
+                                               exeinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doexe "${f}"
+                                       else
+                                               insinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doins "${f}"
+                                       fi
+                               fi
+                       done
+
+                       dosym libnvidia-ml.so.1 
/opt/cuda/gdk/nvml/lib/libnvidia-ml.so
+                       cd "${S}/" || die
+               eend
+       fi
+}

diff --git a/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.07.ebuild 
b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.07.ebuild
new file mode 100644
index 0000000..6b59192
--- /dev/null
+++ b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.07.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils portability toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
+
+HEALTMON_PV="352.06"
+NVVS_PV="352.06"
+
+DESCRIPTION="NVIDIA GPU Deployment Kit"
+HOMEPAGE="http://developer.nvidia.com/cuda";
+CURI="https://developer.nvidia.com/rdp/cuda-75-release-candidate";
+SRC_URI="cuda_${MYD}_rc_gdk_linux.run"
+
+LICENSE="NVIDIA-gdk"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+IUSE="+healthmon +nvml +doc examples +nvvs"
+
+RDEPEND="
+       >=dev-util/nvidia-cuda-toolkit-7.5
+       media-libs/freeglut
+       examples? ( >=x11-drivers/nvidia-drivers-352.07[uvm] )
+       "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/payload"
+
+QA_PREBUILT="/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/gpu_rdma_bw
+       /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/ibv_rdma_bw
+       /opt/cuda/gdk/nvml/lib/libnvidia-ml.so.1
+       /opt/cuda/gdk/nvvs/plugins/libMemory.so.1
+       /opt/cuda/gdk/nvvs/plugins/libDeployment.so.1
+       /opt/cuda/gdk/nvvs/plugins/libPcie.so.1
+       /opt/cuda/gdk/nvvs/nvvs
+       "
+
+RESTRICT="fetch"
+
+pkg_nofetch() {
+       einfo "Please download the RHEL 7 \"runfile (local)\" installer"
+       einfo "  - cuda_${MYD}_rc_gdk_linux.run"
+       einfo "from ${CURI} and place it in ${DISTDIR}"
+}
+
+src_unpack() {
+       unpacker
+}
+
+src_compile() {
+       use examples || return
+       cd "${S}"/nvml/example || die
+       emake
+}
+
+src_install() {
+       local i j f t
+
+       if use doc; then
+               if use healthmon ; then
+                       ebegin "Installing healthmon docs..."
+                               doman 
nvidia-healthmon/docs/man/man8/nvidia-healthmon.8
+                               cd 
"${S}/nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYING.txt -o -name "*.pdf" \)) \
+                                       
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvidia-healthmon/ -type f -name readme.txt | sed -e 
"s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+
+               if use nvml ; then
+                       ebegin "Installing nvml docs..."
+                               doman nvml/doc/man/man3/*.3
+                               cd "${S}/nvml/" || die
+                               treecopy \
+                                       $(find -type f \( -name README.txt 
-name COPYRIGHT.txt -o -name "*.pdf" \)) \
+                                       "${ED}"/usr/share/doc/${PF}/nvml/
+                               docompress -x \
+                                       $(find 
"${ED}"/usr/share/doc/${PF}/nvml/ -type f -name readme.txt | sed -e "s:${ED}::")
+                               cd "${S}/" || die
+                       eend
+               fi
+
+               if use nvvs ; then
+                       ebegin "Installing validation suite docs..."
+                               doman 
"nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/docs/man/man8/nvvs.8"
+                       eend
+               fi
+
+       fi
+
+       ebegin "Cleaning before installation..."
+               find -type f \
+                       \( -name "*.o" -o -name "*.pdf" -o -name "*.txt" -o 
-name "*.3" -o -name "*.8" \) -delete \
+                       || die
+               rm -f "${S}"/nvml/lib/libnvidia-ml.so
+               rm -f 
"${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libDeployment.so
+               rm -f 
"${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libMemory.so
+               rm -f 
"${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libPcie.so
+               rm -f 
"${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}"/nvidia-vs
+       eend
+
+       if use healthmon; then
+               ebegin "Installing nvidia-healthmon"
+                       exeinto 
/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}/bin"/{*,*.*}
+                       exeinto /opt/cuda/gdk/nvidia-healthmon/
+                       doexe 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon
+                       insinto /etc/nvidia-healthmon/
+                       doins 
"nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon.conf
+
+                       # install launch script
+                       exeinto /opt/bin
+                       doexe "${FILESDIR}"/nvidia-healthmon
+               eend
+       fi
+
+       if use nvml; then
+               ebegin "Installing nvml"
+                       cd "${S}/nvml" || die
+                       for f in $(find .); do
+                               local t="$(dirname ${f})"
+                               if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == 
"a" ]]; then
+                                       continue
+                               fi
+
+                               if [[ ! -d "${f}" ]]; then
+                                       if [[ -x "${f}" ]]; then
+                                               exeinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doexe "${f}"
+                                       else
+                                               insinto 
"/opt/cuda/gdk/nvml/${t}"
+                                               doins "${f}"
+                                       fi
+                               fi
+                       done
+
+                       dosym libnvidia-ml.so.1 
/opt/cuda/gdk/nvml/lib/libnvidia-ml.so
+                       cd "${S}/" || die
+               eend
+       fi
+
+       if use nvvs; then
+               ebegin "Installing validation suite"
+                       cd 
"${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/" || die
+
+                       insinto /etc/nvidia-validation-suite/
+                       doins nvvs.conf
+                       rm nvvs.conf || die
+
+                       for f in $(find .); do
+                               local t="$(dirname ${f})"
+                               if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == 
"a" ]]; then
+                                       continue
+                               fi
+
+                               if [[ ! -d "${f}" ]]; then
+                                       if [[ -x "${f}" ]]; then
+                                               exeinto 
"/opt/cuda/gdk/nvvs/${t}"
+                                               doexe "${f}"
+                                       else
+                                               insinto 
"/opt/cuda/gdk/nvvs/${t}"
+                                               doins "${f}"
+                                       fi
+                               fi
+                       done
+
+                       dosym libDeployment.so.1 
/opt/cuda/gdk/nvvs/plugins/libDeployment.so
+                       dosym libMemory.so.1 
/opt/cuda/gdk/nvvs/plugins/libMemory.so
+                       dosym libPcie.so.1 /opt/cuda/gdk/nvvs/plugins/libPcie.so
+
+                       dosym /opt/cuda/gdk/nvvs/nvvs /opt/bin/nvidia-vs
+                       cd "${S}/" || die
+               eend
+       fi
+}

diff --git a/dev-util/nvidia-cuda-toolkit/ChangeLog 
b/dev-util/nvidia-cuda-toolkit/ChangeLog
new file mode 100644
index 0000000..fe9ee4d
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-util/nvidia-cuda-toolkit
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Id$
+
+*nvidia-cuda-toolkit-7.5.7 (08 Jul 2015)
+
+  08 Jul 2015; Marius Brehler <[email protected]> +files/cuda-config.in,
+  +metadata.xml, +nvidia-cuda-toolkit-7.5.7.ebuild:
+  dev-util/nvidia-cuda-toolkit: Add CUDA 7.5 release candidate

diff --git a/dev-util/nvidia-cuda-toolkit/files/cuda-config.in 
b/dev-util/nvidia-cuda-toolkit/files/cuda-config.in
new file mode 100644
index 0000000..ca0d1d7
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/files/cuda-config.in
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+SUPPORT_GCC_VERSIONS_BY_CUDA="CUDA_SUPPORTED_GCC"
+
+_print_help() {
+       cat <<- EOF
+       Usage:
+               $(basename $0) [options]
+       
+               -s | --supported   Returns by current CUDA supported gcc 
versions
+               -h | --help        Shows this help
+       EOF
+}
+
+case ${1} in
+       -s|--supported)
+               echo "${SUPPORT_GCC_VERSIONS_BY_CUDA}"
+               exit 0
+               ;;
+       -h|--help)
+               _print_help
+               exit -1
+               ;;
+       *)
+               _print_help
+               exit 1
+               ;;
+esac

diff --git a/dev-util/nvidia-cuda-toolkit/metadata.xml 
b/dev-util/nvidia-cuda-toolkit/metadata.xml
new file mode 100644
index 0000000..e099ba5
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <herd>sci</herd>
+  <use>
+    <flag name="profiler">
+                       Installs the NVIDIA CUDA visual profiler.
+               </flag>
+    <flag name="debugger">
+                       Installs the CUDA debugger.
+               </flag>
+    <flag name="eclipse">Install the <pkg>dev-util/eclipse-sdk</pkg> 
plugins</flag>
+  </use>
+</pkgmetadata>

diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18.ebuild 
b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18.ebuild
new file mode 100644
index 0000000..0ffc597
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit check-reqs cuda unpacker versionator
+
+MYD=$(get_version_component_range 1-2)
+
+DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
+HOMEPAGE="http://developer.nvidia.com/cuda";
+SRC_URI="http://developer.download.nvidia.com/compute/cuda/${MYD}/Prod/local_installers/cuda_${PV}_linux.run";
+
+SLOT="0/${PV}"
+LICENSE="NVIDIA-CUDA"
+KEYWORDS="-* ~amd64 ~amd64-linux"
+IUSE="debugger doc eclipse profiler"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+       >=sys-devel/gcc-4.7[cxx]
+       >=x11-drivers/nvidia-drivers-352.39[uvm]
+       debugger? (
+               sys-libs/libtermcap-compat
+               sys-libs/ncurses[tinfo]
+               )
+       eclipse? ( >=virtual/jre-1.6 )
+       profiler? ( >=virtual/jre-1.6 )"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/cuda/*"
+
+CHECKREQS_DISK_BUILD="1500M"
+
+pkg_setup() {
+       # We don't like to run cuda_pkg_setup as it depends on us
+       check-reqs_pkg_setup
+}
+
+src_unpack() {
+       unpacker
+       unpacker run_files/cuda-linux*.run
+}
+
+src_prepare() {
+       local cuda_supported_gcc
+
+       cuda_supported_gcc="4.7 4.8 4.9"
+
+       sed \
+               -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
+               "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
+}
+
+src_install() {
+       local i j
+       local remove="doc jre run_files install-linux.pl "
+       local cudadir=/opt/cuda
+       local ecudadir="${EPREFIX}"${cudadir}
+
+       # dodoc doc/*txt
+       if use doc; then
+               dodoc doc/pdf/*
+               dohtml -r doc/html/*
+       fi
+
+       mv doc/man/man3/{,cuda-}deprecated.3 || die
+       doman doc/man/man*/*
+
+       use debugger || remove+=" bin/cuda-gdb extras/Debugger"
+       ( use profiler || use eclipse ) || remove+=" libnsight"
+       remove+=" cuda-installer.pl"
+
+       if use profiler; then
+               # hack found in install-linux.pl
+               for j in nvvp nsight; do
+                       cat > bin/${j} <<- EOF
+                               #!${EPREFIX}/bin/sh
+                               
LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:${ecudadir}/lib:${ecudadir}/lib64 \
+                                       UBUNTU_MENUPROXY=0 
LIBOVERLAY_SCROLLBAR=0 \
+                                       ${ecudadir}/lib${j}/${j} -vm 
${EPREFIX}/usr/bin/java
+                       EOF
+                       chmod a+x bin/${j}
+               done
+       else
+               use eclipse || remove+=" libnvvp"
+               remove+=" extras/CUPTI"
+       fi
+
+       for i in ${remove}; do
+       ebegin "Cleaning ${i}..."
+               if [[ -e ${i} ]]; then
+                       find ${i} -delete || die
+                       eend
+               else
+                       eend $1
+               fi
+       done
+
+       ln -sf lib lib32 || die
+
+       dodir ${cudadir}
+       mv * "${ED}"${cudadir} || die
+
+       cat > "${T}"/99cuda <<- EOF
+               PATH=${ecudadir}/bin$(use profiler && echo 
":${ecudadir}/libnvvp")
+               ROOTPATH=${ecudadir}/bin
+               LDPATH=${ecudadir}/lib64:${ecudadir}/lib
+       EOF
+       doenvd "${T}"/99cuda
+
+       use profiler && \
+               make_wrapper nvprof "${EPREFIX}"${cudadir}/bin/nvprof "." 
${ecudadir}/lib64:${ecudadir}/lib
+
+       dobin "${T}"/cuda-config
+}
+
+pkg_postinst_check() {
+       local a b
+       a="$(version_sort $(cuda-config -s))"; a=( $a )
+       # greatest supported version
+       b=${a[${#a[@]}-1]}
+
+       # if gcc and if not gcc-version is at least greatesst supported
+       if [[ $(tc-getCC) == *gcc* ]] && \
+               ! version_is_at_least $(gcc-version) ${b}; then
+                       echo
+                       ewarn "gcc >= ${b} will not work with CUDA"
+                       ewarn "Make sure you set an earlier version of gcc with 
gcc-config"
+                       ewarn "or append --compiler-bindir= pointing to a gcc 
bindir like"
+                       ewarn 
"--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
+                       ewarn "to the nvcc compiler flags"
+                       echo
+       fi
+}
+
+pkg_postinst() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               pkg_postinst_check
+       fi
+}

diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.7.ebuild 
b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.7.ebuild
new file mode 100644
index 0000000..2dfb4f3
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.7.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit check-reqs cuda unpacker versionator
+
+MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
+
+DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
+HOMEPAGE="http://developer.nvidia.com/cuda";
+CURI="https://developer.nvidia.com/rdp/cuda-75-release-candidate";
+SRC_URI="cuda_${PV}_rc_linux.run"
+
+SLOT="0/${PV}"
+LICENSE="NVIDIA-CUDA"
+KEYWORDS="-* ~amd64 ~amd64-linux"
+IUSE="debugger doc eclipse profiler"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+       >=sys-devel/gcc-4.7[cxx]
+       >=x11-drivers/nvidia-drivers-352.07[uvm]
+       debugger? (
+               sys-libs/libtermcap-compat
+               sys-libs/ncurses[tinfo]
+               )
+       eclipse? ( >=virtual/jre-1.6 )
+       profiler? ( >=virtual/jre-1.6 )"
+
+RESTRICT="fetch"
+
+pkg_nofetch() {
+       einfo "Please download the RHEL 7 \"runfile (local)\" installer"
+       einfo "  - cuda_${P}_rc_linux.run"
+       einfo "from ${CURI} and place it in ${DISTDIR}"
+}
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/cuda/*"
+
+CHECKREQS_DISK_BUILD="1500M"
+
+pkg_setup() {
+       # We don't like to run cuda_pkg_setup as it depends on us
+       check-reqs_pkg_setup
+}
+
+src_unpack() {
+       unpacker
+       unpacker run_files/cuda-linux*.run
+}
+
+src_prepare() {
+       local cuda_supported_gcc
+
+       cuda_supported_gcc="4.7 4.8 4.9"
+
+       sed \
+               -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
+               "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
+}
+
+src_install() {
+       local i j
+       local remove="doc jre run_files install-linux.pl "
+       local cudadir=/opt/cuda
+       local ecudadir="${EPREFIX}"${cudadir}
+
+       # dodoc doc/*txt
+       if use doc; then
+               dodoc doc/pdf/*
+               dohtml -r doc/html/*
+       fi
+
+       mv doc/man/man3/{,cuda-}deprecated.3 || die
+       doman doc/man/man*/*
+
+       use debugger || remove+=" bin/cuda-gdb extras/Debugger"
+       ( use profiler || use eclipse ) || remove+=" libnsight"
+       remove+=" cuda-installer.pl"
+
+       if use profiler; then
+               # hack found in install-linux.pl
+               for j in nvvp nsight; do
+                       cat > bin/${j} <<- EOF
+                               #!${EPREFIX}/bin/sh
+                               
LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:${ecudadir}/lib:${ecudadir}/lib64 \
+                                       UBUNTU_MENUPROXY=0 
LIBOVERLAY_SCROLLBAR=0 \
+                                       ${ecudadir}/lib${j}/${j} -vm 
${EPREFIX}/usr/bin/java
+                       EOF
+                       chmod a+x bin/${j}
+               done
+       else
+               use eclipse || remove+=" libnvvp"
+               remove+=" extras/CUPTI"
+       fi
+
+       for i in ${remove}; do
+       ebegin "Cleaning ${i}..."
+               if [[ -e ${i} ]]; then
+                       find ${i} -delete || die
+                       eend
+               else
+                       eend $1
+               fi
+       done
+
+       ln -sf lib lib32 || die
+
+       dodir ${cudadir}
+       mv * "${ED}"${cudadir} || die
+
+       cat > "${T}"/99cuda <<- EOF
+               PATH=${ecudadir}/bin$(use profiler && echo 
":${ecudadir}/libnvvp")
+               ROOTPATH=${ecudadir}/bin
+               LDPATH=${ecudadir}/lib64:${ecudadir}/lib
+       EOF
+       doenvd "${T}"/99cuda
+
+       use profiler && \
+               make_wrapper nvprof "${EPREFIX}"${cudadir}/bin/nvprof "." 
${ecudadir}/lib64:${ecudadir}/lib
+
+       dobin "${T}"/cuda-config
+}
+
+pkg_postinst_check() {
+       local a b
+       a="$(version_sort $(cuda-config -s))"; a=( $a )
+       # greatest supported version
+       b=${a[${#a[@]}-1]}
+
+       # if gcc and if not gcc-version is at least greatesst supported
+       if [[ $(tc-getCC) == *gcc* ]] && \
+               ! version_is_at_least $(gcc-version) ${b}; then
+                       echo
+                       ewarn "gcc >= ${b} will not work with CUDA"
+                       ewarn "Make sure you set an earlier version of gcc with 
gcc-config"
+                       ewarn "or append --compiler-bindir= pointing to a gcc 
bindir like"
+                       ewarn 
"--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
+                       ewarn "to the nvcc compiler flags"
+                       echo
+       fi
+}
+
+pkg_postinst() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               pkg_postinst_check
+       fi
+}

Reply via email to