summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-office/libreoffice-l10n/libreoffice-l10n-5.0.5.2.ebuild34
-rw-r--r--app-office/libreoffice-l10n/libreoffice-l10n-5.1.2.2.ebuild34
-rw-r--r--app-office/libreoffice-l10n/libreoffice-l10n-5.1.3.2.ebuild34
-rw-r--r--app-office/libreoffice-l10n/metadata.xml4
-rwxr-xr-xeclass/tests/toolchain-funcs.sh68
-rw-r--r--eclass/toolchain-funcs.eclass48
-rw-r--r--profiles/package.mask20
7 files changed, 157 insertions, 85 deletions
diff --git a/app-office/libreoffice-l10n/libreoffice-l10n-5.0.5.2.ebuild b/app-office/libreoffice-l10n/libreoffice-l10n-5.0.5.2.ebuild
index d44da2eb3f1d..4d5bced6dbf6 100644
--- a/app-office/libreoffice-l10n/libreoffice-l10n-5.0.5.2.ebuild
+++ b/app-office/libreoffice-l10n/libreoffice-l10n-5.0.5.2.ebuild
@@ -21,23 +21,22 @@ IUSE="offlinehelp"
#
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
#
-LANGUAGES_HELP=" am ast bg bn_IN bn bo bs ca_valencia ca cs da de dz el en_GB en en_ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW "
-LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr_Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa_IN ro rw sa_IN sat sd sid sr_Latn sr ss st sw_TZ ta te th tn ts tt uz ve xh zu "
+# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
+LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
+LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
for lang in ${LANGUAGES_HELP}; do
- helppack=""
- [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
- helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz )"
- SRC_URI+=" linguas_${lang}? ( ${helppack} )"
+ helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
+ SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
done
for lang in ${LANGUAGES}; do
- langpack=""
- [[ ${lang} == en ]] \
- || langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz"
- [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
- IUSE+=" linguas_${lang}"
+ if [[ ${lang%:*} != en ]]; then
+ langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
+ SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
+ fi
+ IUSE+=" l10n_${lang%:*}"
done
-unset lang helppack langpack lang2
+unset lang helppack langpack
RDEPEND+="app-text/hunspell"
@@ -52,19 +51,18 @@ src_prepare() {
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
for lang in ${LANGUAGES}; do
- # break away if not enabled; paludis support
- use_if_iuse linguas_${lang} || continue
+ # break away if not enabled
+ use l10n_${lang%:*} || continue
- dir=${lang/_/-}
+ dir=${lang#*:}
# for english we provide just helppack, as translation is always there
- if [[ ${lang} != en ]]; then
+ if [[ ${lang%:*} != en ]]; then
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
fi
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
- [[ ${lang} == en ]] && dir="en-US"
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
@@ -77,7 +75,7 @@ src_compile() { :; }
src_install() {
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
- # Condition required for people that do not install anything eg no linguas
+ # Condition required for people that do not install anything eg no l10n
# or just english with no offlinehelp.
if [[ -d "${dir}" ]] ; then
insinto /usr/$(get_libdir)/${PN/-l10n/}/
diff --git a/app-office/libreoffice-l10n/libreoffice-l10n-5.1.2.2.ebuild b/app-office/libreoffice-l10n/libreoffice-l10n-5.1.2.2.ebuild
index b0148fce6946..5585b5d29cb6 100644
--- a/app-office/libreoffice-l10n/libreoffice-l10n-5.1.2.2.ebuild
+++ b/app-office/libreoffice-l10n/libreoffice-l10n-5.1.2.2.ebuild
@@ -21,23 +21,22 @@ IUSE="offlinehelp"
#
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
#
-LANGUAGES_HELP=" am ast bg bn_IN bn bo bs ca_valencia ca cs da de dz el en_GB en en_ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW "
-LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr_Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa_IN ro rw sa_IN sat sd sid sr_Latn sr ss st sw_TZ ta te th tn ts tt uz ve xh zu "
+# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
+LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
+LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
for lang in ${LANGUAGES_HELP}; do
- helppack=""
- [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
- helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz )"
- SRC_URI+=" linguas_${lang}? ( ${helppack} )"
+ helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
+ SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
done
for lang in ${LANGUAGES}; do
- langpack=""
- [[ ${lang} == en ]] \
- || langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz"
- [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
- IUSE+=" linguas_${lang}"
+ if [[ ${lang%:*} != en ]]; then
+ langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
+ SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
+ fi
+ IUSE+=" l10n_${lang%:*}"
done
-unset lang helppack langpack lang2
+unset lang helppack langpack
RDEPEND+="app-text/hunspell"
@@ -54,19 +53,18 @@ src_prepare() {
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
for lang in ${LANGUAGES}; do
- # break away if not enabled; paludis support
- use_if_iuse linguas_${lang} || continue
+ # break away if not enabled
+ use l10n_${lang%:*} || continue
- dir=${lang/_/-}
+ dir=${lang#*:}
# for english we provide just helppack, as translation is always there
- if [[ ${lang} != en ]]; then
+ if [[ ${lang%:*} != en ]]; then
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
fi
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
- [[ ${lang} == en ]] && dir="en-US"
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
@@ -79,7 +77,7 @@ src_compile() { :; }
src_install() {
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
- # Condition required for people that do not install anything eg no linguas
+ # Condition required for people that do not install anything eg no l10n
# or just english with no offlinehelp.
if [[ -d "${dir}" ]] ; then
insinto /usr/$(get_libdir)/${PN/-l10n/}/
diff --git a/app-office/libreoffice-l10n/libreoffice-l10n-5.1.3.2.ebuild b/app-office/libreoffice-l10n/libreoffice-l10n-5.1.3.2.ebuild
index 875cd6b0ad72..181b66b1e74c 100644
--- a/app-office/libreoffice-l10n/libreoffice-l10n-5.1.3.2.ebuild
+++ b/app-office/libreoffice-l10n/libreoffice-l10n-5.1.3.2.ebuild
@@ -21,23 +21,22 @@ IUSE="offlinehelp"
#
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
#
-LANGUAGES_HELP=" am ast bg bn_IN bn bo bs ca_valencia ca cs da de dz el en_GB en en_ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW "
-LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr_Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa_IN ro rw sa_IN sat sd sid sr_Latn sr ss st sw_TZ ta te th tn ts tt uz ve xh zu "
+# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
+LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
+LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
for lang in ${LANGUAGES_HELP}; do
- helppack=""
- [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
- helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz )"
- SRC_URI+=" linguas_${lang}? ( ${helppack} )"
+ helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
+ SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
done
for lang in ${LANGUAGES}; do
- langpack=""
- [[ ${lang} == en ]] \
- || langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz"
- [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
- IUSE+=" linguas_${lang}"
+ if [[ ${lang%:*} != en ]]; then
+ langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
+ SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
+ fi
+ IUSE+=" l10n_${lang%:*}"
done
-unset lang helppack langpack lang2
+unset lang helppack langpack
RDEPEND+="app-text/hunspell"
@@ -54,19 +53,18 @@ src_prepare() {
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
for lang in ${LANGUAGES}; do
- # break away if not enabled; paludis support
- use_if_iuse linguas_${lang} || continue
+ # break away if not enabled
+ use l10n_${lang%:*} || continue
- dir=${lang/_/-}
+ dir=${lang#*:}
# for english we provide just helppack, as translation is always there
- if [[ ${lang} != en ]]; then
+ if [[ ${lang%:*} != en ]]; then
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
fi
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
- [[ ${lang} == en ]] && dir="en-US"
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
rpm_unpack ./${rpmdir}/*.rpm
@@ -79,7 +77,7 @@ src_compile() { :; }
src_install() {
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
- # Condition required for people that do not install anything eg no linguas
+ # Condition required for people that do not install anything eg no l10n
# or just english with no offlinehelp.
if [[ -d "${dir}" ]] ; then
insinto /usr/$(get_libdir)/${PN/-l10n/}/
diff --git a/app-office/libreoffice-l10n/metadata.xml b/app-office/libreoffice-l10n/metadata.xml
index 510d8396edfb..4dee5dbc1993 100644
--- a/app-office/libreoffice-l10n/metadata.xml
+++ b/app-office/libreoffice-l10n/metadata.xml
@@ -7,9 +7,5 @@
</maintainer>
<use>
<flag name="offlinehelp">Install help files locally instead of using the LibreOffice Wiki</flag>
- <flag name="linguas_ca_valencia">Catalan locale (Valencia)</flag>
- <flag name="linguas_kmr_Latn">kmr_Latn localization</flag>
- <flag name="linguas_sid">sid localization</flag>
- <flag name="linguas_sr_Latn">Serbian (Latin) locale</flag>
</use>
</pkgmetadata>
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 41c1ae59306b..e6a15389c913 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -111,5 +111,73 @@ tc-ld-disable-gold
)
tend $?
+unset CPP
+
+tbegin "tc-get-compiler-type (gcc)"
+(
+export CC=gcc
+[[ $(tc-get-compiler-type) == gcc ]]
+)
+tend $?
+
+tbegin "tc-is-gcc (gcc)"
+(
+export CC=gcc
+tc-is-gcc
+)
+tend $?
+
+tbegin "! tc-is-clang (gcc)"
+(
+export CC=gcc
+! tc-is-clang
+)
+tend $?
+
+if type -P clang &>/dev/null; then
+ tbegin "tc-get-compiler-type (clang)"
+ (
+ export CC=clang
+ [[ $(tc-get-compiler-type) == clang ]]
+ )
+ tend $?
+
+ tbegin "! tc-is-gcc (clang)"
+ (
+ export CC=clang
+ ! tc-is-gcc
+ )
+ tend $?
+
+ tbegin "tc-is-clang (clang)"
+ (
+ export CC=clang
+ tc-is-clang
+ )
+ tend $?
+fi
+
+if type -P pathcc &>/dev/null; then
+ tbegin "tc-get-compiler-type (pathcc)"
+ (
+ export CC=pathcc
+ [[ $(tc-get-compiler-type) == pathcc ]]
+ )
+ tend $?
+
+ tbegin "! tc-is-gcc (pathcc)"
+ (
+ export CC=pathcc
+ ! tc-is-gcc
+ )
+ tend $?
+
+ tbegin "! tc-is-clang (pathcc)"
+ (
+ export CC=pathcc
+ ! tc-is-clang
+ )
+ tend $?
+fi
texit
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e794559bbcfb..d3abfb528936 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -22,7 +22,7 @@ inherit multilib
_tc-getPROG() {
local tuple=$1
local v var vars=$2
- local prog=$3
+ local prog=( $3 )
var=${vars%% *}
for v in ${vars} ; do
@@ -34,11 +34,11 @@ _tc-getPROG() {
done
local search=
- [[ -n $4 ]] && search=$(type -p "$4-${prog}")
- [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}")
- [[ -n ${search} ]] && prog=${search##*/}
+ [[ -n $4 ]] && search=$(type -p $4-${prog[0]})
+ [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p ${!tuple}-${prog[0]})
+ [[ -n ${search} ]] && prog[0]=${search##*/}
- export ${var}=${prog}
+ export ${var}="${prog[*]}"
echo "${!var}"
}
tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
@@ -59,7 +59,7 @@ tc-getCC() { tc-getPROG CC gcc "$@"; }
# @FUNCTION: tc-getCPP
# @USAGE: [toolchain prefix]
# @RETURN: name of the C preprocessor
-tc-getCPP() { tc-getPROG CPP cpp "$@"; }
+tc-getCPP() { tc-getPROG CPP "${CC:-gcc} -E" "$@"; }
# @FUNCTION: tc-getCXX
# @USAGE: [toolchain prefix]
# @RETURN: name of the C++ compiler
@@ -132,7 +132,7 @@ tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; }
# @FUNCTION: tc-getBUILD_CPP
# @USAGE: [toolchain prefix]
# @RETURN: name of the C preprocessor for building binaries to run on the build machine
-tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; }
+tc-getBUILD_CPP() { tc-getBUILD_PROG CPP "$(tc-getBUILD_CC) -E" "$@"; }
# @FUNCTION: tc-getBUILD_CXX
# @USAGE: [toolchain prefix]
# @RETURN: name of the C++ compiler for building binaries to run on the build machine
@@ -585,6 +585,40 @@ tc-endian() {
esac
}
+# @FUNCTION: tc-get-compiler-type
+# @RETURN: keyword identifying the compiler: gcc, clang, pathcc, unknown
+tc-get-compiler-type() {
+ local code='
+#if defined(__PATHSCALE__)
+ HAVE_PATHCC
+#elif defined(__clang__)
+ HAVE_CLANG
+#elif defined(__GNUC__)
+ HAVE_GCC
+#endif
+'
+ local res=$($(tc-getCPP "$@") -E -P - <<<"${code}")
+
+ case ${res} in
+ *HAVE_PATHCC*) echo pathcc;;
+ *HAVE_CLANG*) echo clang;;
+ *HAVE_GCC*) echo gcc;;
+ *) echo unknown;;
+ esac
+}
+
+# @FUNCTION: tc-is-gcc
+# @RETURN: Shell true if the current compiler is GCC, false otherwise.
+tc-is-gcc() {
+ [[ $(tc-get-compiler-type) == gcc ]]
+}
+
+# @FUNCTION: tc-is-clang
+# @RETURN: Shell true if the current compiler is clang, false otherwise.
+tc-is-clang() {
+ [[ $(tc-get-compiler-type) == clang ]]
+}
+
# Internal func. The first argument is the version info to expand.
# Query the preprocessor to improve compatibility across different
# compilers rather than maintaining a --version flag matrix. #335943
diff --git a/profiles/package.mask b/profiles/package.mask
index b2a9f40a5a46..d9127696e0c2 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -516,26 +516,6 @@ dev-libs/iniparser:4
# See #551724 and duplicates
=sys-fs/udev-init-scripts-29
-# Michał Górny <mgorny@gentoo.org> (28 Mar 2015)
-# on behalf of gx86-multilib project <multilib@gentoo.org>
-# Removed lastrited emul-linux-x86. The mask is kept post-removal
-# per Arfrever's request so that the PM warns about masked packages
-# being installed.
-app-emulation/emul-linux-x86-baselibs
-app-emulation/emul-linux-x86-cpplibs
-app-emulation/emul-linux-x86-db
-app-emulation/emul-linux-x86-gstplugins
-app-emulation/emul-linux-x86-gtklibs
-app-emulation/emul-linux-x86-gtkmmlibs
-app-emulation/emul-linux-x86-medialibs
-app-emulation/emul-linux-x86-motif
-app-emulation/emul-linux-x86-opengl
-app-emulation/emul-linux-x86-qtlibs
-app-emulation/emul-linux-x86-sdl
-app-emulation/emul-linux-x86-soundlibs
-app-emulation/emul-linux-x86-xlibs
-app-emulation/emul-linux-x86-jna
-
# Justin Lecher <jlec@gentoo.org> (28 Feb 2015)
# Unfixed security problems
# No upstream support anymore