1 |
commit: 50d9353a6267a04df6b92093dccb59a741b71e33 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 27 15:20:36 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 27 15:20:36 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=50d9353a |
7 |
|
8 |
intel-sdp.eclass: Update |
9 |
|
10 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
11 |
|
12 |
eclass/intel-sdp.eclass | 85 +++++++++++++++++++++++++++++++++++++------------ |
13 |
1 file changed, 64 insertions(+), 21 deletions(-) |
14 |
|
15 |
diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass |
16 |
index 95e711f..d805a6a 100644 |
17 |
--- a/eclass/intel-sdp.eclass |
18 |
+++ b/eclass/intel-sdp.eclass |
19 |
@@ -8,6 +8,13 @@ |
20 |
# Sci Team <sci@g.o> |
21 |
# @BLURB: Handling of Intel's Software Development Products package management |
22 |
|
23 |
+if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then |
24 |
+ |
25 |
+case "${EAPI:-0}" in |
26 |
+ 5) ;; |
27 |
+ *) die "EAPI=${EAPI} is not supported" ;; |
28 |
+esac |
29 |
+ |
30 |
# @ECLASS-VARIABLE: INTEL_DID |
31 |
# @DEFAULT_UNSET |
32 |
# @DESCRIPTION: |
33 |
@@ -122,7 +129,9 @@ |
34 |
# Full path to intel registry db |
35 |
INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db |
36 |
|
37 |
-inherit check-reqs eutils multilib versionator |
38 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
39 |
+ |
40 |
+inherit check-reqs eutils multilib-build versionator |
41 |
|
42 |
_INTEL_PV1=$(get_version_component_range 1) |
43 |
_INTEL_PV2=$(get_version_component_range 2) |
44 |
@@ -138,9 +147,8 @@ _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${ |
45 |
|
46 |
if [ ${INTEL_SINGLE_ARCH} == true ]; then |
47 |
SRC_URI=" |
48 |
- amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) ) |
49 |
- amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) ) |
50 |
- x86? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )" |
51 |
+ abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} ) |
52 |
+ abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )" |
53 |
else |
54 |
SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}" |
55 |
fi |
56 |
@@ -149,7 +157,7 @@ LICENSE="Intel-SDP" |
57 |
# Future work, #394411 |
58 |
#SLOT="${_INTEL_PV1}.${_INTEL_PV2}" |
59 |
SLOT="0" |
60 |
-IUSE="examples multilib" |
61 |
+IUSE="examples" |
62 |
|
63 |
RESTRICT="mirror" |
64 |
|
65 |
@@ -189,6 +197,8 @@ QA_PREBUILT="${INTEL_SDP_DIR}/*" |
66 |
# @DESCRIPTION: |
67 |
# Creating necessary links to use intel compiler with eclipse |
68 |
_isdp_link_eclipse_plugins() { |
69 |
+ debug-print-function ${FUNCNAME} "${@}" |
70 |
+ |
71 |
local c f |
72 |
pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die |
73 |
for c in cdt*; do |
74 |
@@ -216,6 +226,8 @@ _isdp_link_eclipse_plugins() { |
75 |
# @DESCRIPTION: |
76 |
# warn user that we really require a license |
77 |
_isdp_big-warning() { |
78 |
+ debug-print-function ${FUNCNAME} "${@}" |
79 |
+ |
80 |
case ${1} in |
81 |
pre-check ) |
82 |
echo "" |
83 |
@@ -251,6 +263,8 @@ _isdp_big-warning() { |
84 |
# @DESCRIPTION: |
85 |
# Testing for valid license by asking for version information of the compiler |
86 |
_isdp_version_test() { |
87 |
+ debug-print-function ${FUNCNAME} "${@}" |
88 |
+ |
89 |
local comp comp_full arch warn |
90 |
case ${PN} in |
91 |
ifc ) |
92 |
@@ -292,6 +306,8 @@ _isdp_version_test() { |
93 |
# @INTERNAL |
94 |
# Test if installed compiler is working |
95 |
_isdp_run-test() { |
96 |
+ debug-print-function ${FUNCNAME} "${@}" |
97 |
+ |
98 |
if [[ -z ${INTEL_SKIP_LICENSE} ]]; then |
99 |
case ${PN} in |
100 |
ifc | icc ) |
101 |
@@ -303,13 +319,36 @@ _isdp_run-test() { |
102 |
fi |
103 |
} |
104 |
|
105 |
-# @FUNCTION: intel-sdp_pkg_pretend |
106 |
+# @FUNCTION: convert2intel_arch |
107 |
+# @USAGE: <arch> |
108 |
+# @DESCRIPTION: |
109 |
+# Convert between portage arch (e.g. amd64, x86) and intel arch |
110 |
+# nomenclature (e.g. intel64, ia32) |
111 |
+convert2intel_arch() { |
112 |
+ debug-print-function ${FUNCNAME} "${@}" |
113 |
+ |
114 |
+ case $1 in |
115 |
+ amd64|abi_x86_64|*amd64*) |
116 |
+ echo "intel64" |
117 |
+ ;; |
118 |
+ x86|abi_x86_32|*x86*) |
119 |
+ echo "ia32" |
120 |
+ ;; |
121 |
+ *) |
122 |
+ die "Abi \'$1\' is unsupported" |
123 |
+ ;; |
124 |
+ esac |
125 |
+} |
126 |
+ |
127 |
+# @FUNCTION: intel-sdp-r1_pkg_pretend |
128 |
# @DESCRIPTION: |
129 |
# @CODE |
130 |
# * Check that the user has a (valid) license file before going on. |
131 |
# * Check for space requirements being fullfilled |
132 |
# @CODE |
133 |
intel-sdp_pkg_pretend() { |
134 |
+ debug-print-function ${FUNCNAME} "${@}" |
135 |
+ |
136 |
local warn=1 dir dirs ret arch a p |
137 |
|
138 |
: ${CHECKREQS_DISK_BUILD:=256M} |
139 |
@@ -351,18 +390,18 @@ intel-sdp_pkg_pretend() { |
140 |
# @DESCRIPTION: |
141 |
# Setting up and sorting some internal variables |
142 |
intel-sdp_pkg_setup() { |
143 |
+ debug-print-function ${FUNCNAME} "${@}" |
144 |
local arch a p |
145 |
|
146 |
- if use x86; then |
147 |
- arch=${INTEL_X86} |
148 |
- INTEL_ARCH="ia32" |
149 |
- elif use amd64; then |
150 |
- arch=x86_64 |
151 |
- INTEL_ARCH="intel64" |
152 |
- if has_multilib_profile; then |
153 |
- arch="x86_64 ${INTEL_X86}" |
154 |
- INTEL_ARCH="intel64 ia32" |
155 |
- fi |
156 |
+ INTEL_ARCH="" |
157 |
+ |
158 |
+ if use abi_x86_64; then |
159 |
+ arch+=" x86_64" |
160 |
+ INTEL_ARCH+=" intel64" |
161 |
+ fi |
162 |
+ if use abi_x86_32; then |
163 |
+ arch+=" ${INTEL_X86}" |
164 |
+ INTEL_ARCH+=" ia32" |
165 |
fi |
166 |
INTEL_RPMS=() |
167 |
INTEL_RPMS_FULL=() |
168 |
@@ -461,6 +500,8 @@ intel-sdp_src_unpack() { |
169 |
# @DESCRIPTION: |
170 |
# Install everything |
171 |
intel-sdp_src_install() { |
172 |
+ debug-print-function ${FUNCNAME} "${@}" |
173 |
+ |
174 |
if path_exists "${INTEL_SDP_DIR}"/uninstall*; then |
175 |
ebegin "Cleaning out uninstall information" |
176 |
find "${INTEL_SDP_DIR}"/uninstall* -delete || die |
177 |
@@ -523,6 +564,8 @@ intel-sdp_src_install() { |
178 |
# @DESCRIPTION: |
179 |
# Add things to intel database |
180 |
intel-sdp_pkg_postinst() { |
181 |
+ debug-print-function ${FUNCNAME} "${@}" |
182 |
+ |
183 |
# add product registry to intel "database" |
184 |
local l r |
185 |
for r in ${INTEL_RPMS}; do |
186 |
@@ -542,6 +585,8 @@ intel-sdp_pkg_postinst() { |
187 |
# @DESCRIPTION: |
188 |
# Sanitize intel database |
189 |
intel-sdp_pkg_postrm() { |
190 |
+ debug-print-function ${FUNCNAME} "${@}" |
191 |
+ |
192 |
# remove from intel "database" |
193 |
if [[ -e ${INTEL_SDP_DB} ]]; then |
194 |
local r |
195 |
@@ -559,8 +604,6 @@ intel-sdp_pkg_postrm() { |
196 |
} |
197 |
|
198 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend |
199 |
-case "${EAPI:-0}" in |
200 |
- 0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;; |
201 |
- 4|5) ;; |
202 |
- *) die "EAPI=${EAPI} is not supported" ;; |
203 |
-esac |
204 |
+ |
205 |
+_INTEL_SDP_ECLASS_=1 |
206 |
+fi |