From: Justin Lecher Date: Wed, 9 Sep 2015 07:50:40 +0000 (+0200) Subject: dev-util/nvidia-cuda-toolkit: Version Bump X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7a3dbc6d66d9672d3fa5bafa282f08c588fb7df3;p=gentoo.git dev-util/nvidia-cuda-toolkit: Version Bump Package-Manager: portage-2.2.20.1 Signed-off-by: Justin Lecher --- diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index bac01742e600..dcbfa74bd67e 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -5,3 +5,4 @@ DIST cuda_6.5.14_linux_64.run 972320904 SHA256 f3e527f34f317314fe8fcd8c85f105607 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.0.28_linux.run 1118797679 SHA256 d1292e9c2bbaddad24c46e0b0d15a7130831bfac0382f7159321f41ae385a5ce SHA512 f002433133e40000cbb78283e08c25f7397612957c0440605311f8921bcebd54a808069ca36b218be66a054e8afab4871b2bf1bd4d419c6f98a0d74b00a9bc78 WHIRLPOOL dcf21d2e356a1797b9e79ac9edfb3924a1d4a2914382dbe21b2172c200dd4f7d93905ac44fbc2e994ce14b7ab28e78163f4c81ddcc6cbb97e4ce085efd2d8475 +DIST cuda_7.5.18_linux.run 1195431560 SHA256 245ffb6c1e2b69d323f8ae3a1b63d3384fec3934222e56e9d801ecc0d6e919c5 SHA512 cb933512fde09376b1d6040c72d24c4f91dc44f73322ca87aa7d1f34156c9c87feea41f9a00f1a403cfb89645b5e7a6a5f2bfe4933703ba81f0cf94968d430fd WHIRLPOOL b1a06acba02043fabf496ba683fb984b1c90df2cd71396457f664beb8cb26b2e3074c8568ec6ce0cfe565721986670c7a40351a29a4856a7e03268c14d545247 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 000000000000..0ffc597380da --- /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 +}