diff options
author | Marius Brehler <marbre@linux.sungazer.de> | 2017-03-01 08:56:02 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-03-02 08:50:41 +0100 |
commit | 730b55deb7d5b3112a50b83758c972234af2d22b (patch) | |
tree | e6028c675abcdba8bedd2b58c3e27c950c3e492d /dev-util/nvidia-cuda-sdk | |
parent | dev-util/nvidia-cuda-toolkit: Version bump to 8.0.61 (diff) | |
download | gentoo-730b55deb7d5b3112a50b83758c972234af2d22b.tar.gz gentoo-730b55deb7d5b3112a50b83758c972234af2d22b.tar.bz2 gentoo-730b55deb7d5b3112a50b83758c972234af2d22b.zip |
dev-util/nvidia-cuda-sdk: Version bump to 8.0.61
Gentoo-Bug: https://bugs.gentoo.org/611202
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4088
Diffstat (limited to 'dev-util/nvidia-cuda-sdk')
-rw-r--r-- | dev-util/nvidia-cuda-sdk/Manifest | 1 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-8.0.61.ebuild | 144 |
2 files changed, 145 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest index c2e10a6fa2fb..16e212e90b04 100644 --- a/dev-util/nvidia-cuda-sdk/Manifest +++ b/dev-util/nvidia-cuda-sdk/Manifest @@ -2,3 +2,4 @@ DIST cuda_6.5.19_linux_32.run 81882112 SHA256 9f767f38b84f52c097bec81669f99e4a6c DIST cuda_6.5.19_linux_64.run 982446238 SHA256 5279bc159b72b7445d8aae5f289d24bb4042c35422ef32da68049d8f666d3ff5 SHA512 06854f020a5f72cf4bd714859e6966248ac2f589284113674e869fdaa1254cae27d4101940758ecda5df4724ad3e448a1f6d0c053b6cbc28107750872b6a5797 WHIRLPOOL 6ae8e53719e12997de60ec3688167f3fe33b1145d01217182e39ac386c25b358c8ba6cee45ad6c80e33ef66fd9a511338dce4589f10a31635b8437b6e528fd7a DIST cuda_7.5.18_linux.run 1195424633 SHA256 08411d536741075131a1858a68615b8b73c51988e616e83b835e4632eea75eec SHA512 97459dfd124060200f1c43f763e5bce0bea53e35ed4bef72bee6c8ba1c04ecffb8695af11755443513316f91fdb5cb4d35662f7b87bca7e3de85d562d4e49363 WHIRLPOOL 59d186f5e9176db25e5991e8088417ac778953c3ed2f0dcef034968f7ea695c5d4cfea81759ac0f7f1290c3842d9d0339b5b74d2d90ec8b333135aa1b986ca10 DIST cuda_8.0.44_linux.run 1457082926 SHA256 64dc4ab867261a0d690735c46d7cc9fc60d989da0d69dc04d1714e409cacbdf0 SHA512 1bf9d8e6b853c2a971b8d908a043adc5b11ec7033faed04a773c42680882753f98bc33b46f6b301c24c0f780f74bc237dce5766fc857f1a905e6c1f200728d86 WHIRLPOOL e90fa2088cd70aef2794c1ce2db126d6186bc3c44d14c1cf7cb4a66f889cbb4799485d1d71ab045e2dfaed9bfabcea224ca04b7f97e9bce061ac9fbd31c62fdd +DIST cuda_8.0.61_375.26_linux.run 1465528129 SHA256 9ceca9c2397f841024e03410bfd6eabfd72b384256fbed1c1e4834b5b0ce9dc4 SHA512 d22303719a9feff64f95bf6a966f1caa2bf0cf8c955e475ce08ce54faa5e098d336c2db223ef0185c1f23b9c52b7d2f81a63515485219cfc016d72bda979248b WHIRLPOOL 650a0e8bc9ad2d0637cd4a82a057bf77e613559d1080a86009f594c73adb8879de62b26dac9d8e3f572806556bf878505382479e596d4ce91929ab94b882489a diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-8.0.61.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-8.0.61.ebuild new file mode 100644 index 000000000000..0f301935641d --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-8.0.61.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cuda eutils flag-o-matic portability toolchain-funcs unpacker versionator + +MYD=$(get_version_component_range 1-2) +DRIVER_PV="375.26" + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +HOMEPAGE="https://developer.nvidia.com/cuda-zone" +SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod2/local_installers/cuda_${PV}_${DRIVER_PV}_linux-run -> cuda_${PV}_${DRIVER_PV}_linux.run" + +LICENSE="CUDPP" +SLOT="0" +KEYWORDS="~amd64 ~amd64-linux" +IUSE="+cuda debug +doc +examples opencl mpi" + +RDEPEND=" + ~dev-util/nvidia-cuda-toolkit-${PV} + media-libs/freeglut + examples? ( + media-libs/freeimage + media-libs/glew:0= + >=x11-drivers/nvidia-drivers-375.26[uvm] + mpi? ( virtual/mpi ) + )" +DEPEND="${RDEPEND}" + +RESTRICT="test" + +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() { + # We first need to unpack the cuda_${PV}_linux.run file + # which includes the cuda-samples*run file. + 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 + + local file + while IFS="" read -d $'\0' -r file; do + sed \ + -e 's:-O[23]::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|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ + -i "${file}" || die + # -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \ + done < <(find . -type f -name 'Makefile' -print0) + + rm -rf common/inc/GL || die + find . -type f -name '*.a' -delete || die + + eapply_user +} + +src_compile() { + use examples || return + local myopts=("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[@]}" +} + +src_test() { + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + + local i + for i in {0..9}*/*; do + emake -C "${i}" run + done +} + +src_install() { + local f t crap=( *.txt Samples.htm* ) + + if use doc; then + ebegin "Installing docs ..." + while IFS="" read -d $'\0' -r f; do + treecopy "${f}" "${ED%/}"/usr/share/doc/${PF}/ + done < <(find -type f \( -name 'readme.txt' -o -name '*.pdf' \) -print0) + + while IFS="" read -d $'\0' -r f; do + docompress -x "${f#${ED%/}}" + done < <(find "${ED%/}"/usr/share/doc/${PF}/ -type f -name 'readme.txt' -print0) + eend + fi + + ebegin "Cleaning before installation..." + for f in "${crap[@]}"; do + rm -f "${f}" || die + done + find -type f \( -name '*.o' -o -name '*.pdf' -o -name 'readme.txt' \) -delete || die + eend + + ebegin "Moving files..." + while IFS="" read -d $'\0' -r f; do + t="$(dirname ${f})" + if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then + continue + fi + if [[ -x ${f} ]]; then + exeinto /opt/cuda/sdk/"${t}" + doexe "${f}" + else + insinto /opt/cuda/sdk/"${t}" + doins "${f}" + fi + done < <(find . -type f -print0) + eend +} |