diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/nvidia-cuda-toolkit |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/nvidia-cuda-toolkit')
8 files changed, 785 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest new file mode 100644 index 000000000000..be6113697a85 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -0,0 +1,16 @@ +AUX cuda-config.in 406 SHA256 7271463891ff75dd83f4cb42bb3004d3204243d0e38f9cbd5b4ec4560865496a SHA512 df6d16bd2e800868bdf8401b6f82a387b701ea297ddf6e8feb0daf5222e62a33f156e5f45cf1ee4e1aa51559dfbd56b897c257dae1bb9568e839bf806bfebd5b WHIRLPOOL 4a26ee11d97676827cb01644891fdca495c3373585ddfbb5fab9f988186da384f27482c4be9e27d834036ffa87f7ee19f9ad7da2d8536babe874dda4ff991147 +DIST cuda_6.5.14_linux_32.run 76788277 SHA256 63fa1fe5d013e9944d6c1a3a71768fa4dcb35d6a157c1b06765bb56198c205c5 SHA512 89649ee0f4543b37037b7c8f5ed0b8bd502512afb4d93e3158b3df4786123be05a5288986b5abbfe15c14eb010777d2527b715225bea96a354a898c34e4a2fcc WHIRLPOOL c1094dd84883ef08d91c6eec3634a285496418db1e76b70f449f833dcb01069a620af504b6df7fe2752559688ed1f60f4adda8c97d849d648cba1be0f8196954 +DIST cuda_6.5.14_linux_64.run 972320904 SHA256 f3e527f34f317314fe8fcd8c85f10560729069298c0f73105ba89225db69da48 SHA512 fecca731b86955f5bc7b09d88b02951e3ee5d4b1f1cf5f92658227a029b87cd35d6ac22956a5fa0afe62dcdc57191f1d12bb08c9f7cc05128727cd8455947b1e WHIRLPOOL 0b890771dcca352168fed1b1df9b29504b03f8c29da59cec29914c541283998edf65f5ca6a41362143a2d5d7359822b036894f563c56b39583b1ac4c64e35180 +DIST cuda_6.5.19_linux_32.run 81882112 SHA256 9f767f38b84f52c097bec81669f99e4a6c4c9c09b5da1bc09fe49e0f804bc7a6 SHA512 1ce9bd6b472b7e4f1fb181eb340dfcb757714d59a89aaa02146cfe1a97c8ccb7eb7699b4ec823276f277eb4d82d95050eaba17e7ed5fd2e47b9b5d78531c5d4e WHIRLPOOL ac94b4e7f29811b4240623fb69b3c54214e7f0c60a286d899944dbab9da7fd3c122760199a3357667e33879bd48fbf352d5d39029acca6021e7caf21785557ed +DIST cuda_6.5.19_linux_64.run 982446238 SHA256 5279bc159b72b7445d8aae5f289d24bb4042c35422ef32da68049d8f666d3ff5 SHA512 06854f020a5f72cf4bd714859e6966248ac2f589284113674e869fdaa1254cae27d4101940758ecda5df4724ad3e448a1f6d0c053b6cbc28107750872b6a5797 WHIRLPOOL 6ae8e53719e12997de60ec3688167f3fe33b1145d01217182e39ac386c25b358c8ba6cee45ad6c80e33ef66fd9a511338dce4589f10a31635b8437b6e528fd7a +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 +EBUILD nvidia-cuda-toolkit-6.5.14.ebuild 3818 SHA256 5ef92981e2536f257dc3eb3ca2b531730cc0ee061d4f9e2b7e9f2e13c1a5c187 SHA512 7f73c4e321234f6a19166e6e28719f6c98cecb809f9878ee1182b812e18fcc6f8c29fb2ebd0ed520847f38bfddd6a0bc60fae6b711b75f563ab39a9b322468b2 WHIRLPOOL 31798f88e715e8df1c1731a5173ac5149cd85a46a24f8b6f510dd69ea6f50aade2b3b05dd9ea400e0b6861f59a428f152bf8e6f4bff2f61bb1e95c85de5c02e2 +EBUILD nvidia-cuda-toolkit-6.5.19-r1.ebuild 3844 SHA256 adf2c05e47abb31f1dccbdf44b272b0b1000aa07d6a2109ac0443613f2a03599 SHA512 f40103348972041a9d6c09a8c129b68603ce0fafa29df1fdf6b13014bb97156a44881161d4668beef8af9b77adea9df8034c88d6413a6ac2ad709285f785df79 WHIRLPOOL 6ffa251bfd438e632b8b366cf9df8a209228feb90fa4a9ec1c7f52a48b38326e4c129a02a23c217f77a14c0ae1c5ecf5d8fc99b1407673d23af916874d45df51 +EBUILD nvidia-cuda-toolkit-7.5.18-r2.ebuild 3355 SHA256 6afc12a4389f1cb18a99f677f5697402e80c8e95a3cea089ea71628918644e12 SHA512 4e8070e399766796b1589329db4de04fc0fda0cbd1dc8ec1984b8550f1bc10d490fed7b085066f4419d5cbdf98ea2ae8202b29a9d360fe3b2a3be6e20bc802be WHIRLPOOL 3607a7b7413124e3fc2264e8df5e03c18846dde7910dcccbf41ed9b0e870f0cedbb499acefe7dc1c792d99d92b7e33f3ffdafea0ebf5998b4d0428e480424222 +EBUILD nvidia-cuda-toolkit-8.0.44.ebuild 3311 SHA256 29ce5f153ad4c2b191c993cc8afc236d9bf006a8ba31cbcf5fe6e427ff3bbbdd SHA512 807ac67b141dd390d78ec4e764dc939e993aa3b23c6469dde9e29c62a0ac7bbbd3be4d2425e3a1a9863a813c88c5fe0da37f07d1bb2fc91c0593cab99f8e8a8b WHIRLPOOL d3bc0c46bab61ef38ad51fd66ee65530c2406dd8101fbf8f7e6801a0e882c341014f3580a3482fb9b73280d5c820d2392920e9496b1aa687e1bd6d58426b7570 +EBUILD nvidia-cuda-toolkit-8.0.61.ebuild 3361 SHA256 5d9bcc8c5559be822b2a411db8fe2269eb5f084ece76b2f17ae20327fd4b2269 SHA512 b98d5b85eb4405ba749061b7d228f3e86057592283a36f189eda2f1d859b2e1e55c9c6c1444e9521ac699ab8bb7b6f87a8e2457a5fe5ca85cc13043e59cdeb33 WHIRLPOOL 0dd971e681be1792b2780ff225c66c56287df0c27205c6c22cb42d3a3bde53d10d5bf8f74562252f0c2e45e61c909969f3faf2a9f77835423eabc948ab2e3f03 +MISC ChangeLog 5772 SHA256 2cd55aa9b5068c1bac89fcc24e17e76a2de1c7b33f15ac166be95c66e6a70acd SHA512 114307f8659f3eb6775f23abcadd1a4acd36dcaa4b2e7885e340514103f6c33f4f892f0604810bdc03c81de713b06baf8cd3bf3ef3aebbade1e5c8e4f386e53a WHIRLPOOL 44cc0558a5680392a17a5e05869783b505d6a2bdccefd8f9ef1569f580732414ce66727e32f733de5df71e9c0eb5f3079b910d07d143e7fde7eaef8ad6052e2e +MISC ChangeLog-2015 2264 SHA256 8cdb76f9a24d4661310a9c9cf79d3a01e42e76c37c8ec5d2938f68da34c49360 SHA512 08c47c4e1533fa261b5c24c32905b8ad77de631ad0c348a508303182fe7afd4d4e011ceef2b395260a3cf261d239a3ba3e19853284cf59521e2c3dbb6994758d WHIRLPOOL 16d1f8807f81357840bccbede120769e850493ac61123b6ab516d6c668b553ddd4d81d61eb9b1a681e01c669cbaf374c1904c2d6d166480cd84e6884dbab7b7b +MISC metadata.xml 486 SHA256 a7ff0497884c72152b187e808c63ff01109eb7cde39edf77f43c82cdca0d7b3c SHA512 14746574456248d684dc30574c868f4f14ae270c86b6642e7c4aa3ea0918fe7b6cc685323e376d32c8f97879e3fb23a35c4f95185fb44f7b845035b9fcdcc2ac WHIRLPOOL 3205c2685cc3ba2822d5b8208218a19582733ae81811d466936255aaf58c982e6bb4c805fe9468337573b4985f0a845918af82f9f7f0bca9bc8ae0cb090510dd 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 000000000000..ca0d1d77e107 --- /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 000000000000..ad6a3973276d --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <use> + <flag name="profiler"> + Installs the NVIDIA CUDA visual profiler. + </flag> + <flag name="debugger"> + Installs the CUDA debugger. + </flag> + <flag name="eclipse">Install plugins for eclipse</flag> + </use> +</pkgmetadata> diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.14.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.14.ebuild new file mode 100644 index 000000000000..f9562a7fb37e --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.14.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/installers" +SRC_URI=" + amd64? ( ${CURI}/cuda_${PV}_linux_64.run ) + x86? ( ${CURI}/cuda_${PV}_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] + debugger? ( + sys-libs/libtermcap-compat + sys-libs/ncurses[tinfo] + ) + eclipse? ( >=virtual/jre-1.6 ) + profiler? ( >=virtual/jre-1.6 ) + amd64? ( >=x11-drivers/nvidia-drivers-340.32[uvm] ) + x86? ( <x11-drivers/nvidia-drivers-346.35[uvm] ) + " + +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 + + if use x86; then + ewarn "Starting with version 6.5 NVIDIA dropped more and more" + ewarn "the support for 32bit linux." + ewarn "Be aware that bugfixes and new features may not be available." + ewarn "https://dev.gentoo.org/~jlec/distfiles/CUDA_Toolkit_Release_Notes.pdf" + fi +} + +src_unpack() { + unpacker + unpacker run_files/cuda-linux*.run +} + +src_prepare() { + local cuda_supported_gcc + + cuda_supported_gcc="4.7 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 + + if use amd64; then + mv doc/man/man3/{,cuda-}deprecated.3 || die + doman doc/man/man*/* + fi + + 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} || die + + cat > "${T}"/99cuda <<- EOF + PATH=${ecudadir}/bin$(use profiler && echo ":${ecudadir}/libnvvp") + ROOTPATH=${ecudadir}/bin + LDPATH=${ecudadir}/lib$(use amd64 && echo "64:${ecudadir}/lib") + EOF + doenvd "${T}"/99cuda + + use profiler && \ + 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 +} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.19-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.19-r1.ebuild new file mode 100644 index 000000000000..b980d663d12f --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.19-r1.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/installers" +SRC_URI=" + amd64? ( ${CURI}/cuda_${PV}_linux_64.run ) + x86? ( ${CURI}/cuda_${PV}_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] + debugger? ( + sys-libs/libtermcap-compat + sys-libs/ncurses[tinfo] + ) + eclipse? ( >=virtual/jre-1.6 ) + profiler? ( >=virtual/jre-1.6 ) + amd64? ( >=x11-drivers/nvidia-drivers-343.22[uvm] ) + x86? ( <x11-drivers/nvidia-drivers-346.35[uvm] ) + " + +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 + + if use x86; then + ewarn "Starting with version 6.5 NVIDIA dropped more and more" + ewarn "the support for 32bit linux." + ewarn "Be aware that bugfixes and new features may not be available." + ewarn "https://dev.gentoo.org/~jlec/distfiles/CUDA_Toolkit_Release_Notes.pdf" + fi +} + +src_unpack() { + unpacker + unpacker run_files/cuda-linux*.run +} + +src_prepare() { + local cuda_supported_gcc + + cuda_supported_gcc="4.7 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 + + if use amd64; then + mv doc/man/man3/{,cuda-}deprecated.3 || die + doman doc/man/man*/* + fi + + 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 + + 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}/lib$(use amd64 && echo "64:${ecudadir}/lib") + EOF + doenvd "${T}"/99cuda + + use profiler && \ + 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 +} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18-r2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18-r2.ebuild new file mode 100644 index 000000000000..7122efbeae91 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18-r2.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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] + <sys-devel/gcc-5[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:${ecudadir}/nvvm/lib64 + 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-8.0.44.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-8.0.44.ebuild new file mode 100644 index 000000000000..45b0828f1ece --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-8.0.44.ebuild @@ -0,0 +1,135 @@ +# 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) + +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}_linux-run -> 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] + <sys-devel/gcc-6[cxx] + >=x11-drivers/nvidia-drivers-367.44[X,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="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" + + 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 +} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-8.0.61.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-8.0.61.ebuild new file mode 100644 index 000000000000..0295aba23074 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-8.0.61.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="375.26" + +DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" +HOMEPAGE="https://developer.nvidia.com/cuda-zone" +SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod2/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-375.26[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" + + 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 +} |