################################################################################
#      This file is part of OpenELEC - http://www.openelec.tv
#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with OpenELEC.tv; see the file COPYING.  If not, write to
#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
#  http://www.gnu.org/copyleft/gpl.html
################################################################################

PKG_NAME="SDL"
PKG_VERSION="1.2.15"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.libsdl.org/"
PKG_URL="http://www.libsdl.org/release/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS="alsa-lib"
PKG_BUILD_DEPENDS="toolchain yasm alsa-lib"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="libsdl: A cross-platform Graphic API"
PKG_LONGDESC="Simple DirectMedia Layer is a cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of 'Civilization: Call To Power.' Simple DirectMedia Layer supports Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD."
PKG_IS_ADDON="no"

PKG_AUTORECONF="no"

if [ "$DISPLAYSERVER" = "xorg-server" ]; then
  PKG_DEPENDS="$PKG_DEPENDS libX11 libXrandr"
  PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libX11 libXrandr"
fi

if [ "$OPENGL" = "Mesa" ]; then
  PKG_DEPENDS="$PKG_DEPENDS Mesa glu"
  PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS Mesa glu"
fi

if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
  PKG_DEPENDS="$PKG_DEPENDS pulseaudio"
  PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio"
fi
