Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/nvidia-cuda-sdk: ChangeLog nvidia-cuda-sdk-6.0.37.ebuild
Date: Wed, 28 May 2014 09:50:37
Message-Id: 20140528095034.0F2532004E@flycatcher.gentoo.org
1 jlec 14/05/28 09:50:33
2
3 Modified: ChangeLog
4 Added: nvidia-cuda-sdk-6.0.37.ebuild
5 Log:
6 dev-util/nvidia-cuda-sdk: Version Bump, #507804
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
9
10 Revision Changes Path
11 1.45 dev-util/nvidia-cuda-sdk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?rev=1.45&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?rev=1.45&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?r1=1.44&r2=1.45
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v
20 retrieving revision 1.44
21 retrieving revision 1.45
22 diff -u -r1.44 -r1.45
23 --- ChangeLog 28 Jan 2014 07:04:57 -0000 1.44
24 +++ ChangeLog 28 May 2014 09:50:33 -0000 1.45
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-util/nvidia-cuda-sdk
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.44 2014/01/28 07:04:57 patrick Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.45 2014/05/28 09:50:33 jlec Exp $
30 +
31 +*nvidia-cuda-sdk-6.0.37 (28 May 2014)
32 +
33 + 28 May 2014; Justin Lecher <jlec@g.o> +nvidia-cuda-sdk-6.0.37.ebuild,
34 + +files/nvidia-cuda-sdk-6.0.37-asneeded.patch,
35 + +files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch:
36 + Version Bump, #507804
37
38 28 Jan 2014; Patrick Lauer <patrick@g.o>
39 -nvidia-cuda-sdk-5.0.35-r1.ebuild:
40
41
42
43 1.1 dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild?rev=1.1&content-type=text/plain
47
48 Index: nvidia-cuda-sdk-6.0.37.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild,v 1.1 2014/05/28 09:50:33 jlec Exp $
53
54 EAPI=5
55
56 inherit cuda eutils flag-o-matic portability toolchain-funcs unpacker versionator
57
58 MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
59
60 DESCRIPTION="NVIDIA CUDA Software Development Kit"
61 HOMEPAGE="http://developer.nvidia.com/cuda"
62 CURI="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/installers"
63 SRC_URI="
64 amd64? ( ${CURI}/cuda_${PV}_linux_64.run )
65 x86? ( ${CURI}/cuda_${PV}_linux_32.run )"
66
67 LICENSE="CUDPP"
68 SLOT="0"
69 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
70 IUSE="debug +doc +examples opencl +cuda"
71
72 RDEPEND="
73 ~dev-util/nvidia-cuda-toolkit-${PV}
74 media-libs/freeglut
75 examples? (
76 media-libs/freeimage
77 media-libs/glew
78 virtual/mpi
79 >=x11-drivers/nvidia-drivers-334.16-r7[uvm]
80 )"
81 DEPEND="${RDEPEND}"
82
83 RESTRICT="test"
84
85 S=${WORKDIR}/cuda-samples
86
87 QA_EXECSTACK=(
88 opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint
89 opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort
90 opt/cuda/sdk/bin/x86_64/linux/release/cdpSimplePrint
91 opt/cuda/sdk/bin/x86_64/linux/release/cdpSimpleQuicksort
92 )
93
94 src_unpack() {
95 unpacker
96 unpacker run_files/cuda-samples*run
97 }
98
99 pkg_setup() {
100 if use cuda || use opencl; then
101 cuda_pkg_setup
102 fi
103 }
104
105 src_prepare() {
106 export RAWLDFLAGS="$(raw-ldflags)"
107 epatch "${FILESDIR}"/${P}-asneeded.patch
108
109 sed \
110 -e 's:-O2::g' \
111 -e 's:-O3::g' \
112 -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \
113 -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \
114 -e "/CC/s:gcc:$(tc-getCC):g" \
115 -e "/GCC/s:g++:$(tc-getCXX):g" \
116 -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \
117 -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \
118 -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \
119 -e 's:-Wimplicit::g' \
120 -e "s|../../common/lib/linux/\$(OS_ARCH)/libGLEW.a|$(pkg-config --libs glew)|g" \
121 -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$(pkg-config --libs glew)|g" \
122 -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$(pkg-config --libs glew)|g" \
123 -i $(find . -type f -name "Makefile") || die
124
125 # -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \
126 find common/inc/GL -delete || die
127 find . -type f -name "*\.a" -delete || die
128
129 # sed corrupts the simpleMPI Makefile, resulting in a failed libstdc++ detection.
130 # Therefore we need this patch, if we don't wont to touch the sed command above.
131 epatch "${FILESDIR}"/${P}-simpleMPI.patch
132 }
133
134 src_compile() {
135 use examples || return
136 local myopts verbose="verbose=1"
137 use debug && myopts+=" dbg=1"
138 export FAKEROOTKEY=1 # Workaround sandbox issue in #462602
139 emake \
140 cuda-install="${EPREFIX}/opt/cuda" \
141 CUDA_PATH="${EPREFIX}/opt/cuda/" \
142 ${myopts} ${verbose}
143 }
144
145 src_test() {
146 local _dir _subdir
147
148 addwrite /dev/nvidiactl
149 addwrite /dev/nvidia0
150
151 for _dir in {0..9}*; do
152 pushd ${_dir} > /dev/null
153 for _subdir in *; do
154 emake -C ${_subdir} run
155 done
156 popd > /dev/null
157 done
158 }
159
160 src_install() {
161 local i j f t crap=""
162 if use doc; then
163 ebegin "Installing docs ..."
164 dodoc -r doc
165 dodoc *.txt */*.pdf
166 treecopy $(find -type f -name readme.txt) "${ED}"/usr/share/doc/${PF}/
167 eend
168 fi
169
170 crap+=" *.txt doc Samples.htm* */*.pdf"
171
172 ebegin "Cleaning before installation..."
173 for i in ${crap}; do
174 if [[ -e ${i} ]]; then
175 find ${i} -delete || die
176 fi
177 done
178 find -type f -name "*.o" -delete
179 find -type f -name "readme.txt" -delete
180 eend
181
182 ebegin "Moving files..."
183 for f in $(find .); do
184 local t="$(dirname ${f})"
185 if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then
186 continue
187 fi
188 if [[ ! -d ${f} ]]; then
189 if [[ -x ${f} ]]; then
190 exeinto /opt/cuda/sdk/${t}
191 doexe ${f}
192 else
193 insinto /opt/cuda/sdk/${t}
194 doins ${f}
195 fi
196 fi
197 done
198 eend
199 }