diff options
Diffstat (limited to 'dev-util/nvidia-cuda-toolkit')
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/Manifest | 1 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.0.176.ebuild | 136 |
2 files changed, 137 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index 428326414500..f329c1caa5e1 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -5,3 +5,4 @@ DIST cuda_6.5.19_linux_64.run 982446238 SHA256 5279bc159b72b7445d8aae5f289d24bb4 DIST cuda_7.5.18_linux.run 1195424633 SHA256 08411d536741075131a1858a68615b8b73c51988e616e83b835e4632eea75eec SHA512 97459dfd124060200f1c43f763e5bce0bea53e35ed4bef72bee6c8ba1c04ecffb8695af11755443513316f91fdb5cb4d35662f7b87bca7e3de85d562d4e49363 WHIRLPOOL 59d186f5e9176db25e5991e8088417ac778953c3ed2f0dcef034968f7ea695c5d4cfea81759ac0f7f1290c3842d9d0339b5b74d2d90ec8b333135aa1b986ca10 DIST cuda_8.0.44_linux.run 1457082926 SHA256 64dc4ab867261a0d690735c46d7cc9fc60d989da0d69dc04d1714e409cacbdf0 SHA512 1bf9d8e6b853c2a971b8d908a043adc5b11ec7033faed04a773c42680882753f98bc33b46f6b301c24c0f780f74bc237dce5766fc857f1a905e6c1f200728d86 WHIRLPOOL e90fa2088cd70aef2794c1ce2db126d6186bc3c44d14c1cf7cb4a66f889cbb4799485d1d71ab045e2dfaed9bfabcea224ca04b7f97e9bce061ac9fbd31c62fdd DIST cuda_8.0.61_375.26_linux.run 1465528129 SHA256 9ceca9c2397f841024e03410bfd6eabfd72b384256fbed1c1e4834b5b0ce9dc4 SHA512 d22303719a9feff64f95bf6a966f1caa2bf0cf8c955e475ce08ce54faa5e098d336c2db223ef0185c1f23b9c52b7d2f81a63515485219cfc016d72bda979248b WHIRLPOOL 650a0e8bc9ad2d0637cd4a82a057bf77e613559d1080a86009f594c73adb8879de62b26dac9d8e3f572806556bf878505382479e596d4ce91929ab94b882489a +DIST cuda_9.0.176_384.81_linux.run 1643293725 SHA256 96863423feaa50b5c1c5e1b9ec537ef7ba77576a3986652351ae43e66bcd080c SHA512 00e24638c02d049c575732dee5237db21f7c451b606f37cf95e44e89d47d0cb055255e9f70dc013298c9e0d224147f239488558904556b68572e3f31935489a9 WHIRLPOOL 714b4dea7cae742a97898bd9377e821a4448504119589e10bcdabce1f7f82a87a9f30f6e9291041f0d038eab70326893772859ee09891d62632afefac2e9240a diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.0.176.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.0.176.ebuild new file mode 100644 index 000000000000..11c4204639e7 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.0.176.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit check-reqs cuda toolchain-funcs unpacker versionator + +MYD=$(get_version_component_range 1-2) +DRIVER_PV="384.81" + +DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" +HOMEPAGE="https://developer.nvidia.com/cuda-zone" +SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod/local_installers/cuda_${PV}_${DRIVER_PV}_linux-run -> cuda_${PV}_${DRIVER_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] + <sys-devel/gcc-6[cxx] + >=x11-drivers/nvidia-drivers-384.81[X,uvm] + debugger? ( + sys-libs/libtermcap-compat + sys-libs/ncurses:5/5[tinfo] + ) + eclipse? ( >=virtual/jre-1.6 ) + profiler? ( >=virtual/jre-1.6 )" + +S="${WORKDIR}" + +QA_PREBUILT="opt/cuda/*" + +CHECKREQS_DISK_BUILD="3500M" + +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 5.3 5.4 6.3 6.4" + + sed \ + -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ + "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die + + default +} + +src_install() { + local i remove=( doc jre run_files install-linux.pl cuda-installer.pl ) + local cudadir=/opt/cuda + local ecudadir="${EPREFIX}${cudadir}" + + if use doc; then + DOCS+=( doc/pdf/. ) + HTML_DOCS+=( doc/html/. ) + fi + einstalldocs + + mv doc/man/man3/{,cuda-}deprecated.3 || die + doman doc/man/man*/* + + use debugger || remove+=( bin/cuda-gdb extras/Debugger extras/cuda-gdb-${PV}.src.tar.gz ) + + if use profiler; then + # hack found in install-linux.pl + for i in nvvp nsight; do + cat > bin/${i} <<- EOF || die + #!/usr/bin/env sh + LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:${ecudadir}/lib:${ecudadir}/lib64 \ + UBUNTU_MENUPROXY=0 LIBOVERLAY_SCROLLBAR=0 \ + ${ecudadir}/lib${i}/${i} -vm ${EPREFIX}/usr/bin/java + EOF + chmod a+x bin/${i} || die + done + else + use eclipse || remove+=( libnvvp libnsight ) + remove+=( extras/CUPTI ) + fi + + for i in "${remove[@]}"; do + ebegin "Cleaning ${i}..." + rm -rf "${i}" || die + eend + done + + dodir ${cudadir} + mv * "${ED%/}${cudadir}" || die + + cat > "${T}"/99cuda <<- EOF || die + PATH=${ecudadir}/bin$(usex profiler ":${ecudadir}/libnvvp" "") + ROOTPATH=${ecudadir}/bin + LDPATH=${ecudadir}/lib64:${ecudadir}/lib:${ecudadir}/nvvm/lib64 + EOF + doenvd "${T}"/99cuda + + use profiler && \ + make_wrapper nvprof "${ecudadir}/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 greatest supported + if tc-is-gcc && \ + ! version_is_at_least gcc-version ${b}; then + ewarn "" + 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" + ewarn "" + fi +} + +pkg_postinst() { + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_postinst_check + fi +} |