blob: f44b1302221274e95199b560b408cdda3b6affa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Copyright 1999-2017 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
}
|