Move require_distro out from PyPy build definitions

This commit is contained in:
Yamashita Yuu 2014-11-29 09:11:36 +09:00
parent c0aff27842
commit afcf4f0c7c
12 changed files with 15 additions and 132 deletions

View file

@ -1096,6 +1096,21 @@ require_java() {
export JAVA="$java"
}
require_distro() {
for arg; do
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "$1"* ]]; then
return 0
fi
done
{ echo
colorize 1 "WARNING"
echo ": This binary distribution is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
}
needs_yaml() {
[[ "$RUBY_CONFIGURE_OPTS" != *--with-libyaml-dir=* ]] &&
! use_homebrew_yaml

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true

View file

@ -1,15 +1,3 @@
require_distro() {
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
{ echo
colorize 1 "WARNING"
echo ": The binary distribution of PyPy is built for $1."
echo "installed binary may not run expectedly on other platforms."
echo
} >&2
return 1
fi
}
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 10.04" || true