NAME="sdl12-compat"
DESC="Simple DirectMedia Layer is a cross-platform library designed to make it easy to write multimedia software, such as games and emulators"
VERSION="1.2.64"
FILES=("https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-$VERSION/sdl12-compat-release-$VERSION.tar.gz")
HASHES=("c0ca71db831525dda0d676920c729023")
DEPENDS=("sdl2" "glu")

PACKAGE() {
  tar xf $NAME-release-$VERSION.tar.gz
  cd $NAME-release-$VERSION
  
  mkdir build
  cd    build

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=RELEASE    \
      ..
  make && make DESTDIR="$ROOTDIR" install
  rm -vf "$ROOTDIR/usr/lib/libSDLmain.a"

  cd ../.. && rm -r $NAME-release-$VERSION
}
