diff options
author | Michael Januszewski <spock@gentoo.org> | 2009-06-19 23:57:06 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2009-06-19 23:57:06 +0000 |
commit | ca2cfd8229a294c2381b193e7ba724427d7ddb2e (patch) | |
tree | 5ddddc36740eaeb8b43c7df368eab0ba2bdfa341 /dev-util/nvidia-cuda-toolkit | |
parent | Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>, for use in I... (diff) | |
download | gentoo-2-ca2cfd8229a294c2381b193e7ba724427d7ddb2e.tar.gz gentoo-2-ca2cfd8229a294c2381b193e7ba724427d7ddb2e.tar.bz2 gentoo-2-ca2cfd8229a294c2381b193e7ba724427d7ddb2e.zip |
Add support for the CUDA visual profiler (bug #274095).
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/nvidia-cuda-toolkit')
4 files changed, 169 insertions, 1 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/ChangeLog b/dev-util/nvidia-cuda-toolkit/ChangeLog index 29966b3ea008..1851279cd425 100644 --- a/dev-util/nvidia-cuda-toolkit/ChangeLog +++ b/dev-util/nvidia-cuda-toolkit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/nvidia-cuda-toolkit # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-toolkit/ChangeLog,v 1.5 2009/05/16 15:46:35 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-toolkit/ChangeLog,v 1.6 2009/06/19 23:57:06 spock Exp $ + +*nvidia-cuda-toolkit-2.2-r1 (19 Jun 2009) + + 19 Jun 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-toolkit-2.2-r1.ebuild, + +files/nvidia-cuda-toolkit-2.2-enum_fix.patch, metadata.xml: + Add support for the CUDA visual profiler (bug #274095). *nvidia-cuda-toolkit-2.2 (16 May 2009) diff --git a/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-2.2-enum_fix.patch b/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-2.2-enum_fix.patch new file mode 100644 index 000000000000..21556729fb9a --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-2.2-enum_fix.patch @@ -0,0 +1,42 @@ +diff -Naurp cudatoolkit_orig/include/cuda.h cudatoolkit/include/cuda.h +--- cudatoolkit_orig/include/cuda.h 2009-04-13 10:39:12.000000000 +0200 ++++ cudatoolkit/include/cuda.h 2009-05-09 17:28:25.000000000 +0200 +@@ -86,7 +86,7 @@ typedef enum CUctx_flags_enum { + CU_CTX_SCHED_MASK = 0x3, + CU_CTX_BLOCKING_SYNC = 4, ///< Use blocking synchronization + CU_CTX_MAP_HOST = 8, ///< Support mapped pinned allocations +- CU_CTX_FLAGS_MASK = 0xf, ++ CU_CTX_FLAGS_MASK = 0xf + } CUctx_flags; + + /** +@@ -94,7 +94,7 @@ typedef enum CUctx_flags_enum { + */ + typedef enum CUevent_flags_enum { + CU_EVENT_DEFAULT = 0, ///< Default event flag +- CU_EVENT_BLOCKING_SYNC = 1, ///< Event uses blocking synchronization ++ CU_EVENT_BLOCKING_SYNC = 1 ///< Event uses blocking synchronization + } CUevent_flags; + + /** +@@ -117,7 +117,7 @@ typedef enum CUarray_format_enum { + typedef enum CUaddress_mode_enum { + CU_TR_ADDRESS_MODE_WRAP = 0, ///< Wrapping address mode + CU_TR_ADDRESS_MODE_CLAMP = 1, ///< Clamp to edge address mode +- CU_TR_ADDRESS_MODE_MIRROR = 2, ///< Mirror address mode ++ CU_TR_ADDRESS_MODE_MIRROR = 2 ///< Mirror address mode + } CUaddress_mode; + + /** +diff -Naurp cudatoolkit_orig/include/driver_types.h cudatoolkit/include/driver_types.h +--- cudatoolkit_orig/include/driver_types.h 2009-04-13 10:39:06.000000000 +0200 ++++ cudatoolkit/include/driver_types.h 2009-05-09 17:31:17.000000000 +0200 +@@ -140,7 +140,7 @@ enum cudaChannelFormatKind + cudaChannelFormatKindSigned = 0, ///< Signed channel format + cudaChannelFormatKindUnsigned = 1, ///< Unsigned channel format + cudaChannelFormatKindFloat = 2, ///< Float channel format +- cudaChannelFormatKindNone = 3, ///< No channel format ++ cudaChannelFormatKindNone = 3 ///< No channel format + }; + + /** diff --git a/dev-util/nvidia-cuda-toolkit/metadata.xml b/dev-util/nvidia-cuda-toolkit/metadata.xml index 2c3ddaaa0f8e..54cc6b7049e4 100644 --- a/dev-util/nvidia-cuda-toolkit/metadata.xml +++ b/dev-util/nvidia-cuda-toolkit/metadata.xml @@ -6,5 +6,10 @@ <email>spock@gentoo.org</email> <name>Michał Januszewski</name> </maintainer> + <use> + <flag name='profiler'> + Installs the NVIDIA CUDA visual profiler. + </flag> + </use> </pkgmetadata> diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-2.2-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-2.2-r1.ebuild new file mode 100644 index 000000000000..4ae1f0c3c997 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-2.2-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-2.2-r1.ebuild,v 1.1 2009/06/19 23:57:06 spock Exp $ + +EAPI=2 + +inherit eutils + +DESCRIPTION="NVIDIA CUDA Toolkit" +HOMEPAGE="http://developer.nvidia.com/cuda" + +CUDA_V=${PV//./_} + +BASE_URI="http://developer.download.nvidia.com/compute/cuda/${CUDA_V}/toolkit" +SRC_URI="amd64? ( ${BASE_URI}/cudatoolkit_${PV}_linux_64_suse11.1.run ) + x86? ( ${BASE_URI}/cudatoolkit_${PV}_linux_32_suse11.1.run )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc profiler" + +DEPEND="!dev-util/nvidia-cuda-profiler" +RDEPEND="" +RESTRICT="strip" + +S="${WORKDIR}" + +src_unpack() { + unpack_makeself +} + +src_prepare() { + epatch "${FILESDIR}/${P}-enum_fix.patch" +} + +src_install() { + local DEST=/opt/cuda + export CONF_LIBDIR_OVERRIDE="lib" + + # HACK: temporary workaround until CONF_LIBDIR_OVERRIDE is respected. + export LIBDIR_amd64="lib" + + into ${DEST} + dobin bin/* + dolib lib/* + + chmod a-x "${D}/${DEST}/bin/nvcc.profile" + + # doman does not respect DESTTREE + insinto ${DEST}/man/man1 + doins man/man1/* + insinto ${DEST}/man/man3 + doins man/man3/* + prepman ${DEST} + + insinto ${DEST}/include + doins include/*.h + insinto ${DEST}/include/crt + doins include/crt/*.h + + insinto ${DEST}/src + doins src/* + + into ${DEST}/open64 + dobin open64/bin/* + libopts -m0755 + dolib open64/lib/* + + if use doc ; then + insinto ${DEST}/doc + doins doc/* + fi + + cat > "${T}/env" << EOF +PATH=${DEST}/bin +ROOTPATH=${DEST}/bin +LDPATH=${DEST}/lib +MANPATH=${DEST}/man +EOF + newenvd "${T}/env" 99cuda + + if use profiler; then + # Visual profiler needs qt4. + # TODO: use system libraries on x86 systems. + into ${DEST}/cudaprof + dobin cudaprof/bin/{cudaprof,assistant} + insinto ${DEST}/cudaprof/bin + doins cudaprof/bin/*.so* + insinto ${DEST}/cudaprof/bin/sqldrivers + doins cudaprof/bin/sqldrivers/* + + if use doc; then + insinto ${DEST}/cudaprof/doc + doins cudaprof/doc/* + insinto ${DEST}/cudaprof/projects + doins cudaprof/projects/* + fi + + cat > "${T}/env" << EOF +PATH=${DEST}/cudaprof/bin +ROOTPATH=${DEST}/cudaprof/bin +LDPATH=${DEST}/cudaprof/bin +EOF + newenvd "${T}/env" 99cudaprof + fi +} + +pkg_postinst() { + elog "If you want to natively run the code generated by CUDA, you will need" + elog ">=x11-drivers/nvidia-drivers-185.18.08." + elog "" + elog "Run '. /etc/profile' before using the CUDA toolkit. " +} |