mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 20:43:38 +02:00
nvidia-cuda-sdk: fork from gentoo to fix x86 support
This commit is contained in:
parent
5cc2755773
commit
d3be265cc4
3 changed files with 334 additions and 0 deletions
6
dev-util/nvidia-cuda-sdk/Manifest
Normal file
6
dev-util/nvidia-cuda-sdk/Manifest
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
DIST cuda_6.5.14_linux_32.run 76788277 SHA256 63fa1fe5d013e9944d6c1a3a71768fa4dcb35d6a157c1b06765bb56198c205c5 SHA512 89649ee0f4543b37037b7c8f5ed0b8bd502512afb4d93e3158b3df4786123be05a5288986b5abbfe15c14eb010777d2527b715225bea96a354a898c34e4a2fcc WHIRLPOOL c1094dd84883ef08d91c6eec3634a285496418db1e76b70f449f833dcb01069a620af504b6df7fe2752559688ed1f60f4adda8c97d849d648cba1be0f8196954
|
||||
DIST cuda_6.5.14_linux_64.run 972320904 SHA256 f3e527f34f317314fe8fcd8c85f10560729069298c0f73105ba89225db69da48 SHA512 fecca731b86955f5bc7b09d88b02951e3ee5d4b1f1cf5f92658227a029b87cd35d6ac22956a5fa0afe62dcdc57191f1d12bb08c9f7cc05128727cd8455947b1e WHIRLPOOL 0b890771dcca352168fed1b1df9b29504b03f8c29da59cec29914c541283998edf65f5ca6a41362143a2d5d7359822b036894f563c56b39583b1ac4c64e35180
|
||||
DIST cuda_6.5.19_linux_32.run 81882112 SHA256 9f767f38b84f52c097bec81669f99e4a6c4c9c09b5da1bc09fe49e0f804bc7a6 SHA512 1ce9bd6b472b7e4f1fb181eb340dfcb757714d59a89aaa02146cfe1a97c8ccb7eb7699b4ec823276f277eb4d82d95050eaba17e7ed5fd2e47b9b5d78531c5d4e WHIRLPOOL ac94b4e7f29811b4240623fb69b3c54214e7f0c60a286d899944dbab9da7fd3c122760199a3357667e33879bd48fbf352d5d39029acca6021e7caf21785557ed
|
||||
DIST cuda_6.5.19_linux_64.run 982446238 SHA256 5279bc159b72b7445d8aae5f289d24bb4042c35422ef32da68049d8f666d3ff5 SHA512 06854f020a5f72cf4bd714859e6966248ac2f589284113674e869fdaa1254cae27d4101940758ecda5df4724ad3e448a1f6d0c053b6cbc28107750872b6a5797 WHIRLPOOL 6ae8e53719e12997de60ec3688167f3fe33b1145d01217182e39ac386c25b358c8ba6cee45ad6c80e33ef66fd9a511338dce4589f10a31635b8437b6e528fd7a
|
||||
EBUILD nvidia-cuda-sdk-6.5.14.ebuild 4225 SHA256 cae375a0a89147aca35ba3283462aa7d4628e37b7fb48b44d3dab0a94fdce7e8 SHA512 ef7657eb39b500f3702f54c7c839717f5f3c015e8d3bdd7d16488a11bfec063a0d7352c353f9916f14a0acc85b311043a96732676c8c1f8397ec5b19647518de WHIRLPOOL 71b49800bdbbf0f523d4980c859d9c9edb92b25641fba6e518be1f0d4654651a66272e8e1808ccf9c82b244753d60f77ad64e778053820f04f50ca61cf7530c3
|
||||
EBUILD nvidia-cuda-sdk-6.5.19.ebuild 4230 SHA256 c39e1cccbfbf32de9354c76e3a6906eda9179d507b1e29bc7f0ae2a28ad4a24e SHA512 cfd2819b3f3a13ef6c2230af3bbf86762539e06001b4b7e96e27eeee14df6d216d002a46ccb1236e96fcef1bcc1222650df2c06486d0fb114a80e913b29dd530 WHIRLPOOL 3add30fed1e329a0e52a650612f275a42d85feb219b5cdf8b29801e013d495e17e00ea0caee917f8ac39db10feead3b1689bb0b5873b8dc17dda978cd3e9ddb3
|
||||
164
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.14.ebuild
Normal file
164
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.14.ebuild
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
# 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.5.14.ebuild,v 1.8 2014/12/26 18:08:45 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-340.32[uvm]
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
if use x86 || use x86-linux; then
|
||||
S=${WORKDIR}
|
||||
else
|
||||
S=${WORKDIR}/cuda-samples
|
||||
fi
|
||||
|
||||
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
|
||||
if use x86 || use x86-linux; then
|
||||
unpacker run_files/cuda*run
|
||||
else
|
||||
unpacker run_files/cuda-samples*run
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use cuda || use opencl; then
|
||||
cuda_pkg_setup
|
||||
fi
|
||||
|
||||
if use x86; then
|
||||
ewarn "Starting with version 6.5 NVIDIA dropped more and more"
|
||||
ewarn "the support for 32bit linux."
|
||||
ewarn "Be aware that bugfixes and new features may not be available."
|
||||
ewarn "http://dev.gentoo.org/~jlec/distfiles/CUDA_Toolkit_Release_Notes.pdf"
|
||||
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 "/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|$(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" \
|
||||
if use amd64 || use amd64-linux; then
|
||||
find common/inc/GL -delete || die
|
||||
fi
|
||||
find . -type f -name "*\.a" -delete || die
|
||||
}
|
||||
|
||||
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/" \
|
||||
MPI_GCC=10 \
|
||||
${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 ..."
|
||||
treecopy $(find -type f \( -name readme.txt -o -name "*.pdf" \)) "${ED}"/usr/share/doc/${PF}/
|
||||
docompress -x $(find "${ED}"/usr/share/doc/${PF}/ -type f -name readme.txt | sed -e "s:${ED}::")
|
||||
eend
|
||||
fi
|
||||
|
||||
crap+=" *.txt Samples.htm*"
|
||||
|
||||
ebegin "Cleaning before installation..."
|
||||
for i in ${crap}; do
|
||||
if [[ -e ${i} ]]; then
|
||||
find ${i} -delete || die
|
||||
fi
|
||||
done
|
||||
find -type f \( -name "*.o" -o -name "*.pdf" -o -name "readme.txt" \) -delete || die
|
||||
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
|
||||
}
|
||||
164
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.19.ebuild
Normal file
164
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.5.19.ebuild
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
# 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.5.19.ebuild,v 1.3 2014/11/18 12:32:56 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-343.22[uvm]
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
if use x86 || use x86-linux; then
|
||||
S=${WORKDIR}
|
||||
else
|
||||
S=${WORKDIR}/cuda-samples
|
||||
fi
|
||||
|
||||
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
|
||||
if use x86 || use x86-linux; then
|
||||
unpacker run_files/cuda*run
|
||||
else
|
||||
unpacker run_files/cuda-samples*run
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use cuda || use opencl; then
|
||||
cuda_pkg_setup
|
||||
fi
|
||||
|
||||
if use x86; then
|
||||
ewarn "Starting with version 6.5 NVIDIA dropped more and more"
|
||||
ewarn "the support for 32bit linux."
|
||||
ewarn "Be aware that bugfixes and new features may not be available."
|
||||
ewarn "http://dev.gentoo.org/~jlec/distfiles/CUDA_Toolkit_Release_Notes.pdf"
|
||||
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 "/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|$(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" \
|
||||
if use amd64 || use amd64-linux; then
|
||||
find common/inc/GL -delete || die
|
||||
fi
|
||||
find . -type f -name "*\.a" -delete || die
|
||||
}
|
||||
|
||||
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/" \
|
||||
MPI_GCC=10 \
|
||||
${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 ..."
|
||||
treecopy $(find -type f \( -name readme.txt -o -name "*.pdf" \)) "${ED}"/usr/share/doc/${PF}/
|
||||
docompress -x $(find "${ED}"/usr/share/doc/${PF}/ -type f -name readme.txt | sed -e "s:${ED}::")
|
||||
eend
|
||||
fi
|
||||
|
||||
crap+=" *.txt Samples.htm*"
|
||||
|
||||
ebegin "Cleaning before installation..."
|
||||
for i in ${crap}; do
|
||||
if [[ -e ${i} ]]; then
|
||||
find ${i} -delete || die
|
||||
fi
|
||||
done
|
||||
find -type f \( -name "*.o" -o -name "*.pdf" -o -name "readme.txt" \) -delete || die
|
||||
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
|
||||
}
|
||||
Loading…
Reference in a new issue