Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: eclass/
Date: Tue, 03 Apr 2018 16:45:03
Message-Id: 1522773890.04a32e493c6158eb55aba6593852eb1ec2eae6d3.tamiko@gentoo
1 commit: 04a32e493c6158eb55aba6593852eb1ec2eae6d3
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 3 15:31:41 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 3 16:44:50 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=04a32e49
7
8 eclass/intel-sdp-r1: Maintenance
9
10 * remove IUSE l10n_ja
11
12 * remove obsolete information
13
14 * remove rpm automagic expansion: Intel changes naming and versioning
15 convention with every release. Let's just give up and specify the
16 full rpm file name in the ebuilds.
17
18 eclass/intel-sdp-r1.eclass | 133 +++++++++------------------------------------
19 1 file changed, 25 insertions(+), 108 deletions(-)
20
21 diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
22 index 6b4e0fa2a..e6d8f3ee7 100644
23 --- a/eclass/intel-sdp-r1.eclass
24 +++ b/eclass/intel-sdp-r1.eclass
25 @@ -21,17 +21,6 @@ case "${EAPI}" in
26 *) die "EAPI=${EAPI} is not supported" ;;
27 esac
28
29 -# @ECLASS-VARIABLE: INTEL_DIST_SKU
30 -# @DEFAULT_UNSET
31 -# @DESCRIPTION:
32 -# The package download ID from Intel.
33 -# To determine its value, see the links to download in
34 -# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
35 -#
36 -# e.g. 8365
37 -#
38 -# Must be defined before inheriting the eclass.
39 -
40 # @ECLASS-VARIABLE: INTEL_DIST_NAME
41 # @DESCRIPTION:
42 # The package name to download from Intel.
43 @@ -85,13 +74,6 @@ esac
44 # Main subdirectory which contains the rpms to extract.
45 : ${INTEL_RPMS_DIR:=rpm}
46
47 -# @ECLASS-VARIABLE: INTEL_X86
48 -# @DESCRIPTION:
49 -# 32bit arch in rpm names
50 -#
51 -# e.g. i486
52 -: ${INTEL_X86:=i486}
53 -
54 # @ECLASS-VARIABLE: INTEL_DIST_BIN_RPMS
55 # @DESCRIPTION:
56 # Functional name of rpm without any version/arch tag.
57 @@ -136,23 +118,6 @@ esac
58 # the combined tarball.
59 : ${INTEL_DIST_SPLIT_ARCH:=false}
60
61 -# @FUNCTION: _isdp_get-sdp-full-pv
62 -# @INTERNAL
63 -# @DESCRIPTION:
64 -# Gets the full internal Intel version specifier.
65 -_isdp_get-sdp-full-pv() {
66 - local _intel_pv=($(get_version_components))
67 - case ${#_intel_pv[@]} in
68 - 3)
69 - local _intel_pv_full="${_intel_pv[0]}.${_intel_pv[1]}-${_intel_pv[2]}"
70 - ;;
71 - 4)
72 - local _intel_pv_full="${_intel_pv[3]}-${_intel_pv[0]}.${_intel_pv[1]}.${_intel_pv[2]}-${_intel_pv[3]}"
73 - ;;
74 - esac
75 - echo "${_intel_pv_full}"
76 -}
77 -
78 # @FUNCTION: _isdp_get-sdp-year
79 # @INTERNAL
80 # @DESCRIPTION:
81 @@ -170,8 +135,9 @@ _isdp_get-sdp-year() {
82 # Gets the full rootless path to the installation directory
83 #
84 # e.g. opt/intel/compilers_and_libraries_2016.1.150
85 +# opt/intel/vtune_amplifier_2018.2.0.551022
86 isdp_get-sdp-dir() {
87 - local _intel_sdp_dir="opt/intel/${INTEL_SUBDIR}_$(_isdp_get-sdp-year).$(get_version_component_range 3-4)"
88 + local _intel_sdp_dir="opt/intel/${INTEL_SUBDIR}_$(_isdp_get-sdp-year).$(get_version_component_range 3-)"
89 echo "${_intel_sdp_dir}"
90 }
91
92 @@ -185,22 +151,13 @@ isdp_get-sdp-edir() {
93 echo "${_intel_sdp_edir}"
94 }
95
96 -_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DIST_SKU}/${INTEL_DIST_NAME}"
97 -if [[ "${INTEL_DIST_SPLIT_ARCH}" != true ]]; then
98 - SRC_URI="${_INTEL_URI}_${INTEL_DIST_PV}.${INTEL_DIST_TARX}"
99 -else
100 - SRC_URI="
101 - abi_x86_32? ( ${_INTEL_URI}_${INTEL_DIST_PV}_ia32.${INTEL_DIST_TARX} )
102 - abi_x86_64? ( ${_INTEL_URI}_${INTEL_DIST_PV}_intel64.${INTEL_DIST_TARX} )"
103 -fi
104 -unset _INTEL_URI
105 -
106 +SRC_URI="${INTEL_DIST_NAME}_${INTEL_DIST_PV}.${INTEL_DIST_TARX}"
107 LICENSE="Intel-SDP"
108 # TODO: Proper slotting
109 # Future work, #394411
110 SLOT="0"
111
112 -RESTRICT="mirror"
113 +RESTRICT="mirror fetch"
114
115 RDEPEND=""
116 DEPEND="app-arch/rpm2targz"
117 @@ -252,78 +209,41 @@ isdp_get-sdp-installed-arches() {
118 echo "${arch[*]}"
119 }
120
121 -# @FUNCTION: _isdp_get-sdp-source-rpm-arches
122 -# @INTERNAL
123 -# @DESCRIPTION:
124 -# Returns a space separated list of the arch suffixes used in the RPM filenames, e.g.
125 -#
126 -# intel-openmp-l-all-150-16.0.1-150.i486.rpm
127 -# intel-openmp-l-all-150-16.0.1-150.x86_64.rpm
128 -#
129 -# the result would consist of "i486 x86_64".
130 -_isdp_get-sdp-source-rpm-arches() {
131 - local arch=()
132 - use abi_x86_64 && arch+=("x86_64")
133 - use abi_x86_32 && arch+=("${INTEL_X86}")
134 - echo "${arch[*]}"
135 -}
136 -
137 # @FUNCTION: _isdp_generate-list-install-rpms
138 # @INTERNAL
139 # @DESCRIPTION:
140 # Generates the list of fully expanded RPMs to be extracted.
141 _isdp_generate-list-install-rpms() {
142 - debug-print-function ${FUNCNAME} "${@}"
143 + debug-print-function ${FUNCNAME} "${@}"
144
145 # Expand components into full RPM filenames
146 expand_component_into_full_rpm() {
147 local deref_var="${1}[@]"
148 - local arch="${2}"
149 - local p a rpm_prefix rpm_suffix expanded_full_rpms=()
150 + local p rpm_prefix expanded_full_rpms=()
151
152 for p in "${!deref_var}"; do
153 - for a in ${arch}; do
154 - # check if a directory is prefixed
155 - if [[ "${p}" == "${p##*/}" ]]; then
156 - rpm_prefix="${INTEL_RPMS_DIR}/intel-"
157 - else
158 - rpm_prefix=""
159 - fi
160 -
161 - # check for variables ending in ".rpm"
162 - # these are excluded from version expansion, due to Intel's
163 - # idiosyncratic versioning scheme beginning with their 2016
164 - # suite of tools. For instance
165 - #
166 - # intel-ccompxe-2016.1-056.noarch.rpm
167 - #
168 - # which is completely unpredictable using versions
169 - if [[ "${p}" == *.rpm ]]; then
170 - rpm_suffix=""
171 - else
172 - rpm_suffix="-$(_isdp_get-sdp-full-pv).${a}.rpm"
173 - fi
174 -
175 - expanded_full_rpms+=( "${rpm_prefix}${p}${rpm_suffix}" )
176 - done
177 + # check if a directory is prefixed
178 + if [[ "${p}" == "${p##*/}" ]]; then
179 + rpm_prefix="${INTEL_RPMS_DIR}/intel-"
180 + else
181 + rpm_prefix=""
182 + fi
183 + expanded_full_rpms+=( "${rpm_prefix}${p}" )
184 done
185 echo ${expanded_full_rpms[*]}
186 }
187
188 local vars_to_expand=("INTEL_DIST_BIN_RPMS" "INTEL_DIST_DAT_RPMS")
189 - local vars_to_expand_suffixes=("$(_isdp_get-sdp-source-rpm-arches)" "noarch")
190 if use abi_x86_32; then
191 vars_to_expand+=("INTEL_DIST_X86_RPMS")
192 - vars_to_expand_suffixes+=("${INTEL_X86}")
193 fi
194 if use abi_x86_64; then
195 vars_to_expand+=("INTEL_DIST_AMD64_RPMS")
196 - vars_to_expand_suffixes+=("x86_64")
197 fi
198
199 local i fully_expanded_intel_rpms=()
200 for ((i=0; i<${#vars_to_expand[@]}; i++)); do
201 - fully_expanded_intel_rpms+=($(expand_component_into_full_rpm "${vars_to_expand[i]}" "${vars_to_expand_suffixes[i]}"))
202 + fully_expanded_intel_rpms+=($(expand_component_into_full_rpm "${vars_to_expand[i]}"))
203 done
204 echo ${fully_expanded_intel_rpms[*]}
205 }
206 @@ -352,11 +272,6 @@ _isdp_big-warning() {
207 ewarn "To receive a non-commercial license, you need to register at:"
208 ewarn "https://software.intel.com/en-us/qualify-for-free-software"
209 ewarn "Install the license file into ${EPREFIX}/opt/intel/licenses"
210 - ewarn
211 - ewarn "Beginning with the 2016 suite of tools, license files are keyed"
212 - ewarn "to the MAC address of the eth0 interface. In order to retrieve"
213 - ewarn "a personalized license file, follow the instructions at"
214 - ewarn "https://software.intel.com/en-us/articles/how-do-i-get-my-license-file-for-intel-parallel-studio-xe-2016"
215
216 case ${1} in
217 pre-check )
218 @@ -471,6 +386,17 @@ intel-sdp-r1_pkg_pretend() {
219 fi
220 }
221
222 +# @FUNCTION: intel-sdp-r1_pkg_nofetch
223 +# @DESCRIPTION:
224 +# Advice user to download the parallel studio tarball
225 +pkg_nofetch() {
226 + einfo "Please download"
227 + einfo " ${SRC_URI}"
228 + einfo "from"
229 + einfo " https://registrationcenter.intel.com/RegCenter/MyProducts.aspx"
230 + einfo "and place the tarball in your DISTDIR directory."
231 +}
232 +
233 # @FUNCTION: intel-sdp-r1_src_unpack
234 # @DESCRIPTION:
235 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
236 @@ -512,15 +438,6 @@ intel-sdp-r1_src_install() {
237 done < <(find opt -regextype posix-extended -regex '.*(uninstall|uninstall.sh)$' -print0)
238 eend
239
240 - # remove remaining japanese stuff
241 - if ! use l10n_ja; then
242 - ebegin "Cleaning out japanese language directories"
243 - while IFS='\n' read -r -d '' i; do
244 - rm -r "${i}" || die
245 - done < <(find opt -type d -regextype posix-extended -regex '.*(ja|ja_JP)$' -print0)
246 - eend
247 - fi
248 -
249 # handle documentation
250 if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)"; then
251 # normal man pages