1 |
commit: 7f44fa3725a1166bce174561dda0a4e0fc61b50f |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 3 15:42:49 2018 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 3 16:44:52 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7f44fa37 |
7 |
|
8 |
eclass/intel-sdp: drop |
9 |
|
10 |
eclass/intel-sdp.eclass | 608 ------------------------------------------------ |
11 |
1 file changed, 608 deletions(-) |
12 |
|
13 |
diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass |
14 |
deleted file mode 100644 |
15 |
index b8825bea6..000000000 |
16 |
--- a/eclass/intel-sdp.eclass |
17 |
+++ /dev/null |
18 |
@@ -1,608 +0,0 @@ |
19 |
-# Copyright 1999-2017 Gentoo Foundation |
20 |
-# Distributed under the terms of the GNU General Public License v2 |
21 |
- |
22 |
-# @ECLASS: intel-sdp.eclass |
23 |
-# @MAINTAINER: |
24 |
-# Justin Lecher <jlec@g.o> |
25 |
-# Sci Team <sci@g.o> |
26 |
-# @BLURB: Handling of Intel's Software Development Products package management |
27 |
- |
28 |
-if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then |
29 |
- |
30 |
-case "${EAPI:-0}" in |
31 |
- 5) ;; |
32 |
- *) die "EAPI=${EAPI} is not supported" ;; |
33 |
-esac |
34 |
- |
35 |
-# @ECLASS-VARIABLE: INTEL_DID |
36 |
-# @DEFAULT_UNSET |
37 |
-# @DESCRIPTION: |
38 |
-# The package download ID from Intel. |
39 |
-# To find out its value, see the links to download in |
40 |
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx |
41 |
-# |
42 |
-# e.g. 2504 |
43 |
-# |
44 |
-# Must be defined before inheriting the eclass |
45 |
- |
46 |
-# @ECLASS-VARIABLE: INTEL_DPN |
47 |
-# @DEFAULT_UNSET |
48 |
-# @DESCRIPTION: |
49 |
-# The package name to download from Intel. |
50 |
-# To find out its value, see the links to download in |
51 |
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx |
52 |
-# |
53 |
-# e.g. parallel_studio_xe |
54 |
-# |
55 |
-# Must be defined before inheriting the eclass |
56 |
- |
57 |
-# @ECLASS-VARIABLE: INTEL_DPV |
58 |
-# @DEFAULT_UNSET |
59 |
-# @DESCRIPTION: |
60 |
-# The package download version from Intel. |
61 |
-# To find out its value, see the links to download in |
62 |
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx |
63 |
-# |
64 |
-# e.g. 2011_sp1_update2 |
65 |
-# |
66 |
-# Must be defined before inheriting the eclass |
67 |
- |
68 |
-# @ECLASS-VARIABLE: INTEL_TARX |
69 |
-# @DEFAULT_UNSET |
70 |
-# @DESCRIPTION: |
71 |
-# The package extention. |
72 |
-# To find out its value, see the links to download in |
73 |
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx |
74 |
-# |
75 |
-# e.g. tar.gz |
76 |
-# |
77 |
-# Must be defined before inheriting the eclass |
78 |
-: ${INTEL_TARX:=tgz} |
79 |
- |
80 |
-# @ECLASS-VARIABLE: INTEL_SUBDIR |
81 |
-# @DEFAULT_UNSET |
82 |
-# @DESCRIPTION: |
83 |
-# The package sub-directory where it will end-up in /opt/intel |
84 |
-# To find out its value, you have to do a raw install from the Intel tar ball |
85 |
- |
86 |
-# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE |
87 |
-# @DEFAULT_UNSET |
88 |
-# @DESCRIPTION: |
89 |
-# Possibility to skip the mandatory check for licenses. Only set this if there |
90 |
-# is really no fix. |
91 |
- |
92 |
-# @ECLASS-VARIABLE: INTEL_RPMS_DIR |
93 |
-# @DESCRIPTION: |
94 |
-# Main subdirectory which contains the rpms to extract. |
95 |
-: ${INTEL_RPMS_DIR:=rpm} |
96 |
- |
97 |
-# @ECLASS-VARIABLE: INTEL_X86 |
98 |
-# @DESCRIPTION: |
99 |
-# 32bit arch in rpm names |
100 |
-# |
101 |
-# e.g. i484 |
102 |
-: ${INTEL_X86:=i486} |
103 |
- |
104 |
-# @ECLASS-VARIABLE: INTEL_BIN_RPMS |
105 |
-# @DESCRIPTION: |
106 |
-# Functional name of rpm without any version/arch tag |
107 |
-# |
108 |
-# e.g. compilerprof |
109 |
-# |
110 |
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can |
111 |
-# specify the full path |
112 |
-# |
113 |
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli |
114 |
-: ${INTEL_BIN_RPMS:=""} |
115 |
- |
116 |
-# @ECLASS-VARIABLE: INTEL_AMD64_RPMS |
117 |
-# @DESCRIPTION: |
118 |
-# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS |
119 |
-: ${INTEL_AMD64_RPMS:=""} |
120 |
- |
121 |
-# @ECLASS-VARIABLE: INTEL_X86_RPMS |
122 |
-# @DESCRIPTION: |
123 |
-# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS |
124 |
-: ${INTEL_X86_RPMS:=""} |
125 |
- |
126 |
-# @ECLASS-VARIABLE: INTEL_DAT_RPMS |
127 |
-# @DESCRIPTION: |
128 |
-# Functional name of rpm of common data which are arch free |
129 |
-# without any version tag |
130 |
-# |
131 |
-# e.g. openmp |
132 |
-# |
133 |
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can |
134 |
-# specify the full path |
135 |
-# |
136 |
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common |
137 |
-: ${INTEL_DAT_RPMS:=""} |
138 |
- |
139 |
-# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH |
140 |
-# @DESCRIPTION: |
141 |
-# Unset, if only the multilib package will be provided by intel |
142 |
-: ${INTEL_SINGLE_ARCH:=true} |
143 |
- |
144 |
-# @ECLASS-VARIABLE: INTEL_SDP_DB |
145 |
-# @DESCRIPTION: |
146 |
-# Full path to intel registry db |
147 |
-INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db |
148 |
- |
149 |
-MULTILIB_COMPAT=( abi_x86_{32,64} ) |
150 |
- |
151 |
-inherit check-reqs eutils multilib-build versionator |
152 |
- |
153 |
-_INTEL_PV1=$(get_version_component_range 1) |
154 |
-_INTEL_PV2=$(get_version_component_range 2) |
155 |
-_INTEL_PV3=$(get_version_component_range 3) |
156 |
-_INTEL_PV4=$(get_version_component_range 4) |
157 |
-_INTEL_PV="" |
158 |
-[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-" |
159 |
-[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}" |
160 |
-[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}" |
161 |
-[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+="-${_INTEL_PV3}" |
162 |
- |
163 |
-_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}" |
164 |
- |
165 |
-if [ ${INTEL_SINGLE_ARCH} == true ]; then |
166 |
- SRC_URI=" |
167 |
- abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} ) |
168 |
- abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )" |
169 |
-else |
170 |
- SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}" |
171 |
-fi |
172 |
- |
173 |
-LICENSE="Intel-SDP" |
174 |
-# Future work, #394411 |
175 |
-#SLOT="${_INTEL_PV1}.${_INTEL_PV2}" |
176 |
-SLOT="0" |
177 |
-IUSE="examples" |
178 |
- |
179 |
-RESTRICT="mirror" |
180 |
- |
181 |
-RDEPEND="" |
182 |
-DEPEND="app-arch/rpm2targz" |
183 |
- |
184 |
-_INTEL_SDP_YEAR=${INTEL_DPV} |
185 |
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*} |
186 |
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*} |
187 |
- |
188 |
-# @ECLASS-VARIABLE: INTEL_SDP_DIR |
189 |
-# @DESCRIPTION: |
190 |
-# Full rootless path to installation dir |
191 |
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}" |
192 |
-[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}" |
193 |
-[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}" |
194 |
- |
195 |
-# @ECLASS-VARIABLE: INTEL_SDP_EDIR |
196 |
-# @DEFAULT_UNSET |
197 |
-# @DESCRIPTION: |
198 |
-# Full rooted path to installation dir |
199 |
-INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}" |
200 |
- |
201 |
-S="${WORKDIR}" |
202 |
- |
203 |
-QA_PREBUILT="${INTEL_SDP_DIR}/*" |
204 |
- |
205 |
-# @ECLASS-VARIABLE: INTEL_ARCH |
206 |
-# @DEFAULT_UNSET |
207 |
-# @DESCRIPTION: |
208 |
-# Intels internal names of the arches; will be set at runtime accordingly |
209 |
-# |
210 |
-# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32" |
211 |
- |
212 |
-# @FUNCTION: _isdp_link_eclipse_plugins |
213 |
-# @INTERNAL |
214 |
-# @DESCRIPTION: |
215 |
-# Creating necessary links to use intel compiler with eclipse |
216 |
-_isdp_link_eclipse_plugins() { |
217 |
- debug-print-function ${FUNCNAME} "${@}" |
218 |
- |
219 |
- local c f |
220 |
- pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die |
221 |
- for c in cdt*; do |
222 |
- local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1)) |
223 |
- if has_version "dev-util/eclipse-sdk:${ev}"; then |
224 |
- einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})" |
225 |
- for f in cdt${cv}/eclipse/features/*; do |
226 |
- dodir /usr/$(get_libdir)/eclipse-${ev}/features |
227 |
- dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \ |
228 |
- /usr/$(get_libdir)/eclipse-${ev}/features/ || die |
229 |
- done |
230 |
- for f in cdt${cv}/eclipse/plugins/*; do |
231 |
- dodir /usr/$(get_libdir)/eclipse-${ev}/plugins |
232 |
- dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \ |
233 |
- /usr/$(get_libdir)/eclipse-${ev}/plugins/ || die |
234 |
- done |
235 |
- fi |
236 |
- done |
237 |
- popd > /dev/null || die |
238 |
-} |
239 |
- |
240 |
-# @FUNCTION: _isdp_big-warning |
241 |
-# @USAGE: [pre-check | test-failed] |
242 |
-# @INTERNAL |
243 |
-# @DESCRIPTION: |
244 |
-# warn user that we really require a license |
245 |
-_isdp_big-warning() { |
246 |
- debug-print-function ${FUNCNAME} "${@}" |
247 |
- |
248 |
- case ${1} in |
249 |
- pre-check ) |
250 |
- echo "" |
251 |
- ewarn "License file not found!" |
252 |
- ;; |
253 |
- |
254 |
- test-failed ) |
255 |
- echo |
256 |
- ewarn "Function test failed. Most probably due to an invalid license." |
257 |
- ewarn "This means you already tried to bypass the license check once." |
258 |
- ;; |
259 |
- esac |
260 |
- |
261 |
- echo "" |
262 |
- ewarn "Make sure you have received an Intel license." |
263 |
- ewarn "To receive a non-commercial license, you need to register at:" |
264 |
- ewarn "https://software.intel.com/en-us/qualify-for-free-software" |
265 |
- ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/" |
266 |
- |
267 |
- case ${1} in |
268 |
- pre-check ) |
269 |
- ewarn "before proceeding with installation of ${P}" |
270 |
- echo "" |
271 |
- ;; |
272 |
- * ) |
273 |
- echo "" |
274 |
- ;; |
275 |
- esac |
276 |
-} |
277 |
- |
278 |
-# @FUNCTION: _isdp_version_test |
279 |
-# @INTERNAL |
280 |
-# @DESCRIPTION: |
281 |
-# Testing for valid license by asking for version information of the compiler |
282 |
-_isdp_version_test() { |
283 |
- debug-print-function ${FUNCNAME} "${@}" |
284 |
- |
285 |
- local comp comp_full arch warn |
286 |
- case ${PN} in |
287 |
- ifc ) |
288 |
- debug-print "Testing ifort" |
289 |
- comp=ifort |
290 |
- ;; |
291 |
- icc ) |
292 |
- debug-print "Testing icc" |
293 |
- comp=icc |
294 |
- ;; |
295 |
- *) |
296 |
- die "${PN} is not supported for testing" |
297 |
- ;; |
298 |
- esac |
299 |
- |
300 |
- for arch in ${INTEL_ARCH}; do |
301 |
- case ${EBUILD_PHASE} in |
302 |
- install ) |
303 |
- comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}" |
304 |
- ;; |
305 |
- postinst ) |
306 |
- comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}" |
307 |
- ;; |
308 |
- * ) |
309 |
- ewarn "Compile test not supported in ${EBUILD_PHASE}" |
310 |
- continue |
311 |
- ;; |
312 |
- esac |
313 |
- |
314 |
- debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V" |
315 |
- |
316 |
- LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null |
317 |
- [[ $? -ne 0 ]] && warn=yes |
318 |
- done |
319 |
- [[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed |
320 |
-} |
321 |
- |
322 |
-# @FUNCTION: _isdp_run-test |
323 |
-# @INTERNAL |
324 |
-# Test if installed compiler is working |
325 |
-_isdp_run-test() { |
326 |
- debug-print-function ${FUNCNAME} "${@}" |
327 |
- |
328 |
- if [[ -z ${INTEL_SKIP_LICENSE} ]]; then |
329 |
- case ${PN} in |
330 |
- ifc | icc ) |
331 |
- _isdp_version_test ;; |
332 |
- * ) |
333 |
- debug-print "No test available for ${PN}" |
334 |
- ;; |
335 |
- esac |
336 |
- fi |
337 |
-} |
338 |
- |
339 |
-# @FUNCTION: convert2intel_arch |
340 |
-# @USAGE: <arch> |
341 |
-# @DESCRIPTION: |
342 |
-# Convert between portage arch (e.g. amd64, x86) and intel arch |
343 |
-# nomenclature (e.g. intel64, ia32) |
344 |
-convert2intel_arch() { |
345 |
- debug-print-function ${FUNCNAME} "${@}" |
346 |
- |
347 |
- case $1 in |
348 |
- amd64|abi_x86_64|*amd64*) |
349 |
- echo "intel64" |
350 |
- ;; |
351 |
- x86|abi_x86_32|*x86*) |
352 |
- echo "ia32" |
353 |
- ;; |
354 |
- *) |
355 |
- die "Abi \'$1\' is unsupported" |
356 |
- ;; |
357 |
- esac |
358 |
-} |
359 |
- |
360 |
-# @FUNCTION: intel-sdp-r1_pkg_pretend |
361 |
-# @DESCRIPTION: |
362 |
-# @CODE |
363 |
-# * Check that the user has a (valid) license file before going on. |
364 |
-# * Check for space requirements being fullfilled |
365 |
-# @CODE |
366 |
-intel-sdp_pkg_pretend() { |
367 |
- debug-print-function ${FUNCNAME} "${@}" |
368 |
- |
369 |
- local warn=1 dir dirs ret arch a p |
370 |
- |
371 |
- : ${CHECKREQS_DISK_BUILD:=256M} |
372 |
- check-reqs_pkg_pretend |
373 |
- |
374 |
- if [[ -z ${INTEL_SKIP_LICENSE} ]]; then |
375 |
- if echo ${INTEL_LICENSE_FILE} | grep -q @; then |
376 |
- einfo "Looks like you are using following license server:" |
377 |
- einfo " ${INTEL_LICENSE_FILE}" |
378 |
- return 0 |
379 |
- fi |
380 |
- |
381 |
- dirs=( |
382 |
- "${INTEL_SDP_EDIR}/licenses" |
383 |
- "${INTEL_SDP_EDIR}/Licenses" |
384 |
- "${EPREFIX}/opt/intel/licenses" |
385 |
- ) |
386 |
- for dir in "${dirs[@]}" ; do |
387 |
- ebegin "Checking for a license in: ${dir}" |
388 |
- #maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]] |
389 |
- [[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$? |
390 |
- eend ${ret} |
391 |
- if [[ ${ret} == "0" ]]; then |
392 |
- warn=${ret} |
393 |
- break |
394 |
- fi |
395 |
- done |
396 |
- if [[ ${warn} == "1" ]]; then |
397 |
- _isdp_big-warning pre-check |
398 |
- die "Could not find license file" |
399 |
- fi |
400 |
- else |
401 |
- eqawarn "The ebuild doesn't check for presents of a proper intel license!" |
402 |
- eqawarn "This shouldn't be done unless there is a serious reason." |
403 |
- fi |
404 |
-} |
405 |
- |
406 |
-# @FUNCTION: intel-sdp_pkg_setup |
407 |
-# @DESCRIPTION: |
408 |
-# Setting up and sorting some internal variables |
409 |
-intel-sdp_pkg_setup() { |
410 |
- debug-print-function ${FUNCNAME} "${@}" |
411 |
- local arch a p |
412 |
- |
413 |
- INTEL_ARCH="" |
414 |
- |
415 |
- if use abi_x86_64; then |
416 |
- arch+=" x86_64" |
417 |
- INTEL_ARCH+=" intel64" |
418 |
- fi |
419 |
- if use abi_x86_32; then |
420 |
- arch+=" ${INTEL_X86}" |
421 |
- INTEL_ARCH+=" ia32" |
422 |
- fi |
423 |
- INTEL_RPMS=() |
424 |
- INTEL_RPMS_FULL=() |
425 |
- if [[ $(declare -p INTEL_BIN_RPMS) = "declare -a "* ]] ; then |
426 |
- _INTEL_BIN_RPMS=( ${INTEL_BIN_RPMS[@]} ) |
427 |
- else |
428 |
- read -r -d '' -a _INTEL_BIN_RPMS <<<"${INTEL_BIN_RPMS}" |
429 |
- fi |
430 |
- for p in "${_INTEL_BIN_RPMS[@]}"; do |
431 |
- for a in ${arch}; do |
432 |
- if [ ${p} == $(basename ${p}) ]; then |
433 |
- INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm ) |
434 |
- else |
435 |
- INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm ) |
436 |
- fi |
437 |
- done |
438 |
- done |
439 |
- if use amd64; then |
440 |
- if [[ $(declare -p INTEL_AMD64_RPMS) = "declare -a "* ]] ; then |
441 |
- _INTEL_AMD64_RPMS=( ${INTEL_AMD64_RPMS[@]} ) |
442 |
- else |
443 |
- read -r -d '' -a _INTEL_AMD64_RPMS <<<"${INTEL_AMD64_RPMS}" |
444 |
- fi |
445 |
- for p in "${_INTEL_AMD64_RPMS[@]}"; do |
446 |
- if [ ${p} == $(basename ${p}) ]; then |
447 |
- INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm ) |
448 |
- else |
449 |
- INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm ) |
450 |
- fi |
451 |
- |
452 |
- done |
453 |
- fi |
454 |
- if [[ $(declare -p INTEL_X86_RPMS) = "declare -a "* ]] ; then |
455 |
- _INTEL_X86_RPMS=( ${INTEL_X86_RPMS[@]} ) |
456 |
- else |
457 |
- read -r -d '' -a _INTEL_X86_RPMS <<<"${INTEL_X86_RPMS}" |
458 |
- fi |
459 |
- for p in "${_INTEL_X86_RPMS[@]}"; do |
460 |
- if [ ${p} == $(basename ${p}) ]; then |
461 |
- INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm ) |
462 |
- else |
463 |
- INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm ) |
464 |
- fi |
465 |
- done |
466 |
- if [[ $(declare -p INTEL_DAT_RPMS) = "declare -a "* ]] ; then |
467 |
- _INTEL_DAT_RPMS=( ${INTEL_DAT_RPMS[@]} ) |
468 |
- else |
469 |
- read -r -d '' -a _INTEL_DAT_RPMS <<<"${INTEL_DAT_RPMS}" |
470 |
- fi |
471 |
- for p in "${_INTEL_DAT_RPMS[@]}"; do |
472 |
- if [ ${p} == $(basename ${p}) ]; then |
473 |
- INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm ) |
474 |
- else |
475 |
- INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm ) |
476 |
- fi |
477 |
- done |
478 |
-} |
479 |
- |
480 |
-# @FUNCTION: intel-sdp_src_unpack |
481 |
-# @DESCRIPTION: |
482 |
-# Unpacking necessary rpms from tarball, extract them and rearrange the output. |
483 |
-intel-sdp_src_unpack() { |
484 |
- local l r subdir rb t list=() debug_list |
485 |
- |
486 |
- for t in ${A}; do |
487 |
- for r in "${INTEL_RPMS[@]}"; do |
488 |
- rpmdir=${t%%.*}/${INTEL_RPMS_DIR} |
489 |
- list+=( ${rpmdir}/${r} ) |
490 |
- done |
491 |
- |
492 |
- for r in "${INTEL_RPMS_FULL[@]}"; do |
493 |
- list+=( ${t%%.*}/${r} ) |
494 |
- done |
495 |
- |
496 |
- debug_list="$(IFS=$'\n'; echo ${list[@]} )" |
497 |
- |
498 |
- debug-print "Adding to decompression list:" |
499 |
- debug-print ${debug_list} |
500 |
- |
501 |
- tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log |
502 |
- |
503 |
- for r in ${list[@]}; do |
504 |
- rb=$(basename ${r}) |
505 |
- l=.${rb}_$(date +'%d%m%y_%H%M%S').log |
506 |
- einfo "Unpacking ${rb}" |
507 |
- rpm2tar -O ${r} | tar xvf - | sed -e \ |
508 |
- "s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed" |
509 |
- mv ${l} opt/intel/ || die "failed moving extract log file" |
510 |
- done |
511 |
- done |
512 |
- |
513 |
- mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed" |
514 |
-} |
515 |
- |
516 |
-# @FUNCTION: intel-sdp_src_install |
517 |
-# @DESCRIPTION: |
518 |
-# Install everything |
519 |
-intel-sdp_src_install() { |
520 |
- debug-print-function ${FUNCNAME} "${@}" |
521 |
- |
522 |
- if path_exists "${INTEL_SDP_DIR}"/uninstall*; then |
523 |
- ebegin "Cleaning out uninstall information" |
524 |
- find "${INTEL_SDP_DIR}"/uninstall* -delete || die |
525 |
- eend |
526 |
- fi |
527 |
- |
528 |
- if path_exists "${INTEL_SDP_DIR}"/Documentation; then |
529 |
- dodoc -r "${INTEL_SDP_DIR}"/Documentation/* |
530 |
- |
531 |
- ebegin "Cleaning out documentation" |
532 |
- find "${INTEL_SDP_DIR}"/Documentation -delete || die |
533 |
- eend |
534 |
- fi |
535 |
- |
536 |
- if path_exists "${INTEL_SDP_DIR}"/Samples; then |
537 |
- if use examples ; then |
538 |
- insinto /usr/share/${P}/examples/ |
539 |
- doins -r "${INTEL_SDP_DIR}"/Samples/* |
540 |
- fi |
541 |
- ebegin "Cleaning out examples" |
542 |
- find "${INTEL_SDP_DIR}"/Samples -delete || die |
543 |
- eend |
544 |
- fi |
545 |
- |
546 |
- if path_exists "${INTEL_SDP_DIR}"/eclipse_support; then |
547 |
- if has eclipse ${IUSE} && use eclipse; then |
548 |
- _isdp_link_eclipse_plugins |
549 |
- else |
550 |
- ebegin "Cleaning out eclipse plugin" |
551 |
- find "${INTEL_SDP_DIR}"/eclipse_support -delete || die |
552 |
- eend |
553 |
- fi |
554 |
- fi |
555 |
- |
556 |
- if path_exists "${INTEL_SDP_DIR}"/man; then |
557 |
- path_exists "${INTEL_SDP_DIR}"/man/en_US/man1/* && \ |
558 |
- doman "${INTEL_SDP_DIR}"/man/en_US/man1/* |
559 |
- path_exists "${INTEL_SDP_DIR}"/man/man1/* && \ |
560 |
- doman "${INTEL_SDP_DIR}"/man/man1/* |
561 |
- has linguas_ja ${IUSE} && use linguas_ja && \ |
562 |
- doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/* |
563 |
- |
564 |
- find "${INTEL_SDP_DIR}"/man -delete || die |
565 |
- fi |
566 |
- |
567 |
- ebegin "Tagging ${PN}" |
568 |
- find opt -name \*sh -type f -exec sed -i \ |
569 |
- -e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \ |
570 |
- '{}' + || die |
571 |
- eend |
572 |
- |
573 |
- [[ -d "${ED}" ]] || dodir / |
574 |
- mv opt "${ED}"/ || die "moving files failed" |
575 |
- |
576 |
- dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm |
577 |
- keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm |
578 |
-} |
579 |
- |
580 |
-# @FUNCTION: intel-sdp_pkg_postinst |
581 |
-# @DESCRIPTION: |
582 |
-# Add things to intel database |
583 |
-intel-sdp_pkg_postinst() { |
584 |
- debug-print-function ${FUNCNAME} "${@}" |
585 |
- |
586 |
- # add product registry to intel "database" |
587 |
- local l r |
588 |
- for r in ${INTEL_RPMS}; do |
589 |
- l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)" |
590 |
- echo >> ${INTEL_SDP_DB} \ |
591 |
- "<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>" |
592 |
- done |
593 |
- _isdp_run-test |
594 |
- |
595 |
- if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" ; then |
596 |
- #add ccache links as icc might get installed after ccache |
597 |
- "${EROOT}"/usr/bin/ccache-config --install-links |
598 |
- fi |
599 |
-} |
600 |
- |
601 |
-# @FUNCTION: intel-sdp_pkg_postrm |
602 |
-# @DESCRIPTION: |
603 |
-# Sanitize intel database |
604 |
-intel-sdp_pkg_postrm() { |
605 |
- debug-print-function ${FUNCNAME} "${@}" |
606 |
- |
607 |
- # remove from intel "database" |
608 |
- if [[ -e ${INTEL_SDP_DB} ]]; then |
609 |
- local r |
610 |
- for r in ${INTEL_RPMS}; do |
611 |
- sed -i \ |
612 |
- -e "/${r}/d" \ |
613 |
- ${INTEL_SDP_DB} |
614 |
- done |
615 |
- fi |
616 |
- |
617 |
- if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then |
618 |
- # --remove-links would remove all links, --install-links updates them |
619 |
- "${EROOT}"/usr/bin/ccache-config --install-links |
620 |
- fi |
621 |
-} |
622 |
- |
623 |
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend |
624 |
- |
625 |
-_INTEL_SDP_ECLASS_=1 |
626 |
-fi |