diff options
-rw-r--r-- | dev-util/nvidia-cuda-sdk/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild | 97 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/metadata.xml | 3 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-3.0.ebuild | 142 |
5 files changed, 256 insertions, 2 deletions
diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog index f1796701f555..5df45bb89187 100644 --- a/dev-util/nvidia-cuda-sdk/ChangeLog +++ b/dev-util/nvidia-cuda-sdk/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/nvidia-cuda-sdk # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.18 2010/02/08 12:10:19 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.19 2010/03/21 13:52:56 spock Exp $ + +*nvidia-cuda-sdk-3.0 (21 Mar 2010) + + 21 Mar 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-3.0.ebuild: + Version bump. *nvidia-cuda-sdk-3.0_beta1 (08 Feb 2010) diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild new file mode 100644 index 000000000000..389a4e8f64ac --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2010 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-3.0.ebuild,v 1.1 2010/03/21 13:52:56 spock Exp $ + +EAPI=2 + +inherit eutils toolchain-funcs + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +HOMEPAGE="http://developer.nvidia.com/cuda" + +CUDA_V=${PV//_/-} +DIR_V=${CUDA_V//./_} +DIR_V=${DIR_V//beta/Beta} + +SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}_linux.run" +LICENSE="CUDPP" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +doc emulation +examples opencl +cuda" + +RDEPEND=">=dev-util/nvidia-cuda-toolkit-3.0_beta1 + examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-195.30 ) ) + virtual/glut" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +RESTRICT="binchecks" + +pkg_setup() { + if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then + eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully." + eerror "Please use gcc-config to switch to a compatible GCC version." + die "<=sys-devel/gcc-4.3 required" + fi +} + +src_unpack() { + unpack_makeself +} + +src_compile() { + if ! use examples; then + return + fi + local myopts="" + + if use emulation; then + myopts="emu=1" + fi + + if use debug; then + myopts="${myopts} dbg=1" + fi + + cd "${S}/sdk" + + if use cuda; then + cd C + emake cuda-install=/opt/cuda ${myopts} || die + cd .. + fi + + if use opencl; then + cd OpenCL + emake || die + cd .. + fi +} + +src_install() { + cd "${S}/sdk" + + if ! use doc; then + rm -rf doc ReleaseNotes.htm releaseNotesData + fi + + if ! use examples; then + rm -rf bin tools + fi + + for f in $(find .); do + local t="$(dirname ${f})" + if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then + continue + fi + + if [[ -x "${f}" && ! -d "${f}" ]]; then + exeinto "/opt/cuda/sdk/${t}" + doexe "${f}" + else + insinto "/opt/cuda/sdk/${t}" + doins "${f}" + fi + done +} diff --git a/dev-util/nvidia-cuda-toolkit/ChangeLog b/dev-util/nvidia-cuda-toolkit/ChangeLog index fe8fb8eb920a..b21de986f2e0 100644 --- a/dev-util/nvidia-cuda-toolkit/ChangeLog +++ b/dev-util/nvidia-cuda-toolkit/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/nvidia-cuda-toolkit # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-toolkit/ChangeLog,v 1.19 2010/01/20 22:54:02 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-toolkit/ChangeLog,v 1.20 2010/03/21 13:50:17 spock Exp $ + +*nvidia-cuda-toolkit-3.0 (21 Mar 2010) + + 21 Mar 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-toolkit-3.0.ebuild, metadata.xml: + Version bump. 20 Jan 2010; Michał Januszewski <spock@gentoo.org> nvidia-cuda-toolkit-3.0_beta1.ebuild: diff --git a/dev-util/nvidia-cuda-toolkit/metadata.xml b/dev-util/nvidia-cuda-toolkit/metadata.xml index 25ec5c4b9e59..48e83b2eaecb 100644 --- a/dev-util/nvidia-cuda-toolkit/metadata.xml +++ b/dev-util/nvidia-cuda-toolkit/metadata.xml @@ -13,6 +13,9 @@ <flag name='debugger'> Installs the CUDA debugger. </flag> + <flag name='opencl'> + Installs OpenCL utilities. + </flag> </use> </pkgmetadata> diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-3.0.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-3.0.ebuild new file mode 100644 index 000000000000..d293f92122ee --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-3.0.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2010 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-3.0.ebuild,v 1.1 2010/03/21 13:50:17 spock Exp $ + +EAPI=2 + +inherit eutils multilib + +DESCRIPTION="NVIDIA CUDA Toolkit" +HOMEPAGE="http://developer.nvidia.com/cuda" + +CUDA_V=${PV//_/-} +DIR_V=${CUDA_V//./_} +DIR_V=${DIR_V//beta/Beta} + +BASE_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/toolkit" +SRC_URI="amd64? ( ${BASE_URI}/cudatoolkit_${CUDA_V}_linux_64_rhel5.3.run ) + x86? ( ${BASE_URI}/cudatoolkit_${CUDA_V}_linux_32_rhel5.3.run )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debugger doc profiler opencl" + +DEPEND="!dev-util/nvidia-cuda-profiler" +RDEPEND="${DEPEND} + >=sys-devel/gcc-4.0 + profiler? ( x86? ( + x11-libs/qt-gui + x11-libs/qt-core + x11-libs/qt-assistant + x11-libs/qt-sql[sqlite] ) + ) + debugger? ( >=sys-libs/libtermcap-compat-2.0.8-r2 )" +RESTRICT="strip binchecks" + +S="${WORKDIR}" + +src_unpack() { + for f in ${A} ; do + if [ "${f//*.run/}" == "" ]; then + unpack_makeself ${f} + fi + done +} + +src_install() { + local DEST=/opt/cuda + + into ${DEST} + dobin bin/* + dolib $(get_libdir)/* + + if ! use debugger; then + rm -f "${D}/${DEST}/bin/cuda-gdb" + fi + + 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 -r include/* + + insinto ${DEST}/src + doins src/* + + if use doc ; then + insinto ${DEST}/doc + doins -r doc/* + fi + + cat > "${T}/env" << EOF +PATH=${DEST}/bin +ROOTPATH=${DEST}/bin +LDPATH=${DEST}/$(get_libdir) +MANPATH=${DEST}/man +EOF + newenvd "${T}/env" 99cuda + + if use profiler; then + local targets="cudaprof" + if use opencl; then + targets="${targets} openclprof" + fi + + for target in ${targets}; do + into ${DEST}/${target} + dobin ${taget}/bin/${target} + + cat > "${T}/env" << EOF +PATH=${DEST}/${target}/bin +ROOTPATH=${DEST}/${target}/bin +EOF + if use x86 ; then + dosym /usr/bin/assistant ${DEST}/${target}/bin + else + dobin ${target}/bin/assistant + insinto ${DEST}/${target}/bin + doins ${target}/bin/*.so* + insinto ${DEST}/${target}/bin/sqldrivers + doins ${target}/bin/sqldrivers/* + + cat >> "${T}/env" << EOF +LDPATH=${DEST}/${target}/bin +EOF + fi + + newenvd "${T}/env" 99${target} + + if use doc; then + insinto ${DEST}/${target} + doins ${target}/*.txt + insinto ${DEST}/${target}/doc + doins ${target}/doc/* + insinto ${DEST}/${target}/projects + doins ${target}/projects/* + fi + done + fi + + export CONF_LIBDIR_OVERRIDE="lib" + # HACK: temporary workaround until CONF_LIBDIR_OVERRIDE is respected. + export LIBDIR_amd64="lib" + + into ${DEST}/open64 + dobin open64/bin/* + libopts -m0755 + dolib open64/lib/* +} + +pkg_postinst() { + elog "If you want to natively run the code generated by this version of the" + elog "CUDA toolkit, you will need >=x11-drivers/nvidia-drivers-195.36.15." + elog "" + elog "Run '. /etc/profile' before using the CUDA toolkit. " +} |