From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C4FD1138448 for ; Wed, 9 Sep 2015 08:11:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E8A2AE0886; Wed, 9 Sep 2015 08:11:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 27CF1E0880 for ; Wed, 9 Sep 2015 08:11:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1252A340554 for ; Wed, 9 Sep 2015 08:11:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D30E18A for ; Wed, 9 Sep 2015 08:11:30 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1441784868.f66c1529f92a8c1fdbf972609269e0a644478b37.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: dev-util/nvidia-cuda-toolkit/ X-VCS-Repository: proj/sci X-VCS-Files: dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-7.5.18.ebuild X-VCS-Directories: dev-util/nvidia-cuda-toolkit/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: f66c1529f92a8c1fdbf972609269e0a644478b37 X-VCS-Branch: master Date: Wed, 9 Sep 2015 08:11:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 111e6831-c511-4ee1-b578-4a9ef71090c5 X-Archives-Hash: 2a298cc73136c03b55319b0f83703045 commit: f66c1529f92a8c1fdbf972609269e0a644478b37 Author: Justin Lecher gentoo org> AuthorDate: Wed Sep 9 07:47:48 2015 +0000 Commit: Justin Lecher gentoo org> CommitDate: Wed Sep 9 07:47:48 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f66c1529 dev-util/nvidia-cuda-toolkit: Version Bump Package-Manager: portage-2.2.20.1 Signed-off-by: Justin Lecher gentoo.org> .../nvidia-cuda-toolkit-7.5.18.ebuild | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) 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 0000000..0ffc597 --- /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 +}