dev-util/nvidia-cuda-toolkit: Readd last version supporting multilib on x86
authorJustin Lecher <jlec@gentoo.org>
Thu, 17 Sep 2015 18:27:38 +0000 (20:27 +0200)
committerJustin Lecher <jlec@gentoo.org>
Thu, 17 Sep 2015 18:28:03 +0000 (20:28 +0200)
Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-util/nvidia-cuda-toolkit/Manifest
dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-6.5.19-r1.ebuild [new file with mode: 0644]

index 98d73d6b8ada15ce92f3d0bd0cea8d16805f28c4..1e418f12091102c5fa9fc7b24a2fff96e347b79e 100644 (file)
@@ -1,3 +1,5 @@
 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 1195431560 SHA256 245ffb6c1e2b69d323f8ae3a1b63d3384fec3934222e56e9d801ecc0d6e919c5 SHA512 cb933512fde09376b1d6040c72d24c4f91dc44f73322ca87aa7d1f34156c9c87feea41f9a00f1a403cfb89645b5e7a6a5f2bfe4933703ba81f0cf94968d430fd WHIRLPOOL b1a06acba02043fabf496ba683fb984b1c90df2cd71396457f664beb8cb26b2e3074c8568ec6ce0cfe565721986670c7a40351a29a4856a7e03268c14d545247
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 (file)
index 0000000..34a04fb
--- /dev/null
@@ -0,0 +1,157 @@
+# 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="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
+}