Commit 9d7470ff authored by Jussi Lindgren's avatar Jussi Lindgren

Merge branch 'wip-jlindgre-fix-ubuntu1604' of...

Merge branch 'wip-jlindgre-fix-ubuntu1604' of git+ssh://scm.gforge.inria.fr//gitroot/openvibe/openvibe into release-1.2.1-bugfixes
parents 997f9653 1773ab6c
......@@ -24,18 +24,18 @@ ENDIF(WIN32)
IF(UNIX)
INCLUDE("FindPkgConfig")
SET(CEGUI_FOUND "-NOTFOUND")
pkg_check_modules(CEGUI CEGUI)
pkg_check_modules(CEGUI QUIET CEGUI)
IF(NOT CEGUI_FOUND)
# we have this mess as the cegui filenames & paths are different on Fedora 21 at least,
# and the include_dirs doesn't contain the CEGUI/ part ... I'd put that to the .h/.cpp IF the same path
# convention was the case on all platforms... but it is not
pkg_check_modules(CEGUI CEGUI-0)
pkg_check_modules(CEGUI QUIET CEGUI-0)
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
ENDIF(NOT CEGUI_FOUND)
SET(OgreCEGUIRenderer_FOUND "-NOTFOUND")
pkg_check_modules(OgreCEGUIRenderer CEGUI-OGRE)
pkg_check_modules(OgreCEGUIRenderer QUIET CEGUI-OGRE)
IF(NOT OgreCEGUIRenderer_FOUND)
pkg_check_modules(OgreCEGUIRenderer CEGUI-0-OGRE)
pkg_check_modules(OgreCEGUIRenderer QUIET CEGUI-0-OGRE)
ENDIF(NOT OgreCEGUIRenderer_FOUND)
ENDIF(UNIX)
......
......@@ -14,6 +14,7 @@
#include <boost/thread.hpp>
#include <boost/thread/condition.hpp>
#include <boost/version.hpp>
#include <boost/scoped_ptr.hpp>
#include <sys/timeb.h>
......
......@@ -6,6 +6,7 @@
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/config.hpp>
#include <boost/scoped_ptr.hpp>
using namespace std;
......
......@@ -350,23 +350,68 @@ echo ""
## ##
####################################
version_greater() {
expr "$1" = "`echo -e "$1\n$2" | sort -n | tail -n1`" 2>/dev/null
}
if [[ ! -e "$ov_target_folder_hit/no-native-packages.hit" ]]; then
echo "Checking native dependencies..."
if [[ "`grep -E 'Ubuntu|LinuxMint' /etc/lsb-release 2> /dev/null`" != "" || "`grep -E 'Raspbian' /etc/os-release 2> /dev/null`" != "" || "`grep Debian /etc/issue 2> /dev/null`" != "" ]]; then
[[ -z `grep -E 'Debian' /etc/issue 2> /dev/null` ]] ; is_debian=$?
[[ -z `grep -E 'Ubuntu' /etc/lsb-release 2> /dev/null` ]] ; is_ubuntu=$?
[[ -z `grep -E 'LinuxMint' /etc/lsb-release 2> /dev/null` ]] ; is_mint=$?
[[ -z `grep -E 'Raspbian' /etc/os-release 2> /dev/null` ]] ; is_raspbian=$?
if [[ $is_debian -eq 1 || $is_ubuntu -eq 1 || $is_raspbian -eq 1 || $is_mint -eq 1 ]]; then
echo " You are currently running a Debian/Ubuntu based distribution"
ov_native_package_installed=true
ov_native_package_log_file="$ov_target_folder_log/native-packages.log"
ov_ubuntu_version=`lsb_release -r -s 2>/dev/null`
if [[ `expr $ov_ubuntu_version \>= 14.04` == 1 ]]; then
# at the time of writing this, there was a conflict between libogre-dev and libboost-thread-dev dependencies in 13.10 and 14.04
echo " Ubuntu $ov_ubuntu_version detected, suggesting specific set of packages..."
ov_lib_ogre_dev=libogre-1.8-dev
ov_lib_libboost_chrono_dev=libboost-chrono1.54-dev
else
ov_distro_version=`lsb_release -r -s 2>/dev/null`
echo " Found distro version $ov_distro_version ..."
# Different distros and versions might need slightly different packages
if [[ $is_ubuntu -eq 1 ]]; then
if [[ `version_greater $ov_distro_version 16.04` == 1 ]]; then
echo " Ubuntu >= v16.04 detected, guessing specific set of packages..."
ov_lib_ogre_dev=libogre-1.9-dev
ov_lib_libboost_chrono_dev=libboost-chrono1.58-dev
elif [[ `version_greater $ov_distro_version 14.04` == 1 ]]; then
echo " Ubuntu >= v14.04 detected, guessing specific set of packages..."
ov_lib_ogre_dev=libogre-1.8-dev
ov_lib_libboost_chrono_dev=libboost-chrono1.54-dev
else
echo " Ubuntu seems older than v14.04 ..."
ov_lib_ogre_dev=libogre-dev
ov_lib_libboost_chrono_dev=
fi;
fi;
if [[ $is_debian -eq 1 ]]; then
if [[ `version_greater $ov_distro_version 8` == 1 ]]; then
echo " Debian >= v8 detected, guessing specific set of packages..."
# although 1.9 is available, it doesn't seem to play well together with cegui, so we use 1.8 ...
ov_lib_ogre_dev=libogre-1.8-dev
ov_lib_libboost_chrono_dev=libboost-chrono1.55-dev
else
echo " Debian seems older than v8 ..."
ov_lib_ogre_dev=libogre-dev
ov_lib_libboost_chrono_dev=
fi
fi;
if [[ $is_mint -eq 1 ]]; then
# hack the correct versions here...
echo " Mint detected, guessing specific set of packages..."
ov_lib_ogre_dev=libogre-dev
ov_lib_libboost_chrono_dev=
fi;
fi
if [[ $is_raspbian -eq 1 ]]; then
# hack the correct versions here...
echo " Raspbian detected, guessing specific set of packages..."
ov_lib_ogre_dev=libogre-dev
ov_lib_libboost_chrono_dev=
fi
ov_ubuntu_packages="wget doxygen make automake autoconf cmake unzip gcc g++ libgtk2.0-dev libglade2-dev gfortran libgsl0-dev libexpat1-dev libreadline-dev libzzip-dev libtool libxaw7-dev libpcre3-dev libfreeimage-dev libglu1-mesa-dev libalut-dev libvorbis-dev libncurses5-dev python-dev python-numpy libeigen3-dev $ov_lib_ogre_dev libcegui-mk2-dev libois-dev libboost-dev libboost-thread-dev liblua5.1-0-dev libboost-regex-dev libboost-filesystem-dev $ov_lib_libboost_chrono_dev libitpp-dev sqlite libsqlite0-dev libfftw3-dev"
for package in $ov_ubuntu_packages; do
......@@ -382,7 +427,6 @@ if [[ ! -e "$ov_target_folder_hit/no-native-packages.hit" ]]; then
done;
if [[ $ov_native_package_installed == false ]]; then
echo " You are currently running a Debian/Ubuntu based distribution"
echo ""
echo " Root access is required to install needed packages."
echo ""
......@@ -521,7 +565,7 @@ ov_package_url_itpp=http://openvibe.inria.fr/dependencies/linux-x86/itpp-4.0.7.t
ov_package_url_vrpn=http://openvibe.inria.fr/dependencies/linux-x86/vrpn_07_31-ov.zip
# LabStreamingLayer
ov_package_url_liblsl=http://openvibe.inria.fr/dependencies/linux-x86/liblsl-1.04-src.tar.bz2
ov_package_url_liblsl=http://openvibe.inria.fr/dependencies/linux-x86/liblsl-1.04.ov1-src.tar.bz2
##############################################
## ##
......
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