mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 12:30:44 +02:00
*cuda:new sdk, pentoo style
This commit is contained in:
parent
8abc669f4b
commit
20f841e020
3 changed files with 98 additions and 82 deletions
|
|
@ -1,5 +1,5 @@
|
|||
AUX 99cudasdk 67 RMD160 fc48d3d14e4bf8d9931466fa9b93dbc0cd8e4990 SHA1 66f378316b2577681201f4cdad50b7c2186f8885 SHA256 d2312e36071b1fe63289a4632b62fab7ebe91f8a48eb4550c5170389ab6fc69f
|
||||
DIST cuda-sdk-linux-2.10.1215.2015-3233425.run 46618139 RMD160 bfbadee2b669d72e038abf34cb200343a3826465 SHA1 3ef64ffd9d1bc0afe351c80f07d5c2a87e7e044a SHA256 5d9521f049312fc00fef9e9ed6fa2bd8475e0d309dab109da4b663461d9855bb
|
||||
DIST cudasdk_2.2_linux.run 55951278 RMD160 68c05b95b2a1f9230b9a076f1d9cf150d877d8b6 SHA1 72a6877c649a7444a853260d21387ed8a80b98c8 SHA256 1962a0a0795a8d2aef7c4e113319bd0bb376a7bb553405d94d731e594ef316fb
|
||||
EBUILD nvidia-cuda-sdk-2.1.1215.2015-r1.ebuild 1752 RMD160 77e70cb75d051a004952c66615d674276f092e06 SHA1 98089dae1e852da3d98bf2dfab1086abbc8b0e39 SHA256 a4de6ebc3471b248a9393d3ea2688a26c53ea2830cc9750a3e791ca503719399
|
||||
DIST cudasdk_2.3_linux.run 66005555 RMD160 e6995f190663ec5826f986420f2c02920a484444 SHA1 6411d962d251cede1fac0eb6eaee001e00c053f4 SHA256 26ec80755b124a8484c93a6481a3c19f4fa7fdae96b087fd889346981c463873
|
||||
EBUILD nvidia-cuda-sdk-2.2-r1.ebuild 2110 RMD160 0e5728db169991c704a6033e5a3672406c6739ff SHA1 dfc39971e802af8154ed04d551cc322c1eb4be42 SHA256 01739d47178bc351b62257c2b4b065f59d834a559920df4a5b53870a3ac4004a
|
||||
EBUILD nvidia-cuda-sdk-2.3-r1.ebuild 2076 RMD160 3af209d0d3035bd176f3d71ec20dc589efe3382c SHA1 8f346d7b022f5f898c3d8bed302963b1a090756d SHA256 cb924578fdb59779cdb99d228f31493d735624530ce0436f6d42c1d713603ca5
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
# Copyright 1999-2008 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-2.10.1215.2015.ebuild,v 1.1 2009/01/21 14:38:52 spock Exp $
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="NVIDIA CUDA Software Development Kit"
|
||||
HOMEPAGE="http://developer.nvidia.com/cuda"
|
||||
|
||||
SRC_URI="http://developer.download.nvidia.com/compute/cuda/2_1/SDK/cuda-sdk-linux-2.10.1215.2015-3233425.run"
|
||||
LICENSE="CUDPP"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug doc emulation examples livecd"
|
||||
|
||||
RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.1
|
||||
!livecd? ( >=x11-drivers/nvidia-drivers-180.22 )
|
||||
virtual/glut"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
unpack_makeself
|
||||
cd "${S}"
|
||||
sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/common/common.mk
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myopts=""
|
||||
|
||||
if use emulation; then
|
||||
myopts="emu=1"
|
||||
fi
|
||||
|
||||
if use debug; then
|
||||
myopts="${myopts} dbg=1"
|
||||
fi
|
||||
|
||||
cd "${S}/sdk"
|
||||
if use doc ; then
|
||||
dodoc doc
|
||||
else
|
||||
rm -rf doc
|
||||
fi
|
||||
if ! use examples ; then
|
||||
rm -rf projects bin tools
|
||||
fi
|
||||
emake lib/libcutil.so
|
||||
emake lib/libparamgl.so
|
||||
emake lib/librendercheckgl.so
|
||||
emake cuda-install=/opt/cuda ${myopts} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/sdk"
|
||||
# don't use lib32 or lib64 directories
|
||||
unset ABI
|
||||
|
||||
# Put libs inside sdk
|
||||
exeinto /opt/cuda/lib
|
||||
doexe "${S}"/sdk/lib/*
|
||||
rm -rf "${S}"/sdk/lib/*
|
||||
|
||||
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/$(dirname ${f})"
|
||||
doexe "${f}"
|
||||
else
|
||||
insinto "/opt/cuda/sdk/$(dirname ${f})"
|
||||
doins "${f}"
|
||||
fi
|
||||
done
|
||||
doenvd "${FILESDIR}/99cudasdk"
|
||||
}
|
||||
96
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3-r1.ebuild
Normal file
96
dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3-r1.ebuild
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
# 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-sdk/nvidia-cuda-sdk-2.3.ebuild,v 1.1 2009/07/29 06:57:43 spock Exp $
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="NVIDIA CUDA Software Development Kit"
|
||||
HOMEPAGE="http://developer.nvidia.com/cuda"
|
||||
|
||||
CUDA_V=${PV//./_}
|
||||
|
||||
SRC_URI="http://developer.download.nvidia.com/compute/cuda/${CUDA_V}/sdk/cudasdk_${PV}_linux.run"
|
||||
LICENSE="CUDPP"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="debug -doc -emulation -examples +pentoo"
|
||||
|
||||
RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.3
|
||||
examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-190.18 ) )
|
||||
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_prepare() {
|
||||
sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/shared/common.mk sdk/C/common/common.mk
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${S}/sdk/C"
|
||||
emake lib/libcutil.so || die
|
||||
emake lib/libparamgl.so || die
|
||||
emake lib/librendercheckgl.so || die
|
||||
|
||||
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/C"
|
||||
emake cuda-install=/opt/cuda ${myopts} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/sdk"
|
||||
|
||||
# This only contains object files.
|
||||
rm -rf projects
|
||||
|
||||
if ! use doc; then
|
||||
rm -rf C/doc C/ReleaseNotes.html C/releaseNotesData
|
||||
fi
|
||||
|
||||
if ! use examples; then
|
||||
rm -rf C/bin C/src
|
||||
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
|
||||
}
|
||||
Loading…
Reference in a new issue