#!/bin/bash

#
# install-dependencies-zypper
#
# Copyright (C) 2009-11 by RStudio, Inc.
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

set -e

# build/development tools
sudo zypper --non-interactive in make
sudo zypper --non-interactive in gcc
sudo zypper --non-interactive in gcc-c++
sudo zypper --non-interactive in gcc-fortran
sudo zypper --non-interactive in build
sudo zypper --non-interactive in cmake

# core system libraries
sudo zypper --non-interactive in libbz2-devel
sudo zypper --non-interactive in libuuid-devel
sudo zypper --non-interactive in libopenssl-devel
sudo zypper --non-interactive in pam-devel

# boost
sudo zypper --non-interactive in boost-devel

# pango cairo
sudo zypper --non-interactive in pango-devel

# gwt prereqs
sudo zypper --non-interactive in java-1_6_0-openjdk-devel
sudo zypper --non-interactive in ant

# gwt
cd ../common
./install-gwt
cd ../linux

# desktop dependencies (qt)
if [ "$1" != "--server-only" ]
then
   sudo zypper --non-interactive in libqt4-devel
   sudo zypper --non-interactive in libQtWebKit-devel
fi



