Skip to content
Snippets Groups Projects
Commit c81b8e16 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing installation on fresh Fedora 23

parent aaa99091
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,7 @@ echo -e "\033[1;34;5mDEPENCENCIES INSTALLATION DIR \033[0m"
echo -e "Every required dependencies if needed will be installed into: \033[1;34;5m$i_dir\033[0m"
echo -e "if you want to install somewhere else do ./install -i /somewhere/else"
if [ $sq -eq 0 ]; then
unset commands
commands[0]="Continue"
possible_solutions "${commands[@]}"
fi
......
......@@ -53,7 +53,7 @@ function detect_gcc_or_clang()
fi
$1 --version | grep $1
if [ $? == 0 -a x"$1" == x"gcc" ]; then
if [ $? == 0 -a x"$1" == x"g++" ]; then
dgc_major=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
......
......@@ -50,6 +50,26 @@ if [ x"$platform" = x"linux" -a x"$pcman" = x"sudo apt-get" ]; then
fi
fi
### Additional package required for yum based distros
if [ x"$platform" = x"linux" -a x"$pcman" = x"yum" ]; then
rpm -V bzip2-devel
ret1=$?
rpm -V python-devel
ret2=$?
rpm -V libxml2-devel
ret3=$?
rpm -V libxslt-devel
ret4=$?
if [ $ret1 -ne 0 -o $ret2 -ne 0 -o $ret3 -ne 0 -o $ret4 -ne 0 ]; then
echo "OpenFPM require additional packages in order to install correctly"
commands[0]="su -c \"$pcman install bzip2-devel python-devel libxml2-devel libxslt-devel\""
commands[1]="sudo $pcman install bzip2-devel python-devel libxml2-devel libxslt-devel"
possible_solutions "${commands[@]}"
echo "Executing: ${command[$possible_solutions_ret]}"
eval ${commands[$possible_solutions_ret]}
fi
fi
command -v cmake >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo >&2
......@@ -161,10 +181,10 @@ fi
#### Detecting g++
detect_gcc_or_clang gcc
detect_gcc_or_clang g++
if [ $dgc_ret -eq 0 ]; then
solve_gpp $platform
detect_gcc_or_clang gcc-4.9
detect_gcc_or_clang $compiler_gpp
if [ $dgc_ret -eq 0 ]; then
exit 1
fi
......
......@@ -19,6 +19,14 @@ if [ x"$1" = x"osx" ]; then
compiler_opt=" CXX=g++-4.9 CC=gcc-4.9 "
compiler_gcc="gcc-4.9"
compiler_gpp="g++-4.9"
elif [ x"$1" = x"linux" ]; then
commands[0]="su -c \"$pcman install gcc-c++\""
commands[1]="sudo $pcman install gcc-c++"
possible_solutions "${commands[@]}"
echo "Executing: ${command[$possible_solutions_ret]}"
eval ${commands[$possible_solutions_ret]}
compiler_gcc="gcc"
compiler_gpp="g++"
fi
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment