#Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>

pkgname=sdl2_image
pkgver=2.0.0
pkgrel=2
pkgdesc="A simple library to load images of various formats as SDL surfaces (Version 2)"
arch=('i686' 'x86_64')
url="http://www.libsdl.org/projects/SDL_image"
license=('MIT')
depends=('sdl2' 'libpng' 'libtiff' 'libjpeg' 'libwebp')
makedepends=('cmake')
source=("$url/release/SDL2_image-${pkgver}.tar.gz")
sha1sums=('20b1b0db9dd540d6d5e40c7da8a39c6a81248865')

build() {
  cd "${srcdir}/SDL2_image-${pkgver}/"
  ./configure --disable-static --prefix=/usr
  make
}

package() {
  cd "${srcdir}/SDL2_image-${pkgver}/"

  make DESTDIR="${pkgdir}/" install
  install -Dm644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
