Commit f97b3649 authored by mattip's avatar mattip
Browse files

replace yum with apt-get where needed

parent f645f5e6
...@@ -53,6 +53,10 @@ else ...@@ -53,6 +53,10 @@ else
else else
yum install -y libtool yum install -y libtool
fi fi
elif [[ $MB_ML_VER == "_2_24" ]]; then
if [ "${MB_PYTHON_VERSION:0:4}" == "pypy" ]; then
apt install -y wget
fi
elif [ "${MB_PYTHON_VERSION:0:4}" == "pypy" ]; then elif [ "${MB_PYTHON_VERSION:0:4}" == "pypy" ]; then
yum install -y wget yum install -y wget
fi fi
......
...@@ -133,7 +133,11 @@ function build_zlib { ...@@ -133,7 +133,11 @@ function build_zlib {
# Gives an old but safe version # Gives an old but safe version
if [ -n "$IS_MACOS" ]; then return; fi # OSX has zlib already if [ -n "$IS_MACOS" ]; then return; fi # OSX has zlib already
if [ -e zlib-stamp ]; then return; fi if [ -e zlib-stamp ]; then return; fi
yum_install zlib-devel if [[ $MB_ML_VER == "_2_24" ]]; then
apt-get install -y zlib1g-dev
else
yum_install zlib-devel
fi
touch zlib-stamp touch zlib-stamp
} }
...@@ -180,6 +184,8 @@ function get_modern_cmake { ...@@ -180,6 +184,8 @@ function get_modern_cmake {
local cmake=cmake local cmake=cmake
if [ -n "$IS_MACOS" ]; then if [ -n "$IS_MACOS" ]; then
brew install cmake > /dev/null brew install cmake > /dev/null
elif [[ $MB_ML_VER == "_2_24" ]]; then
apt-get install -y cmake
else else
if [ "`yum search cmake | grep ^cmake28\.`" ]; then if [ "`yum search cmake | grep ^cmake28\.`" ]; then
cmake=cmake28 cmake=cmake28
...@@ -396,6 +402,8 @@ function build_suitesparse { ...@@ -396,6 +402,8 @@ function build_suitesparse {
if [ -e suitesparse-stamp ]; then return; fi if [ -e suitesparse-stamp ]; then return; fi
if [ -n "$IS_MACOS" ]; then if [ -n "$IS_MACOS" ]; then
brew install suite-sparse > /dev/null brew install suite-sparse > /dev/null
elif [[ $MB_ML_VER == "_2_24" ]]; then
apt-get install -y libsuitesparse-dev > /dev/null
else else
yum_install suitesparse-devel > /dev/null yum_install suitesparse-devel > /dev/null
fi fi
......
...@@ -44,7 +44,11 @@ function activate_ccache { ...@@ -44,7 +44,11 @@ function activate_ccache {
ln -s /parent-home/.ccache $HOME/.ccache ln -s /parent-home/.ccache $HOME/.ccache
# Now install ccache # Now install ccache
suppress yum_install ccache if [[ $MB_ML_VER == "_2_24" ]]; then
suppress apt-get install -y ccache
else
suppress yum_install ccache
fi
# Create fake compilers and prepend them to the PATH # Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us, # Note that yum is supposed to create these for us,
...@@ -60,6 +64,7 @@ function activate_ccache { ...@@ -60,6 +64,7 @@ function activate_ccache {
# Prove to the developer that ccache is activated # Prove to the developer that ccache is activated
echo "Using C compiler: $(which gcc)" echo "Using C compiler: $(which gcc)"
} }
function yum_install { function yum_install {
# CentOS 5 yum doesn't fail in some cases, e.g. if package is not found # CentOS 5 yum doesn't fail in some cases, e.g. if package is not found
# https://serverfault.com/questions/694942/yum-should-error-when-a-package-is-not-available # https://serverfault.com/questions/694942/yum-should-error-when-a-package-is-not-available
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment