summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/mips-sources/files/eblits/pkg_setup-v2.eblit')
-rw-r--r--sys-kernel/mips-sources/files/eblits/pkg_setup-v2.eblit62
1 files changed, 62 insertions, 0 deletions
diff --git a/sys-kernel/mips-sources/files/eblits/pkg_setup-v2.eblit b/sys-kernel/mips-sources/files/eblits/pkg_setup-v2.eblit
new file mode 100644
index 000000000000..3ee357fefc6d
--- /dev/null
+++ b/sys-kernel/mips-sources/files/eblits/pkg_setup-v2.eblit
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 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: ip22 ip32
+
+eblit-mips-sources-pkg_setup() {
+ local arch_is_selected="no"
+ local m_ip m_enable m_name
+
+ # 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
+}