summaryrefslogtreecommitdiffstats
path: root/dev-util
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/nvidia-cuda-sdk/Manifest2
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild137
-rw-r--r--dev-util/nvidia-cuda-toolkit/Manifest3
-rwxr-xr-xdev-util/nvidia-cuda-toolkit/files/cuda-config28
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild15
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild10
6 files changed, 139 insertions, 56 deletions
diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest
new file mode 100644
index 0000000..85b76d4
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST cuda_10.1.168_418.67_linux.run 2526901749 BLAKE2B ed2207400730600c63895cc894e02a14dce59c6293f198ea2a94f6dd0fab25a005d4754f91376c267cb95f3fdc66ee08e4353ec17b69d28881c59190b9eb4746 SHA512 85635012ec7081e200fb46f973852939f9709e802f495c288d5f31ff1fbd283a578fdaca0afa8955e6e0c7ca6c4862428da5168e0938b48390952d8633350910
+EBUILD nvidia-cuda-sdk-10.1.168.ebuild 3636 BLAKE2B a47fed140a65075281d0c21203cd26ed255a33756455352d5c361a1fe142e41aaea81ae8b3f9ca390b856e74fb493c10a9a299cbf4bf19a4ce7b63a50b9839c1 SHA512 28fc13b9986fd54922c58f3dc408e6f6e8de67fc9b1d74c71be8526d8c35d2a5ac3a7562a74848c0a74d071a38efb36c91544bad297b29a32f4b1d90838e2c95
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild
new file mode 100644
index 0000000..64d25cd
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cuda flag-o-matic portability toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1-2)
+DRIVER_PV="418.67"
+
+DESCRIPTION="NVIDIA CUDA Software Development Kit"
+HOMEPAGE="https://developer.nvidia.com/cuda-zone"
+SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod/local_installers/cuda_${PV}_${DRIVER_PV}_linux -> 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-396.24[uvm]
+ mpi? ( virtual/mpi )
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+S=${WORKDIR}/builds/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
+ )
+
+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
+}
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
deleted file mode 100644
index 70e97f3..0000000
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-AUX cuda-config 512 BLAKE2B fdd0c6f32c9fb49dd2d0864a36a882bed2d20e7e4890b239eb77620d8c8eb7ce280e2b1552e56a91d8e2925453ad3dd34a0159f4b0851b8f073d9ad0fbda5dc1 SHA512 a67f3e34a14ca1c13be8f3f8d345b6c7d881edeae52d737e9aafb9f9807f4dee08e016b8823cb60864961b59f2dd330eb8a1b372178c2451e253acc586ae889a
-EBUILD nvidia-cuda-toolkit-9-r1.ebuild 281 BLAKE2B a642548b9a1886210a68d7ef8bd77947e459b9137daccb08d5828031fc0b4bac917c3594c14f7d408c2d921363cb7786590ad7f8277bc103ec9185835d43ebed SHA512 bbe12344e117f4ea79120aafa11a85cf217e08f987e1228e18af0f9f6e0f68194c73a146e08ca193af4f3de08999b7c54ed754daf6ad32b80fddcc5ff7631d30
-EBUILD nvidia-cuda-toolkit-9.ebuild 225 BLAKE2B bdf5a84d21d4838c918139c249029f964da6a0cdcb1a475af631350d268999c8072ca15dcce63005f2a8b83e08d7eca646892cc207bca70f7b946cd9ae337992 SHA512 822c0fd651a525a38681f879094384cc46eed7fb08bedabcd1790358fc179bb84e71226b9a14a43800c45911baedb32d7bca1afefe20d111912508e565f0ae89
diff --git a/dev-util/nvidia-cuda-toolkit/files/cuda-config b/dev-util/nvidia-cuda-toolkit/files/cuda-config
deleted file mode 100755
index 14064d3..0000000
--- a/dev-util/nvidia-cuda-toolkit/files/cuda-config
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-SUPPORT_GCC_VERSIONS_BY_CUDA="4.4 4.5 4.6 4.7 4.8 4.9 5.4 6.4 7.3"
-
-_print_help() {
- cat <<- EOF
- Usage:
- $(basename $0) [options]
-
- -s | --supported Returns by current CUDA supported gcc versions
- -h | --help Shows this help
-EOF
-}
-
-case ${1} in
- -s|--supported)
- echo "${SUPPORT_GCC_VERSIONS_BY_CUDA}"
- exit 0
- ;;
- -h|--help)
- _print_help
- exit -1
- ;;
- *)
- _print_help
- exit 1
- ;;
-esac
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild
deleted file mode 100644
index 48578a3..0000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-inherit eutils
-
-DESCRIPTION="NVIDIA CUDA Toolkit Override"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"
-
-
-src_install() {
- dobin "${FILESDIR}/cuda-config"
-}
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild
deleted file mode 100644
index 22b66d8..0000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-inherit eutils
-
-DESCRIPTION="NVIDIA CUDA Toolkit Override"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"