2012-12-21 23:59:35 +04:00
|
|
|
# auto-install dependency packages using the systems package manager.
|
|
|
|
# after running this, run ./script/check-dependencies.sh. see README.md
|
2012-12-22 03:23:33 +04:00
|
|
|
#
|
2014-02-02 19:57:53 +04:00
|
|
|
# this assumes you have sudo installed and running, or are running as root.
|
2012-12-22 03:23:33 +04:00
|
|
|
#
|
2012-12-05 08:18:12 +04:00
|
|
|
|
|
|
|
get_fedora_deps()
|
|
|
|
{
|
2014-02-02 19:57:53 +04:00
|
|
|
yum install qt-devel bison flex eigen3-devel python-paramiko \
|
2013-06-07 23:24:07 +04:00
|
|
|
boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc gcc-c++ pkgconfig \
|
2013-12-05 10:56:54 +04:00
|
|
|
opencsg-devel git libXmu-devel curl imagemagick ImageMagick glib2-devel make \
|
2013-06-07 23:24:07 +04:00
|
|
|
xorg-x11-server-Xvfb
|
2013-02-19 05:45:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
get_qomo_deps()
|
|
|
|
{
|
|
|
|
get_fedora_deps
|
2012-12-05 08:18:12 +04:00
|
|
|
}
|
|
|
|
|
2012-12-24 01:12:27 +04:00
|
|
|
get_altlinux_deps()
|
|
|
|
{
|
2012-12-24 02:01:40 +04:00
|
|
|
for i in boost-devel boost-filesystem-devel gcc4.5 gcc4.5-c++ boost-program_options-devel \
|
2013-11-11 02:43:46 +04:00
|
|
|
boost-thread-devel boost-system-devel boost-regex-devel eigen3 libmpfr libgmp libgmp_cxx-devel qt4-devel libcgal-devel git-core \
|
2014-02-02 19:57:53 +04:00
|
|
|
libglew-devel flex bison curl imagemagick glib2-devel; do apt-get install $i; done
|
2012-12-24 01:12:27 +04:00
|
|
|
}
|
|
|
|
|
2012-12-05 08:18:12 +04:00
|
|
|
get_freebsd_deps()
|
|
|
|
{
|
2013-11-11 02:43:46 +04:00
|
|
|
pkg_add -r bison boost-libs cmake git bash eigen3 flex gmake gmp mpfr \
|
2012-12-22 02:44:45 +04:00
|
|
|
xorg libGLU libXmu libXi xorg-vfbserver glew \
|
|
|
|
qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic \
|
2013-12-05 10:56:54 +04:00
|
|
|
opencsg cgal curl imagemagick glib2-devel
|
2012-12-22 02:44:45 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
get_netbsd_deps()
|
|
|
|
{
|
2014-02-02 19:57:53 +04:00
|
|
|
pkgin install bison boost cmake git bash eigen flex gmake gmp mpfr \
|
2013-06-09 08:49:21 +04:00
|
|
|
qt4 glew cgal opencsg modular-xorg python27 py27-paramiko curl \
|
2013-12-05 10:56:54 +04:00
|
|
|
imagemagick ImageMagick glib2-devel
|
2012-12-05 08:18:12 +04:00
|
|
|
}
|
|
|
|
|
2012-12-21 17:36:36 +04:00
|
|
|
get_opensuse_deps()
|
|
|
|
{
|
2014-02-02 19:57:53 +04:00
|
|
|
zypper install libeigen3-devel mpfr-devel gmp-devel boost-devel \
|
2013-12-05 10:56:54 +04:00
|
|
|
libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel curl \
|
|
|
|
glib2-devel
|
2012-12-21 17:36:36 +04:00
|
|
|
}
|
2012-12-05 08:18:12 +04:00
|
|
|
|
2012-12-21 23:59:35 +04:00
|
|
|
get_mageia_deps()
|
|
|
|
{
|
2014-02-02 19:57:53 +04:00
|
|
|
urpmi ctags
|
|
|
|
urpmi task-c-devel task-c++-devel libqt4-devel libgmp-devel \
|
2012-12-24 01:12:27 +04:00
|
|
|
libmpfr-devel libboost-devel eigen3-devel libglew-devel bison flex \
|
2013-12-05 10:56:54 +04:00
|
|
|
cmake imagemagick glib2-devel python curl git x11-server-xvfb
|
2012-12-21 23:59:35 +04:00
|
|
|
}
|
|
|
|
|
2012-12-05 08:18:12 +04:00
|
|
|
get_debian_deps()
|
|
|
|
{
|
2012-12-22 03:01:19 +04:00
|
|
|
for pkg in build-essential libqt4-dev libqt4-opengl-dev \
|
|
|
|
libxmu-dev cmake bison flex git-core libboost-all-dev \
|
2013-11-16 00:48:43 +04:00
|
|
|
libXi-dev libmpfr-dev libboost-dev libglew-dev \
|
2013-03-04 04:10:12 +04:00
|
|
|
libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \
|
2013-12-05 10:56:54 +04:00
|
|
|
python-paramiko curl imagemagick libglib2.0-dev; do
|
2014-02-02 19:57:53 +04:00
|
|
|
apt-get -y install $pkg;
|
2012-12-22 03:01:19 +04:00
|
|
|
done
|
2012-12-05 08:18:12 +04:00
|
|
|
}
|
|
|
|
|
2012-12-22 03:23:33 +04:00
|
|
|
unknown()
|
|
|
|
{
|
|
|
|
echo "Unknown system type. Please install the dependency packages listed"
|
|
|
|
echo "in README.md using your system's package manager."
|
|
|
|
}
|
2012-12-22 02:44:45 +04:00
|
|
|
|
|
|
|
if [ -e /etc/issue ]; then
|
|
|
|
if [ "`grep -i ubuntu /etc/issue`" ]; then
|
|
|
|
get_debian_deps
|
|
|
|
elif [ "`grep -i debian /etc/issue`" ]; then
|
|
|
|
get_debian_deps
|
2014-01-04 01:03:13 +04:00
|
|
|
elif [ "`grep -i raspbian /etc/issue`" ]; then
|
|
|
|
get_debian_deps
|
2013-06-07 23:07:50 +04:00
|
|
|
elif [ "`grep -i mint /etc/issue`" ]; then
|
|
|
|
get_debian_deps
|
2012-12-22 02:44:45 +04:00
|
|
|
elif [ "`grep -i suse /etc/issue`" ]; then
|
|
|
|
get_opensuse_deps
|
|
|
|
elif [ "`grep -i fedora /etc/issue`" ]; then
|
|
|
|
get_fedora_deps
|
2012-12-22 03:23:33 +04:00
|
|
|
elif [ "`grep -i red.hat /etc/issue`" ]; then
|
2012-12-22 02:44:45 +04:00
|
|
|
get_fedora_deps
|
|
|
|
elif [ "`grep -i mageia /etc/issue`" ]; then
|
|
|
|
get_mageia_deps
|
2013-02-19 05:45:37 +04:00
|
|
|
elif [ "`grep -i qomo /etc/issue`" ]; then
|
|
|
|
get_qomo_deps
|
2012-12-24 01:12:27 +04:00
|
|
|
elif [ "`command -v rpm`" ]; then
|
|
|
|
if [ "`rpm -qa | grep altlinux`" ]; then
|
|
|
|
get_altlinux_deps
|
|
|
|
fi
|
2013-02-19 05:45:37 +04:00
|
|
|
else
|
|
|
|
unknown
|
2012-12-22 02:44:45 +04:00
|
|
|
fi
|
|
|
|
elif [ "`uname | grep -i freebsd `" ]; then
|
2012-12-05 08:18:12 +04:00
|
|
|
get_freebsd_deps
|
2012-12-22 02:44:45 +04:00
|
|
|
elif [ "`uname | grep -i netbsd`" ]; then
|
|
|
|
get_netbsd_deps
|
2012-12-05 08:18:12 +04:00
|
|
|
else
|
2012-12-22 03:23:33 +04:00
|
|
|
unknown
|
2012-12-05 08:18:12 +04:00
|
|
|
fi
|
|
|
|
|