summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-05-28 09:50:34 +0000
committerJustin Lecher <jlec@gentoo.org>2014-05-28 09:50:34 +0000
commit48166be4dcf7c6a5e8fd8f57b352eccd96a49986 (patch)
tree7017bf65a3d1546e86fa4d95135ab3811e053b24 /dev-util/nvidia-cuda-sdk
parentAdd documentation for man page; add missing die (diff)
downloadgentoo-2-48166be4dcf7c6a5e8fd8f57b352eccd96a49986.tar.gz
gentoo-2-48166be4dcf7c6a5e8fd8f57b352eccd96a49986.tar.bz2
gentoo-2-48166be4dcf7c6a5e8fd8f57b352eccd96a49986.zip
dev-util/nvidia-cuda-sdk: Version Bump, #507804
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'dev-util/nvidia-cuda-sdk')
-rw-r--r--dev-util/nvidia-cuda-sdk/ChangeLog9
-rw-r--r--dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch22
-rw-r--r--dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch11
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild150
4 files changed, 191 insertions, 1 deletions
diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog
index 4ed2b67ba8dd..eaa7be491b5d 100644
--- a/dev-util/nvidia-cuda-sdk/ChangeLog
+++ b/dev-util/nvidia-cuda-sdk/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/nvidia-cuda-sdk
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.44 2014/01/28 07:04:57 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.45 2014/05/28 09:50:33 jlec Exp $
+
+*nvidia-cuda-sdk-6.0.37 (28 May 2014)
+
+ 28 May 2014; Justin Lecher <jlec@gentoo.org> +nvidia-cuda-sdk-6.0.37.ebuild,
+ +files/nvidia-cuda-sdk-6.0.37-asneeded.patch,
+ +files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch:
+ Version Bump, #507804
28 Jan 2014; Patrick Lauer <patrick@gentoo.org>
-nvidia-cuda-sdk-5.0.35-r1.ebuild:
diff --git a/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch
new file mode 100644
index 000000000000..c414578a73fb
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch
@@ -0,0 +1,22 @@
+--- a/cuda-samples/0_Simple/cudaOpenMP/Makefile
++++ b/cuda-samples/0_Simple/cudaOpenMP/Makefile
+@@ -166,7 +166,7 @@
+ endif
+ endif
+
+-GOMPLIB ?= $(shell find $(OPENMPDIR)/libgomp* 2>/dev/null)
++GOMPLIB ?= $(shell find $(OPENMPDIR) -type f -name libgomp* 2>/dev/null)
+
+ ifeq ($(GOMPLIB),)
+ $(info -----------------------------------------------------------------------------------------------)
+--- a/cuda-samples/0_Simple/UnifiedMemoryStreams/Makefile
++++ b/cuda-samples/0_Simple/UnifiedMemoryStreams/Makefile
+@@ -166,7 +166,7 @@
+ endif
+ endif
+
+-GOMPLIB ?= $(shell find $(OPENMPDIR)/libgomp* 2>/dev/null)
++GOMPLIB ?= $(shell find $(OPENMPDIR) -type f -name libgomp* 2>/dev/null)
+
+ ifeq ($(GOMPLIB),)
+ $(info -----------------------------------------------------------------------------------------------)
diff --git a/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch
new file mode 100644
index 000000000000..fd8fc59b20c6
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch
@@ -0,0 +1,11 @@
+--- a/cuda-samples/0_Simple/simpleMPI/Makefile
++++ b/cuda-samples/0_Simple/simpleMPI/Makefile
+@@ -172,7 +172,7 @@
+ MPICXX=mpicxx
+ EXEC=@echo "[@]"
+ else
+- MPI_GCC := $(shell $(MPICXX) -v 2>&1 | grep x86_64-pc-linux-gnu-gcc | wc -l | tr -d ' ')
++ MPI_GCC := $(shell $(MPICXX) -v 2>&1 | grep gcc | wc -l | tr -d ' ')
+ ifeq ($(MPI_GCC),0)
+ MPI_CCFLAGS += -stdlib=libstdc++
+ MPI_LDFLAGS += -stdlib=libstdc++
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild
new file mode 100644
index 000000000000..74bfdee1b7cc
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild,v 1.1 2014/05/28 09:50:33 jlec Exp $
+
+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="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/installers"
+SRC_URI="
+ amd64? ( ${CURI}/cuda_${PV}_linux_64.run )
+ x86? ( ${CURI}/cuda_${PV}_linux_32.run )"
+
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-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-334.16-r7[uvm]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+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)"
+ 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 "/ 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
+
+ # sed corrupts the simpleMPI Makefile, resulting in a failed libstdc++ detection.
+ # Therefore we need this patch, if we don't wont to touch the sed command above.
+ epatch "${FILESDIR}"/${P}-simpleMPI.patch
+}
+
+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/" \
+ ${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
+}