diff options
author | Justin <jlec@gentoo.org> | 2014-07-10 08:35:05 +0200 |
---|---|---|
committer | Justin <jlec@gentoo.org> | 2014-07-10 08:35:05 +0200 |
commit | 3f966a37b79e4bdf4d804528b9f56fd89167a4d7 (patch) | |
tree | 85656c3a6d3d30202509e52674170fb6bdfb1f33 | |
parent | sync with gx86, fix FEATURES=test (diff) | |
parent | dev-util/nvidia-cuda-toolkit: dev-util/nvidia-cuda-toolkit: add version 6.5.11 (diff) | |
download | sci-3f966a37b79e4bdf4d804528b9f56fd89167a4d7.tar.gz sci-3f966a37b79e4bdf4d804528b9f56fd89167a4d7.tar.bz2 sci-3f966a37b79e4bdf4d804528b9f56fd89167a4d7.zip |
Merge pull request #239 from marbre/nvidia-cuda-toolkit
dev-util/nvidia-cuda-toolkit: add version 6.5.11
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/Manifest | 2 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/files/cuda-config.in | 28 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/metadata.xml | 14 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.11.ebuild | 152 |
5 files changed, 205 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/ChangeLog b/dev-util/nvidia-cuda-toolkit/ChangeLog new file mode 100644 index 000000000..d8307ea3a --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-util/nvidia-cuda-toolkit +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*nvidia-cuda-toolkit-6.5.11 (10 Jul 2014) + + 10 Jul 2014; Marius Brehler <marbre@linux.sungazer.de> +files/cuda-config.in, + +metadata.xml, +nvidia-cuda-toolkit-6.5.11.ebuild: + dev-util/nvidia-cuda-toolkit: dev-util/nvidia-cuda-toolkit: add version 6.5.11 diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest new file mode 100644 index 000000000..a3c502527 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -0,0 +1,2 @@ +DIST cuda_6.5.11_rc_linux_32.run 76815336 SHA256 18b4d786cf78258ea0177cd77a33058f81a5f334a99cf342400575247559ed72 SHA512 7e7ab02d9baae10b9115720a58829a267719ba27785d04ec2eb0b5711d158bc174d5c5d300e2e8a5f7cfe9b19f5d0ba798e89f61bf6e48c5ec0c4c12ac02ad97 WHIRLPOOL 151c5bb6f5ccf57a30097af4912fa6e53732bf63eb7a409d850f0133bc7a3ee291347514edcc9fc8221dd712343031c4226e79327e3f42f0442b707d2163dd4f +DIST cuda_6.5.11_rc_linux_64.run 965707668 SHA256 1e8bd68a8eceff880ff631cbf6fdba06696a76933663f77b4a6f71522d732ac7 SHA512 7c5b344c5e8a808f052592753415c2fedb9b45b2bc83fa400b9a6f14eeb1e4308712c3fb1d25e3df72d014b645aa803670e528fd6fd758b2c48d94adc9963fc0 WHIRLPOOL 57085612e0cca66a3436352f8ff4af9fb584e37bf357ba23fc821048fb86dce51bf00a513e28dec06a9a0005bc3ef620f2fa366b895cc096142463fddba05dcf 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 000000000..ca0d1d77e --- /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 000000000..e099ba557 --- /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-6.5.11.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.11.ebuild new file mode 100644 index 000000000..494ee097d --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.11.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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-65-rc-toolkit-download" +SRC_URI=" + amd64? ( cuda_${PV}_rc_linux_64.run ) + x86? ( cuda_${PV}_rc_linux_32.run )" + +SLOT="0/${PV}" +LICENSE="NVIDIA-CUDA" +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debugger doc eclipse profiler" + +DEPEND="" +RDEPEND="${DEPEND} + <sys-devel/gcc-4.9[cxx] + >=x11-drivers/nvidia-drivers-340.24[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" + einfo " - cuda_${P}_rc_linux64.run or" + einfo " - cuda_${P}_rc_linux32.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.8" + + 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" + use amd64 || 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 + + dodir ${cudadir} + mv * "${ED}"${cudadir} + + cat > "${T}"/99cuda <<- EOF + PATH=${ecudadir}/bin:${ecudadir}/libnvvp + ROOTPATH=${ecudadir}/bin + LDPATH=${ecudadir}/lib$(use amd64 && echo "64:${ecudadir}/lib") + EOF + doenvd "${T}"/99cuda + + make_wrapper nvprof "${EPREFIX}"${cudadir}/bin/nvprof "." ${ecudadir}/lib$(use amd64 && echo "64:${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 +} |