summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:19:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:19:30 +0100
commit06e58a0fcb900034d35485fe961fee1875f3a6b0 (patch)
tree917a18e12369874e9f182d27bf26b5ff90641f2f
parent6c30cc2d5bd48ddbdbe8d75544899cd5dbfcaba4 (diff)
gentoo resync : 14.07.2018
-rw-r--r--eclass/Manifest.gzbin38380 -> 38391 bytes
-rw-r--r--eclass/kde5-functions.eclass1
-rw-r--r--eclass/kde5.eclass15
-rw-r--r--eclass/linux-info.eclass81
-rw-r--r--eclass/mysql-multilib-r1.eclass2
-rw-r--r--eclass/python-utils-r1.eclass4
-rw-r--r--eclass/selinux-policy-2.eclass4
-rw-r--r--eclass/toolchain.eclass76
8 files changed, 133 insertions, 50 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 0e9aa91d31f7..57c4b4d317f3 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 34aed6cf284e..bd3fa08b2576 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -52,7 +52,6 @@ case ${CATEGORY} in
: ${FRAMEWORKS_MINIMAL:=5.43.0}
: ${QT_MINIMAL:=5.9.1}
fi
- [[ ${PV} = 18.04.2* ]] && : ${FRAMEWORKS_MINIMAL:=5.44.0}
;;
esac
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index d674611dc711..07d6c26a264c 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -49,6 +49,13 @@ fi
EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
+# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
+# @DESCRIPTION:
+# If set to "false", do nothing.
+# For any other value, assume the package is using KDEInstallDirs macro and switch
+# KDE_INSTALL_USE_QT_SYS_PATHS to ON.
+: ${ECM_KDEINSTALLDIRS:=true}
+
# @ECLASS-VARIABLE: KDE_AUTODEPS
# @DESCRIPTION:
# If set to "false", do nothing.
@@ -641,8 +648,12 @@ kde5_src_configure() {
cmakeargs+=( -DBUILD_QCH=$(usex doc) )
fi
- # install mkspecs in the same directory as qt stuff
- cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
+ if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then
+ cmakeargs+=(
+ # install mkspecs in the same directory as qt stuff
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+ )
+ fi
# allow the ebuild to override what we set here
mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index dd62b26855d2..96f94e4072ae 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -106,10 +106,13 @@
# KBUILD_OUTPUT is used. This should be used for referencing .config.
# And to ensure all the weirdness with crosscompile
-inherit toolchain-funcs versionator
+inherit toolchain-funcs
+[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
EXPORT_FUNCTIONS pkg_setup
+IUSE="kernel_linux"
+
# Overwritable environment Var's
# ---------------------------------------
KERNEL_DIR="${KERNEL_DIR:-${ROOT}usr/src/linux}"
@@ -238,6 +241,10 @@ linux_config_qa_check() {
ewarn "QA: You called $f before any linux_config_exists!"
ewarn "QA: The return value of $f will NOT guaranteed later!"
fi
+
+ if ! use kernel_linux; then
+ die "$f called on non-Linux system, please fix the ebuild"
+ fi
}
# @FUNCTION: linux_config_src_exists
@@ -246,7 +253,7 @@ linux_config_qa_check() {
# It returns true if .config exists in a build directory otherwise false
linux_config_src_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
- [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
+ use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
}
# @FUNCTION: linux_config_bin_exists
@@ -255,7 +262,7 @@ linux_config_src_exists() {
# It returns true if .config exists in /proc, otherwise false
linux_config_bin_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
- [[ -s /proc/config.gz ]]
+ use kernel_linux && [[ -s /proc/config.gz ]]
}
# @FUNCTION: linux_config_exists
@@ -288,6 +295,10 @@ linux_config_path() {
# This function verifies that the current kernel is configured (it checks against the existence of .config)
# otherwise it dies.
require_configured_kernel() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
if ! linux_config_src_exists; then
qeerror "Could not find a usable .config in the kernel source directory."
qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources."
@@ -295,6 +306,7 @@ require_configured_kernel() {
qeerror "it points to the necessary object directory so that it might find .config."
die "Kernel not configured; no .config found in ${KV_OUT_DIR}"
fi
+ get_version || die "Unable to determine configured kernel version"
}
# @FUNCTION: linux_chkconfig_present
@@ -366,6 +378,10 @@ linux_chkconfig_string() {
# Note: duplicated in kernel-2.eclass
kernel_is() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
# if we haven't determined the version yet, we need to.
linux-info_get_any_version
@@ -390,8 +406,13 @@ kernel_is() {
get_localversion() {
local lv_list i x
+ local shopt_save=$(shopt -p nullglob)
+ shopt -s nullglob
+ local files=( ${1}/localversion* )
+ ${shopt_save}
+
# ignore files with ~ in it.
- for i in $(ls ${1}/localversion* 2>/dev/null); do
+ for i in "${files[@]}"; do
[[ -n ${i//*~*} ]] && lv_list="${lv_list} ${i}"
done
@@ -431,6 +452,10 @@ get_version_warning_done=
# KBUILD_OUTPUT (in a decreasing priority list, we look for the env var, makefile var or the
# symlink /lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build).
get_version() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
local tmplocal
# no need to execute this twice assuming KV_FULL is populated.
@@ -584,6 +609,10 @@ get_version() {
# It gets the version of the current running kernel and the result is the same as get_version() if the
# function can find the sources.
get_running_version() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
KV_FULL=$(uname -r)
if [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile && -f ${ROOT}/lib/modules/${KV_FULL}/build/Makefile ]]; then
@@ -606,9 +635,9 @@ get_running_version() {
# This handles a variety of weird kernel versions. Make sure to update
# tests/linux-info_get_running_version.sh if you want to change this.
local kv_full=${KV_FULL//[-+_]*}
- KV_MAJOR=$(get_version_component_range 1 ${kv_full})
- KV_MINOR=$(get_version_component_range 2 ${kv_full})
- KV_PATCH=$(get_version_component_range 3 ${kv_full})
+ KV_MAJOR=$(ver_cut 1 ${kv_full})
+ KV_MINOR=$(ver_cut 2 ${kv_full})
+ KV_PATCH=$(ver_cut 3 ${kv_full})
KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}${KV_PATCH:+.${KV_PATCH}}}"
: ${KV_PATCH:=0}
fi
@@ -623,10 +652,15 @@ get_running_version() {
# This attempts to find the version of the sources, and otherwise falls back to
# the version of the running kernel.
linux-info_get_any_version() {
- get_version
- if [[ $? -ne 0 ]]; then
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
+ if ! get_version; then
ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
- get_running_version
+ if ! get_running_version; then
+ die "Unable to determine any Linux Kernel version, please report a bug"
+ fi
fi
}
@@ -638,9 +672,12 @@ linux-info_get_any_version() {
# @DESCRIPTION:
# This function verifies that the current kernel sources have been already prepared otherwise it dies.
check_kernel_built() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
# if we haven't determined the version yet, we need to
require_configured_kernel
- get_version
local versionh_path
if kernel_is -ge 3 7; then
@@ -668,9 +705,12 @@ check_kernel_built() {
# @DESCRIPTION:
# This function verifies that the current kernel support modules (it checks CONFIG_MODULES=y) otherwise it dies.
check_modules_supported() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
# if we haven't determined the version yet, we need too.
require_configured_kernel
- get_version
if ! linux_chkconfig_builtin "MODULES"; then
eerror "These sources do not support loading external modules."
@@ -683,8 +723,10 @@ check_modules_supported() {
# @FUNCTION: check_extra_config
# @DESCRIPTION:
# It checks the kernel config options specified by CONFIG_CHECK. It dies only when a required config option (i.e.
-# the prefix ~ is not used) doesn't satisfy the directive.
+# the prefix ~ is not used) doesn't satisfy the directive. Ignored on non-Linux systems.
check_extra_config() {
+ use kernel_linux || return
+
local config negate die error reworkmodulenames
local soft_errors_count=0 hard_errors_count=0 config_required=0
# store the value of the QA check, because otherwise we won't catch usages
@@ -823,9 +865,12 @@ check_extra_config() {
}
check_zlibinflate() {
+ if ! use kernel_linux; then
+ die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
+ fi
+
# if we haven't determined the version yet, we need to
require_configured_kernel
- get_version
# although I restructured this code - I really really really dont support it!
@@ -843,13 +888,11 @@ check_zlibinflate() {
ebegin "checking ZLIB_INFLATE"
linux_chkconfig_builtin CONFIG_ZLIB_INFLATE
- eend $?
- [ "$?" != 0 ] && die
+ eend $? || die
ebegin "checking ZLIB_DEFLATE"
linux_chkconfig_builtin CONFIG_ZLIB_DEFLATE
- eend $?
- [ "$?" != 0 ] && die
+ eend $? || die
local LINENO_START
local LINENO_END
@@ -900,6 +943,8 @@ check_zlibinflate() {
# Force a get_version() call when inherited from linux-mod.eclass and then check if the kernel is configured
# to support the options specified in CONFIG_CHECK (if not null)
linux-info_pkg_setup() {
+ use kernel_linux || return
+
linux-info_get_any_version
if kernel_is 2 4; then
diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass
index ebc054f0fefd..458e80981174 100644
--- a/eclass/mysql-multilib-r1.eclass
+++ b/eclass/mysql-multilib-r1.eclass
@@ -149,7 +149,7 @@ if [[ ${MY_EXTRAS_VER} != "live" && ${MY_EXTRAS_VER} != "none" ]]; then
fi
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-HOMEPAGE="http://www.mysql.com/"
+HOMEPAGE="https://www.mysql.com/"
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index ab4db71422d2..0a4744cf959a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -43,7 +43,7 @@ _PYTHON_ALL_IMPLS=(
jython2_7
pypy pypy3
python2_7
- python3_4 python3_5 python3_6
+ python3_4 python3_5 python3_6 python3_7
)
readonly _PYTHON_ALL_IMPLS
@@ -79,7 +79,7 @@ _python_impl_supported() {
# keep in sync with _PYTHON_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
- python2_7|python3_[456]|jython2_7)
+ python2_7|python3_[4567]|jython2_7)
return 0
;;
pypy1_[89]|pypy2_0|python2_[56]|python3_[123])
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index aaea1ee4b89f..784e304a962d 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -94,10 +94,10 @@ IUSE=""
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:SELinux"
if [[ -n ${BASEPOL} ]] && [[ "${BASEPOL}" != "9999" ]]; then
- SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2
+ SRC_URI="https://github.com/SELinuxProject/refpolicy/releases/download/RELEASE_${PV/./_}/refpolicy-${PV}.tar.bz2
https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${BASEPOL}.tar.bz2"
elif [[ "${BASEPOL}" != "9999" ]]; then
- SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2"
+ SRC_URI="https://github.com/SELinuxProject/refpolicy/releases/download/RELEASE_${PV/./_}/refpolicy-${PV}.tar.bz2"
else
SRC_URI=""
fi
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d80889d1ba64..0fb518a0c2ea 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -309,6 +309,14 @@ gentoo_urls() {
# ten Brugge's bounds-checking patches. If you want to use a patch
# for an older gcc version with a new gcc, make sure you set
# HTB_GCC_VER to that version of gcc.
+#
+# CYGWINPORTS_GITREV
+# If set, this variable signals that we should apply additional patches
+# maintained by upstream Cygwin developers at github/cygwinports/gcc,
+# using the specified git commit id there. The list of patches to
+# apply is extracted from gcc.cygport, maintained there as well.
+# This is done for compilers running on Cygwin, not for cross compilers
+# with a Cygwin target.
get_gcc_src_uri() {
export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}}
export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}}
@@ -375,6 +383,11 @@ get_gcc_src_uri() {
fi
fi
+ # Cygwin patches from https://github.com/cygwinports/gcc
+ [[ -n ${CYGWINPORTS_GITREV} ]] && \
+ GCC_SRC_URI+=" elibc_Cygwin? ( https://github.com/cygwinports/gcc/archive/${CYGWINPORTS_GITREV}.tar.gz
+ -> gcc-cygwinports-${CYGWINPORTS_GITREV}.tar.gz )"
+
echo "${GCC_SRC_URI}"
}
@@ -481,6 +494,8 @@ gcc_quick_unpack() {
use_if_iuse boundschecking && unpack "bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch.bz2"
+ [[ -n ${CYGWINPORTS_GITREV} ]] && use elibc_Cygwin && unpack "gcc-cygwinports-${CYGWINPORTS_GITREV}.tar.gz"
+
popd > /dev/null
}
@@ -505,6 +520,7 @@ toolchain_src_prepare() {
fi
do_gcc_HTB_patches
do_gcc_PIE_patches
+ do_gcc_CYGWINPORTS_patches
epatch_user
if ( tc_version_is_at_least 4.8.2 || use_if_iuse hardened ) && ! use vanilla ; then
@@ -645,6 +661,18 @@ do_gcc_PIE_patches() {
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}"
}
+do_gcc_CYGWINPORTS_patches() {
+ [[ -n ${CYGWINPORTS_GITREV} ]] || return 0
+ use elibc_Cygwin || return 0
+
+ local -a patches
+ local p d="${WORKDIR}/gcc-${CYGWINPORTS_GITREV}"
+ readarray -t patches < <(sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport)
+ for p in ${patches[*]}; do
+ epatch "${d}/${p}"
+ done
+}
+
# configure to build with the hardened GCC specs as the default
make_gcc_hard() {
@@ -1034,7 +1062,7 @@ toolchain_src_configure() {
confgcc+=( --enable-shared )
fi
case ${CHOST} in
- mingw*|*-mingw*|*-cygwin)
+ mingw*|*-mingw*)
confgcc+=( --enable-threads=win32 ) ;;
*)
confgcc+=( --enable-threads=posix ) ;;
@@ -1722,9 +1750,9 @@ toolchain_src_install() {
S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install || die
# Punt some tools which are really only useful while building gcc
- find "${D}" -name install-tools -prune -type d -exec rm -rf "{}" \;
+ find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
# This one comes with binutils
- find "${D}" -name libiberty.a -delete
+ find "${ED}" -name libiberty.a -delete
# Move the libraries to the proper location
gcc_movelibs
@@ -1733,7 +1761,7 @@ toolchain_src_install() {
if ! is_crosscompile ; then
local EXEEXT
eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log)
- [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${D}"
+ [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${ED}"
fi
dodir /etc/env.d/gcc
@@ -1795,13 +1823,13 @@ toolchain_src_install() {
cd "${S}"
if is_crosscompile; then
- rm -rf "${ED}"usr/share/{man,info}
+ rm -rf "${ED}"/usr/share/{man,info}
rm -rf "${D}"${DATAPATH}/{man,info}
else
if tc_version_is_at_least 3.0 ; then
local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man)
if [[ -d ${cxx_mandir} ]] ; then
- cp -r "${cxx_mandir}"/man? "${D}/${DATAPATH}"/man/
+ cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/
fi
fi
has noinfo ${FEATURES} \
@@ -1812,7 +1840,7 @@ toolchain_src_install() {
|| prepman "${DATAPATH#${EPREFIX}}"
fi
# prune empty dirs left behind
- find "${D}" -depth -type d -delete 2>/dev/null
+ find "${ED}" -depth -type d -delete 2>/dev/null
# install testsuite results
if use regression-test; then
@@ -1852,7 +1880,7 @@ toolchain_src_install() {
# libvtv.la: gcc itself handles linkage correctly.
# lib*san.la: Sanitizer linkage is handled internally by gcc, and they
# do not support static linking. #487550 #546700
- find "${D}/${LIBPATH}" \
+ find "${D}${LIBPATH}" \
'(' \
-name libstdc++.la -o \
-name libstdc++fs.la -o \
@@ -1918,7 +1946,7 @@ gcc_movelibs() {
# code to run on the target.
if tc_version_is_at_least 5 && is_crosscompile ; then
dodir "${HOSTLIBPATH#${EPREFIX}}"
- mv "${ED}"usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
+ mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
fi
# For all the libs that are built for CTARGET, move them into the
@@ -1968,7 +1996,7 @@ gcc_movelibs() {
for FROMDIR in ${removedirs} ; do
rmdir "${D}"${FROMDIR} >& /dev/null
done
- find -depth "${D}" -type d -exec rmdir {} + >& /dev/null
+ find -depth "${ED}" -type d -exec rmdir {} + >& /dev/null
}
# make sure the libtool archives have libdir set to where they actually
@@ -2115,7 +2143,7 @@ gcc_slot_java() {
toolchain_pkg_postinst() {
do_gcc_config
- if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
eselect compiler-shadow update all
fi
@@ -2130,17 +2158,17 @@ toolchain_pkg_postinst() {
echo
# Clean up old paths
- rm -f "${EROOT}"*/rcscripts/awk/fixlafiles.awk "${EROOT}"sbin/fix_libtool_files.sh
- rmdir "${EROOT}"*/rcscripts{/awk,} 2>/dev/null
+ rm -f "${EROOT%/}"/*/rcscripts/awk/fixlafiles.awk "${EROOT%/}"/sbin/fix_libtool_files.sh
+ rmdir "${EROOT%/}"/*/rcscripts{/awk,} 2>/dev/null
- mkdir -p "${EROOT}"usr/{share/gcc-data,sbin,bin}
+ mkdir -p "${EROOT%/}"/usr/{share/gcc-data,sbin,bin}
# DATAPATH has EPREFIX already, use ROOT with it
- cp "${ROOT}${DATAPATH}"/fixlafiles.awk "${EROOT}"usr/share/gcc-data/ || die
- cp "${ROOT}${DATAPATH}"/fix_libtool_files.sh "${EROOT}"usr/sbin/ || die
+ cp "${ROOT%/}${DATAPATH}"/fixlafiles.awk "${EROOT%/}"/usr/share/gcc-data/ || die
+ cp "${ROOT%/}${DATAPATH}"/fix_libtool_files.sh "${EROOT%/}"/usr/sbin/ || die
# Since these aren't critical files and portage sucks with
# handling of binpkgs, don't require these to be found
- cp "${ROOT}${DATAPATH}"/c{89,99} "${EROOT}"usr/bin/ 2>/dev/null
+ cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null
fi
if use regression-test ; then
@@ -2156,7 +2184,7 @@ toolchain_pkg_postinst() {
}
toolchain_pkg_postrm() {
- if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
eselect compiler-shadow clean all
fi
@@ -2167,16 +2195,16 @@ toolchain_pkg_postrm() {
# clean up the cruft left behind by cross-compilers
if is_crosscompile ; then
- if [[ -z $(ls "${EROOT}"etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
- rm -f "${EROOT}"etc/env.d/gcc/config-${CTARGET}
- rm -f "${EROOT}"etc/env.d/??gcc-${CTARGET}
- rm -f "${EROOT}"usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
+ if [[ -z $(ls "${EROOT%/}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
+ rm -f "${EROOT%/}"/etc/env.d/gcc/config-${CTARGET}
+ rm -f "${EROOT%/}"/etc/env.d/??gcc-${CTARGET}
+ rm -f "${EROOT%/}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
fi
return 0
fi
# ROOT isnt handled by the script
- [[ ${ROOT} != "/" ]] && return 0
+ [[ ${ROOT%/} ]] && return 0
if [[ ! -e ${LIBPATH}/libstdc++.so ]] ; then
# make sure the profile is sane during same-slot upgrade #289403
@@ -2209,7 +2237,7 @@ do_gcc_config() {
[[ -n ${current_specs} ]] && use_specs=-${current_specs}
if [[ -n ${use_specs} ]] && \
- [[ ! -e ${ROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]]
+ [[ ! -e ${EROOT%/}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]]
then
ewarn "The currently selected specs-specific gcc config,"
ewarn "${current_specs}, doesn't exist anymore. This is usually"