aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Brehler <marbre@linux.sungazer.de>2014-07-10 08:45:31 +0200
committerMarius Brehler <marbre@linux.sungazer.de>2014-07-10 08:45:31 +0200
commit6cc1af5821f054eec2b74647b14e625226e27388 (patch)
tree245dfe181b647469a3bb8af8d3eaf2199f0e4452
parentMerge pull request #239 from marbre/nvidia-cuda-toolkit (diff)
downloadsci-6cc1af5821f054eec2b74647b14e625226e27388.tar.gz
sci-6cc1af5821f054eec2b74647b14e625226e27388.tar.bz2
sci-6cc1af5821f054eec2b74647b14e625226e27388.zip
dev-util/nvidia-cuda-sdk: add version 6.5.11
Package-Manager: portage-2.2.8-r1
-rw-r--r--dev-util/nvidia-cuda-sdk/ChangeLog9
-rw-r--r--dev-util/nvidia-cuda-sdk/Manifest1
-rw-r--r--dev-util/nvidia-cuda-sdk/metadata.xml13
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.11.ebuild151
4 files changed, 174 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog
new file mode 100644
index 000000000..e5fbe110c
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-util/nvidia-cuda-sdk
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*nvidia-cuda-sdk-6.5.11 (10 Jul 2014)
+
+ 10 Jul 2014; Marius Brehler <marbre@linux.sungazer.de> +metadata.xml,
+ +nvidia-cuda-sdk-6.5.11.ebuild:
+ dev-util/nvidia-cuda-sdk: add version 6.5.11
diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest
new file mode 100644
index 000000000..cbb8327ea
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/Manifest
@@ -0,0 +1 @@
+DIST cuda_6.5.11_rc_linux_64.run 965707668 SHA256 1e8bd68a8eceff880ff631cbf6fdba06696a76933663f77b4a6f71522d732ac7 SHA512 7c5b344c5e8a808f052592753415c2fedb9b45b2bc83fa400b9a6f14eeb1e4308712c3fb1d25e3df72d014b645aa803670e528fd6fd758b2c48d94adc9963fc0 WHIRLPOOL 57085612e0cca66a3436352f8ff4af9fb584e37bf357ba23fc821048fb86dce51bf00a513e28dec06a9a0005bc3ef620f2fa366b895cc096142463fddba05dcf
diff --git a/dev-util/nvidia-cuda-sdk/metadata.xml b/dev-util/nvidia-cuda-sdk/metadata.xml
new file mode 100644
index 000000000..8bd8dab6f
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <use>
+ <flag name="opencl">
+ Build OpenCL binaries.
+ </flag>
+ <flag name="cuda">
+ Build CUDA binaries.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.11.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.11.ebuild
new file mode 100644
index 000000000..4e76354b9
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.11.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2014 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-65-rc-toolkit-download"
+SRC_URI="amd64? ( cuda_${PV}_rc_linux_64.run )"
+
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux"
+#IUSE="debug +doc +examples opencl +cuda"
+IUSE="debug +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-340.21[uvm]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test fetch"
+
+pkg_nofetch() {
+ einfo "Please download"
+ einfo " - cuda_${P}_rc_linux64.run"
+ einfo "from ${CURI} and place it in ${DISTDIR}"
+}
+
+S=${WORKDIR}/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_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)"
+
+ 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 "/ 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 ..."
+ # dodoc -r doc
+ # dodoc *.txt */*.pdf
+ # treecopy $(find -type f -name readme.txt) "${ED}"/usr/share/doc/${PF}/
+ # eend
+ #fi
+
+ crap+=" *.txt doc Samples.htm* */*.pdf"
+
+ ebegin "Cleaning before installation..."
+ for i in ${crap}; do
+ if [[ -e ${i} ]]; then
+ find ${i} -delete || die
+ fi
+ done
+ find -type f -name "*.o" -delete
+ find -type f -name "readme.txt" -delete
+ 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
+}