You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-kernel/mips-sources/files/eblits/pkg_setup-v1.eblit

73 lines
2.3 KiB

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# Eblit to check our USE flags for machine-specific flags and give appropriate
# information, warnings, or errors to the user.
# Some machine patches are mutually-exclusive to avoid conflicts:
# Affected: ip27 ip28 ip30
# Not Affected: cobalt ip22 ip32
eblit-mips-sources-pkg_setup() {
local arch_is_selected="no"
local m_ip m_enable m_name
# See if we're on a cobalt system first (must use the cobalt-mips profile)
if use cobalt; then
arch_is_selected="yes"
[ "${DO_CBLT}" = "test" ] \
&& err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt" "test"
[ "${DO_CBLT}" = "no" ] \
&& err_disabled_mach "Cobalt Microsystems" "CBLT" "cobalt"
show_cobalt_info
fi
# Exclusive machine patchsets
# These are not allowed to be mixed together, thus only one of them may be applied
# to a tree per merge.
for x in \
"ip27 SGI Origin 200/2000" \
"ip28 SGI Indigo2 Impact R10000" \
"ip30 SGI Octane"
do
set -- ${x} # Set positional params
m_ip="${1}" # Grab the first param (HW IP for SGI)
shift # Shift the positions
m_name="${*}" # Get the rest (Name)
if use ${m_ip}; then
# Fetch the value indiciating if the machine is enabled or not
m_enable="DO_${m_ip/ip/IP}"
m_enable="${!m_enable}"
# Make sure only one of these exclusive machine patches is selected
[ "${arch_is_selected}" = "no" ] \
&& arch_is_selected="yes" \
|| err_only_one_mach_allowed
# Is the machine support disabled or marked as needing testing?
[ "${m_enable}" = "test" ] \
&& err_disabled_mach "${m_name}" "${m_ip/ip/IP}" "${m_ip}" "test"
[ "${m_enable}" = "no" ] \
&& err_disabled_mach "${m_name}" "${m_ip/ip/IP}" "${m_ip}"
# Show relevant information about the machine
show_${m_ip}_info
fi
done
# All other systems that don't have a USE flag go here
# These systems have base-line support included in linux-mips git, so
# instead of failing, if disabled, we simply warn the user
if [ "${arch_is_selected}" = "no" ]; then
[ "${DO_IP22}" = "no" ] \
&& err_disabled_mach "SGI Indy/Indigo2 R4x00" "IP22" "skip" \
|| show_ip22_info
[ "${DO_IP32}" = "no" ] \
&& err_disabled_mach "SGI O2" "IP32" "skip" \
|| show_ip32_info
fi
}