diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-12-27 16:20:36 +0100 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-12-27 16:20:36 +0100 |
commit | 50d9353a6267a04df6b92093dccb59a741b71e33 (patch) | |
tree | 52260a6a29038c76420d6d1155b28fe436726807 /eclass | |
parent | numeric-int64-multibuild.eclass: Set MULTILIB_COMPAT to supported ABIs (diff) | |
download | sci-50d9353a6267a04df6b92093dccb59a741b71e33.tar.gz sci-50d9353a6267a04df6b92093dccb59a741b71e33.tar.bz2 sci-50d9353a6267a04df6b92093dccb59a741b71e33.zip |
intel-sdp.eclass: Update
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/intel-sdp.eclass | 85 |
1 files changed, 64 insertions, 21 deletions
diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass index 95e711f5f..d805a6a49 100644 --- a/eclass/intel-sdp.eclass +++ b/eclass/intel-sdp.eclass @@ -8,6 +8,13 @@ # Sci Team <sci@gentoo.org> # @BLURB: Handling of Intel's Software Development Products package management +if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then + +case "${EAPI:-0}" in + 5) ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac + # @ECLASS-VARIABLE: INTEL_DID # @DEFAULT_UNSET # @DESCRIPTION: @@ -122,7 +129,9 @@ # Full path to intel registry db INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db -inherit check-reqs eutils multilib versionator +MULTILIB_COMPAT=( abi_x86_{32,64} ) + +inherit check-reqs eutils multilib-build versionator _INTEL_PV1=$(get_version_component_range 1) _INTEL_PV2=$(get_version_component_range 2) @@ -138,9 +147,8 @@ _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${ if [ ${INTEL_SINGLE_ARCH} == true ]; then SRC_URI=" - amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) ) - amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) ) - x86? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )" + abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} ) + abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )" else SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}" fi @@ -149,7 +157,7 @@ LICENSE="Intel-SDP" # Future work, #394411 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}" SLOT="0" -IUSE="examples multilib" +IUSE="examples" RESTRICT="mirror" @@ -189,6 +197,8 @@ QA_PREBUILT="${INTEL_SDP_DIR}/*" # @DESCRIPTION: # Creating necessary links to use intel compiler with eclipse _isdp_link_eclipse_plugins() { + debug-print-function ${FUNCNAME} "${@}" + local c f pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die for c in cdt*; do @@ -216,6 +226,8 @@ _isdp_link_eclipse_plugins() { # @DESCRIPTION: # warn user that we really require a license _isdp_big-warning() { + debug-print-function ${FUNCNAME} "${@}" + case ${1} in pre-check ) echo "" @@ -251,6 +263,8 @@ _isdp_big-warning() { # @DESCRIPTION: # Testing for valid license by asking for version information of the compiler _isdp_version_test() { + debug-print-function ${FUNCNAME} "${@}" + local comp comp_full arch warn case ${PN} in ifc ) @@ -292,6 +306,8 @@ _isdp_version_test() { # @INTERNAL # Test if installed compiler is working _isdp_run-test() { + debug-print-function ${FUNCNAME} "${@}" + if [[ -z ${INTEL_SKIP_LICENSE} ]]; then case ${PN} in ifc | icc ) @@ -303,13 +319,36 @@ _isdp_run-test() { fi } -# @FUNCTION: intel-sdp_pkg_pretend +# @FUNCTION: convert2intel_arch +# @USAGE: <arch> +# @DESCRIPTION: +# Convert between portage arch (e.g. amd64, x86) and intel arch +# nomenclature (e.g. intel64, ia32) +convert2intel_arch() { + debug-print-function ${FUNCNAME} "${@}" + + case $1 in + amd64|abi_x86_64|*amd64*) + echo "intel64" + ;; + x86|abi_x86_32|*x86*) + echo "ia32" + ;; + *) + die "Abi \'$1\' is unsupported" + ;; + esac +} + +# @FUNCTION: intel-sdp-r1_pkg_pretend # @DESCRIPTION: # @CODE # * Check that the user has a (valid) license file before going on. # * Check for space requirements being fullfilled # @CODE intel-sdp_pkg_pretend() { + debug-print-function ${FUNCNAME} "${@}" + local warn=1 dir dirs ret arch a p : ${CHECKREQS_DISK_BUILD:=256M} @@ -351,18 +390,18 @@ intel-sdp_pkg_pretend() { # @DESCRIPTION: # Setting up and sorting some internal variables intel-sdp_pkg_setup() { + debug-print-function ${FUNCNAME} "${@}" local arch a p - if use x86; then - arch=${INTEL_X86} - INTEL_ARCH="ia32" - elif use amd64; then - arch=x86_64 - INTEL_ARCH="intel64" - if has_multilib_profile; then - arch="x86_64 ${INTEL_X86}" - INTEL_ARCH="intel64 ia32" - fi + INTEL_ARCH="" + + if use abi_x86_64; then + arch+=" x86_64" + INTEL_ARCH+=" intel64" + fi + if use abi_x86_32; then + arch+=" ${INTEL_X86}" + INTEL_ARCH+=" ia32" fi INTEL_RPMS=() INTEL_RPMS_FULL=() @@ -461,6 +500,8 @@ intel-sdp_src_unpack() { # @DESCRIPTION: # Install everything intel-sdp_src_install() { + debug-print-function ${FUNCNAME} "${@}" + if path_exists "${INTEL_SDP_DIR}"/uninstall*; then ebegin "Cleaning out uninstall information" find "${INTEL_SDP_DIR}"/uninstall* -delete || die @@ -523,6 +564,8 @@ intel-sdp_src_install() { # @DESCRIPTION: # Add things to intel database intel-sdp_pkg_postinst() { + debug-print-function ${FUNCNAME} "${@}" + # add product registry to intel "database" local l r for r in ${INTEL_RPMS}; do @@ -542,6 +585,8 @@ intel-sdp_pkg_postinst() { # @DESCRIPTION: # Sanitize intel database intel-sdp_pkg_postrm() { + debug-print-function ${FUNCNAME} "${@}" + # remove from intel "database" if [[ -e ${INTEL_SDP_DB} ]]; then local r @@ -559,8 +604,6 @@ intel-sdp_pkg_postrm() { } EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend -case "${EAPI:-0}" in - 0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;; - 4|5) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac + +_INTEL_SDP_ECLASS_=1 +fi |