NAME="sdl2"
DESC="Simple DirectMedia Layer Version 2"
VERSION="2.28.2"
FILES=("https://www.libsdl.org/release/SDL2-$VERSION.tar.gz")
HASHES=("06ff379c406cd8318d18f0de81ee2709")
DEPENDS=(
  "libxkbcommon" "wayland-protocols" "xorg" 
  "ibus" "pulseaudio"
)

PACKAGE() {
  tar xf SDL2-$VERSION.tar.gz
  cd SDL2-$VERSION

  ./configure --prefix=/usr
  make && pushd docs
    doxygen
  popd

  make DESTDIR="$ROOTDIR" install
  rm -v "$ROOTDIR/usr/lib/libSDL2"*.a
  
  install -v -m755 -d        "$ROOTDIR/usr/share/doc/SDL2-$VERSION/html"
  cp -Rv  docs/output/html/* "$ROOTDIR/usr/share/doc/SDL2-$VERSION/html"

  cd .. && rm -r SDL2-$VERSION
}
