From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3912C13997F for ; Wed, 13 Nov 2019 08:44:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84922E08F4; Wed, 13 Nov 2019 08:44:39 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 57A64E08F4 for ; Wed, 13 Nov 2019 08:44:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D339334CD25 for ; Wed, 13 Nov 2019 08:44:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8D7B78AB for ; Wed, 13 Nov 2019 08:44:36 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1573634658.1312074989b3250cce376f2f260526e1e79cb1b9.heroxbd@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/nvidia-cuda-sdk/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/nvidia-cuda-sdk/Manifest dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.243.ebuild X-VCS-Directories: dev-util/nvidia-cuda-sdk/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 1312074989b3250cce376f2f260526e1e79cb1b9 X-VCS-Branch: master Date: Wed, 13 Nov 2019 08:44:36 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 58d734ea-620e-49d0-8fc4-371f10be9bc0 X-Archives-Hash: 8d020015c0c7c8f7112e480ad42a59d3 commit: 1312074989b3250cce376f2f260526e1e79cb1b9 Author: Benda Xu gentoo org> AuthorDate: Wed Nov 13 06:21:40 2019 +0000 Commit: Benda XU gentoo org> CommitDate: Wed Nov 13 08:44:18 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13120749 dev-util/nvidia-cuda-sdk: version bump. Suggested-By: Oleg, Jan Vesely, Jura, Brian Munro, Suggested-By: younky.yang yahoo.com, Chicago Closes: https://bugs.gentoo.org/669726 Closes: https://bugs.gentoo.org/679412 Package-Manager: Portage-2.3.73, Repoman-2.3.17 Signed-off-by: Benda Xu gentoo.org> dev-util/nvidia-cuda-sdk/Manifest | 1 + .../nvidia-cuda-sdk-10.1.243.ebuild | 141 +++++++++++++++++++++ 2 files changed, 142 insertions(+) diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest index eae1f97f891..e527e6a378e 100644 --- a/dev-util/nvidia-cuda-sdk/Manifest +++ b/dev-util/nvidia-cuda-sdk/Manifest @@ -1,3 +1,4 @@ +DIST cuda_10.1.243_418.87.00_linux.run 474677248 BLAKE2B cfb999806369641cf4011cc186d90ce9f3c4a60afaa14e7cd81f453659f8fe41166fc2ee3b786d91d35184dd1268406ecaec818f1f3662d3ccbf2118e75dbf33 SHA512 7ef352993596bbcc7835bf096c3ee8d6e37c0acf6a246d76bf3eb7f04e71ec3a3004bff0302a4853df72d6ff5d0934ded1441631fd1933ca8e531c358863bd24 DIST cuda_6.5.19_linux_32.run 81882112 BLAKE2B cf55ef7c969503c156431fc56301ed4e9a1234ae0cb867f12649636069f35e56bf6fc9df7482b6baade45d78c8baa2d98c41a28696da59294e0f575c4a0344ce SHA512 1ce9bd6b472b7e4f1fb181eb340dfcb757714d59a89aaa02146cfe1a97c8ccb7eb7699b4ec823276f277eb4d82d95050eaba17e7ed5fd2e47b9b5d78531c5d4e DIST cuda_6.5.19_linux_64.run 982446238 BLAKE2B 517ac07d4717f4f5d9427616a387dbe01fe35b7b6845b5d9e29aad18814243d38cc9a3cd0ff9042c027fcb056618e9a8535d560c16a6ac7998ff39fcf3ada654 SHA512 06854f020a5f72cf4bd714859e6966248ac2f589284113674e869fdaa1254cae27d4101940758ecda5df4724ad3e448a1f6d0c053b6cbc28107750872b6a5797 DIST cuda_7.5.18_linux.run 1195424633 BLAKE2B 35933c3c3355231cd59e579e6ac6a30cca57ed0e3de26ce5cac368ff22595f39cb041c9696415d4d76a49e772b7828eacab24a3e581c1e9a8ef7981e1b044eee SHA512 97459dfd124060200f1c43f763e5bce0bea53e35ed4bef72bee6c8ba1c04ecffb8695af11755443513316f91fdb5cb4d35662f7b87bca7e3de85d562d4e49363 diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.243.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.243.ebuild new file mode 100644 index 00000000000..4833f312ec3 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.243.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cuda flag-o-matic portability toolchain-funcs unpacker + +MYD=$(ver_cut 1-2 ${PV}) +DRIVER_PV="418.87.00" + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +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" + +LICENSE="CUDPP" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~amd64-linux" +IUSE="+cuda debug +doc +examples opencl mpi" + +RDEPEND=" + ~dev-util/nvidia-cuda-toolkit-${PV} + media-libs/freeglut + examples? ( + media-libs/freeimage + media-libs/glew:0= + !prefix? ( >=x11-drivers/nvidia-drivers-${DRIVER_PV}[uvm] ) + mpi? ( virtual/mpi ) + )" +DEPEND="${RDEPEND}" + +RESTRICT="test" + +S=${WORKDIR}/builds/cuda-samples + +QA_EXECSTACK=( + opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint + opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort + opt/cuda/sdk/bin/x86_64/linux/release/cdpSimplePrint + opt/cuda/sdk/bin/x86_64/linux/release/cdpSimpleQuicksort + ) + +src_prepare() { + cuda_src_prepare + + export RAWLDFLAGS="$(raw-ldflags)" +# epatch "${FILESDIR}"/${P}-asneeded.patch + + local file + while IFS="" read -d $'\0' -r file; do + sed \ + -e 's:-O[23]::g' \ + -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \ + -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \ + -e "/CC/s:gcc:$(tc-getCC):g" \ + -e "/GCC/s:g++:$(tc-getCXX):g" \ + -e "/NVCC /s|\(:=\).*|:= ${EPREFIX}/opt/cuda/bin/nvcc|g" \ + -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \ + -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \ + -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \ + -e 's:-Wimplicit::g' \ + -e "s|../../common/lib/linux/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -i "${file}" || die + # -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \ + done < <(find . -type f -name 'Makefile' -print0) + + rm -rf common/inc/GL || die + find . -type f -name '*.a' -delete || die + + eapply_user +} + +src_compile() { + use examples || return + local myopts=("verbose=1") + use debug && myopts+=("dbg=1") + export FAKEROOTKEY=1 # Workaround sandbox issue in #462602 + emake \ + cuda-install="${EPREFIX}/opt/cuda" \ + CUDA_PATH="${EPREFIX}/opt/cuda/" \ + MPI_GCC=10 \ + "${myopts[@]}" +} + +src_test() { + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + + local i + for i in {0..9}*/*; do + emake -C "${i}" run + done +} + +src_install() { + local f t crap=( *.txt Samples.htm* ) + + if use doc; then + ebegin "Installing docs ..." + while IFS="" read -d $'\0' -r f; do + treecopy "${f}" "${ED%/}"/usr/share/doc/${PF}/ + done < <(find -type f \( -name 'readme.txt' -o -name '*.pdf' \) -print0) + + while IFS="" read -d $'\0' -r f; do + docompress -x "${f#${ED%/}}" + done < <(find "${ED%/}"/usr/share/doc/${PF}/ -type f -name 'readme.txt' -print0) + eend + fi + + ebegin "Cleaning before installation..." + for f in "${crap[@]}"; do + rm -f "${f}" || die + done + find -type f \( -name '*.o' -o -name '*.pdf' -o -name 'readme.txt' \) -delete || die + eend + + ebegin "Moving files..." + while IFS="" read -d $'\0' -r f; do + t="$(dirname ${f})" + if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then + continue + fi + if [[ -x ${f} ]]; then + exeinto /opt/cuda/sdk/"${t}" + doexe "${f}" + else + insinto /opt/cuda/sdk/"${t}" + doins "${f}" + fi + done < <(find . -type f -print0) + eend +} + +pkg_postinst() { + if use example && use prefix; then + ewarn "Gentoo Prefix does not manage kernel modules. You need to make certain" + ewarn "the functionality counterpart to >=x11-drivers/nvidia-drivers-${DRIVER_PV}[uvm]" + ewarn "is available from the host" + fi +}