/[gentoo-x86]/eclass/intel-sdp.eclass
Gentoo

Diff of /eclass/intel-sdp.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.11
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.10 2013/02/14 08:17:35 jlec Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.11 2013/02/14 16:29:00 jlec Exp $
4 4
5# @ECLASS: intel-sdp.eclass 5# @ECLASS: intel-sdp.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Justin Lecher <jlec@gentoo.org> 7# Justin Lecher <jlec@gentoo.org>
8# Sci Team <sci@gentoo.org> 8# Sci Team <sci@gentoo.org>
44# @ECLASS-VARIABLE: INTEL_SUBDIR 44# @ECLASS-VARIABLE: INTEL_SUBDIR
45# @DEFAULT_UNSET 45# @DEFAULT_UNSET
46# @DESCRIPTION: 46# @DESCRIPTION:
47# The package sub-directory where it will end-up in /opt/intel 47# The package sub-directory where it will end-up in /opt/intel
48# To find out its value, you have to do a raw install from the Intel tar ball 48# To find out its value, you have to do a raw install from the Intel tar ball
49
50# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
51# @DEFAULT_UNSET
52# @DESCRIPTION:
53# Possibility to skip the mandatory check for licenses. Only set this if there
54# is really no fix.
49 55
50# @ECLASS-VARIABLE: INTEL_RPMS_DIRS 56# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
51# @DESCRIPTION: 57# @DESCRIPTION:
52# List of subdirectories in the main archive which contains the 58# List of subdirectories in the main archive which contains the
53# rpms to extract. 59# rpms to extract.
236 242
237# @FUNCTION: _isdp_run-test 243# @FUNCTION: _isdp_run-test
238# @INTERNAL 244# @INTERNAL
239# Test if installed compiler is working 245# Test if installed compiler is working
240_isdp_run-test() { 246_isdp_run-test() {
247 if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
241 case ${PN} in 248 case ${PN} in
242 ifc | icc ) 249 ifc | icc )
243 _isdp_version_test ;; 250 _isdp_version_test ;;
244 * ) 251 * )
245 debug-print "No test available for ${PN}" 252 debug-print "No test available for ${PN}"
246 ;; 253 ;;
247 esac 254 esac
255 fi
248} 256}
249 257
250# @FUNCTION: intel-sdp_pkg_pretend 258# @FUNCTION: intel-sdp_pkg_pretend
251# @DESCRIPTION: 259# @DESCRIPTION:
252# @CODE 260# @CODE
257 local warn=1 dir dirs ret arch a p 265 local warn=1 dir dirs ret arch a p
258 266
259 : ${CHECKREQS_DISK_BUILD:=256M} 267 : ${CHECKREQS_DISK_BUILD:=256M}
260 check-reqs_pkg_pretend 268 check-reqs_pkg_pretend
261 269
270 if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
262 if echo ${INTEL_LICENSE_FILE} | grep -q @; then 271 if echo ${INTEL_LICENSE_FILE} | grep -q @; then
263 einfo "Looks like you are using following license server:" 272 einfo "Looks like you are using following license server:"
264 einfo " ${INTEL_LICENSE_FILE}" 273 einfo " ${INTEL_LICENSE_FILE}"
265 return 0 274 return 0
266 fi 275 fi
267 276
268 dirs=( 277 dirs=(
269 "${INTEL_SDP_EDIR}/licenses" 278 "${INTEL_SDP_EDIR}/licenses"
270 "${INTEL_SDP_EDIR}/Licenses" 279 "${INTEL_SDP_EDIR}/Licenses"
271 "${EPREFIX}/opt/intel/licenses" 280 "${EPREFIX}/opt/intel/licenses"
272 ) 281 )
273 for dir in "${dirs[@]}" ; do 282 for dir in "${dirs[@]}" ; do
274 ebegin "Checking for a license in: ${dir}" 283 ebegin "Checking for a license in: ${dir}"
275 #maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]] 284 #maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
276 [[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$? 285 [[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
277 eend ${ret} 286 eend ${ret}
278 if [[ ${ret} == "0" ]]; then 287 if [[ ${ret} == "0" ]]; then
279 warn=${ret} 288 warn=${ret}
280 break 289 break
281 fi 290 fi
282 done 291 done
283 if [[ ${warn} == "1" ]]; then 292 if [[ ${warn} == "1" ]]; then
284 _isdp_big-warning pre-check 293 _isdp_big-warning pre-check
285 die "Could not find license file" 294 die "Could not find license file"
295 fi
296 else
297 eqawarn "The ebuild doesn't check for a license!"
298 eqawarn "This shouldn't be done unless there is a serious reason."
286 fi 299 fi
287} 300}
288 301
289# @FUNCTION: intel-sdp_pkg_setup 302# @FUNCTION: intel-sdp_pkg_setup
290# @DESCRIPTION: 303# @DESCRIPTION:

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20