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 2508C138D11 for ; Fri, 10 Jul 2015 03:59:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A464E08E0; Fri, 10 Jul 2015 03:59:48 +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 A445EE08DA for ; Fri, 10 Jul 2015 03:59:47 +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 9FFEF34091F for ; Fri, 10 Jul 2015 03:59:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B437760 for ; Fri, 10 Jul 2015 03:59:43 +0000 (UTC) From: "Nicolas Bock" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nicolas Bock" Message-ID: <1436351310.ce6447670ba2ecf60966f8f5f7822f5a11330b71.nicolasbock@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: dev-util/nvidia-cuda-sdk/ X-VCS-Repository: proj/sci X-VCS-Files: dev-util/nvidia-cuda-sdk/ChangeLog dev-util/nvidia-cuda-sdk/metadata.xml dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-7.5.7.ebuild X-VCS-Directories: dev-util/nvidia-cuda-sdk/ X-VCS-Committer: nicolasbock X-VCS-Committer-Name: Nicolas Bock X-VCS-Revision: ce6447670ba2ecf60966f8f5f7822f5a11330b71 X-VCS-Branch: master Date: Fri, 10 Jul 2015 03:59:43 +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: 75e439c2-eade-4b8b-8813-602c0ab60326 X-Archives-Hash: aa4533d2a2cf66b59722049eada5fc87 commit: ce6447670ba2ecf60966f8f5f7822f5a11330b71 Author: Marius Brehler linux sungazer de> AuthorDate: Wed Jul 8 10:28:30 2015 +0000 Commit: Nicolas Bock gentoo org> CommitDate: Wed Jul 8 10:28:30 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=ce644767 dev-util/nvidia-cuda-sdk: Add CUDA 7.5 release candidate Package-Manager: portage-2.2.18 dev-util/nvidia-cuda-sdk/ChangeLog | 9 ++ dev-util/nvidia-cuda-sdk/metadata.xml | 13 ++ .../nvidia-cuda-sdk/nvidia-cuda-sdk-7.5.7.ebuild | 151 +++++++++++++++++++++ 3 files changed, 173 insertions(+) diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog new file mode 100644 index 0000000..a941732 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-util/nvidia-cuda-sdk +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*nvidia-cuda-sdk-7.5.7 (08 Jul 2015) + + 08 Jul 2015; Marius Brehler +metadata.xml, + +nvidia-cuda-sdk-7.5.7.ebuild: + dev-util/nvidia-cuda-sdk: Add CUDA 7.5 release candidate diff --git a/dev-util/nvidia-cuda-sdk/metadata.xml b/dev-util/nvidia-cuda-sdk/metadata.xml new file mode 100644 index 0000000..8bd8dab --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/metadata.xml @@ -0,0 +1,13 @@ + + + + sci + + + Build OpenCL binaries. + + + Build CUDA binaries. + + + diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-7.5.7.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-7.5.7.ebuild new file mode 100644 index 0000000..9083ca1 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-7.5.7.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cuda eutils flag-o-matic portability toolchain-funcs unpacker versionator + +MYD=$(get_version_component_range 1)_$(get_version_component_range 2) + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +HOMEPAGE="http://developer.nvidia.com/cuda" +CURI="https://developer.nvidia.com/rdp/cuda-75-release-candidate" +SRC_URI="cuda_${PV}_rc_linux.run" + +LICENSE="CUDPP" +SLOT="0" +KEYWORDS="~amd64 ~amd64-linux" +IUSE="debug +doc +examples opencl +cuda" + +RDEPEND=" + ~dev-util/nvidia-cuda-toolkit-${PV} + media-libs/freeglut + examples? ( + media-libs/freeimage + media-libs/glew + virtual/mpi + >=x11-drivers/nvidia-drivers-352.07[uvm] + )" +DEPEND="${RDEPEND}" + +RESTRICT="test fetch" + +pkg_nofetch() { + einfo "Please download the RHEL 7 \"runfile (local)\" installer" + einfo " - cuda_${P}_rc_linux.run" + einfo "from ${CURI} and place it in ${DISTDIR}" +} + +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() { + 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 + + sed \ + -e 's:-O2::g' \ + -e 's:-O3::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|$(pkg-config --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$(pkg-config --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$(pkg-config --libs glew)|g" \ + -i $(find . -type f -name "Makefile") || die + +# -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \ + find common/inc/GL -delete || die + find . -type f -name "*\.a" -delete || die +} + +src_compile() { + use examples || return + local myopts verbose="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} ${verbose} +} + +src_test() { + local _dir _subdir + + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + + for _dir in {0..9}*; do + pushd ${_dir} > /dev/null + for _subdir in *; do + emake -C ${_subdir} run + done + popd > /dev/null + done +} + +src_install() { + local i j f t crap="" + + if use doc; then + ebegin "Installing docs ..." + treecopy $(find -type f \( -name readme.txt -o -name "*.pdf" \)) "${ED}"/usr/share/doc/${PF}/ + docompress -x $(find "${ED}"/usr/share/doc/${PF}/ -type f -name readme.txt | sed -e "s:${ED}::") + eend + fi + + crap+=" *.txt Samples.htm*" + + ebegin "Cleaning before installation..." + for i in ${crap}; do + if [[ -e ${i} ]]; then + find ${i} -delete || die + fi + done + find -type f \( -name "*.o" -o -name "*.pdf" -o -name "readme.txt" \) -delete || die + eend + + ebegin "Moving files..." + for f in $(find .); do + local t="$(dirname ${f})" + if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then + continue + fi + if [[ ! -d ${f} ]]; then + if [[ -x ${f} ]]; then + exeinto /opt/cuda/sdk/${t} + doexe ${f} + else + insinto /opt/cuda/sdk/${t} + doins ${f} + fi + fi + done + eend +}