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 B91B41382C5 for ; Fri, 26 Jan 2018 21:43:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0E8A9E09F2; Fri, 26 Jan 2018 21:43:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 D48C9E09F2 for ; Fri, 26 Jan 2018 21:43:02 +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 13B5A335C30 for ; Fri, 26 Jan 2018 21:43:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D85451D3 for ; Fri, 26 Jan 2018 21:42:58 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1517002915.f2ea45c99c3e1f165479bbb74e7cb8638711cce4.soap@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-9.1.85.ebuild X-VCS-Directories: dev-util/nvidia-cuda-sdk/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: f2ea45c99c3e1f165479bbb74e7cb8638711cce4 X-VCS-Branch: master Date: Fri, 26 Jan 2018 21:42:58 +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: 1cf09f33-9dec-4f7e-a0d6-6918360b46dc X-Archives-Hash: fa73b8c81190b8ba79eac99e2f7bfbc3 commit: f2ea45c99c3e1f165479bbb74e7cb8638711cce4 Author: Marius Brehler linux sungazer de> AuthorDate: Mon Dec 18 09:32:10 2017 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Jan 26 21:41:55 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ea45c9 dev-util/nvidia-cuda-sdk: Version bump to 9.1.85 Package-Manager: Portage-2.3.13, Repoman-2.3.3 dev-util/nvidia-cuda-sdk/Manifest | 1 + .../nvidia-cuda-sdk/nvidia-cuda-sdk-9.1.85.ebuild | 144 +++++++++++++++++++++ 2 files changed, 145 insertions(+) diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest index 223e6a74149..840eb14f057 100644 --- a/dev-util/nvidia-cuda-sdk/Manifest +++ b/dev-util/nvidia-cuda-sdk/Manifest @@ -4,3 +4,4 @@ DIST cuda_7.5.18_linux.run 1195424633 BLAKE2B 35933c3c3355231cd59e579e6ac6a30cca DIST cuda_8.0.44_linux.run 1457082926 BLAKE2B a6408ddf8984dc4b0725cc4f53549c4d4fc4b3bd4de2771896953dbe023aa6d04ad38f5d6bf1ab3ff5752d2c18b400f478c9dbb263755267836c5de79e4f8f51 SHA512 1bf9d8e6b853c2a971b8d908a043adc5b11ec7033faed04a773c42680882753f98bc33b46f6b301c24c0f780f74bc237dce5766fc857f1a905e6c1f200728d86 DIST cuda_8.0.61_375.26_linux.run 1465528129 BLAKE2B d52ddf1dcf5246f230f210d10d1f6e7b540c892dea5a8cd770f0d062b30b01f5c8467d930430b383464d40a9b4a14eaaf22a365e081955e4452ec4f55e08da0b SHA512 d22303719a9feff64f95bf6a966f1caa2bf0cf8c955e475ce08ce54faa5e098d336c2db223ef0185c1f23b9c52b7d2f81a63515485219cfc016d72bda979248b DIST cuda_9.0.176_384.81_linux.run 1643293725 BLAKE2B 4155de544f877f6c420c2463bc68679cc89774f0516d1885d5c3f483ad86e7f25ecf6042b8240431b814230136f3026196a013bb18184fa2ec9af555bb7ea723 SHA512 00e24638c02d049c575732dee5237db21f7c451b606f37cf95e44e89d47d0cb055255e9f70dc013298c9e0d224147f239488558904556b68572e3f31935489a9 +DIST cuda_9.1.85_387.26_linux.run 1639829845 BLAKE2B c9f6544893b8e4d0b4c51d66f1cf17a593e65af6e7748e2994abda8ffcb839a7bb19cb0eebfbc52347293296025f000241d1c9842af0c41d31928770c4639b79 SHA512 492a5fa58fc93ac718ca093f24bb5e74dd2586338c42f2e11e328c7f16756e3511a1c555b12cb1990bb782d0d1600976f4c9e5b3d4857e371b0431daf06b2827 diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.1.85.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.1.85.ebuild new file mode 100644 index 00000000000..9db5be5f3f5 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.1.85.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cuda eutils flag-o-matic portability toolchain-funcs unpacker versionator + +MYD=$(get_version_component_range 1-2) +DRIVER_PV="387.26" + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +HOMEPAGE="https://developer.nvidia.com/cuda-zone" +SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod2/local_installers/cuda_${PV}_${DRIVER_PV}_linux -> cuda_${PV}_${DRIVER_PV}_linux.run" + +LICENSE="CUDPP" +SLOT="0" +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= + >=x11-drivers/nvidia-drivers-${DRIVER_PV}[uvm] + mpi? ( virtual/mpi ) + )" +DEPEND="${RDEPEND}" + +RESTRICT="test" + +S=${WORKDIR}/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_unpack() { + # We first need to unpack the cuda_${PV}_linux.run file + # which includes the cuda-samples*run file. + unpacker + unpacker run_files/cuda-samples*run +} + +pkg_setup() { + if use cuda || use opencl; then + cuda_pkg_setup + fi +} + +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 +}