# Description: game where you must aim a bouncing ball to clear a field of bricks
# URL: http://lgames.sourceforge.net/LBreakoutHD/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: sdl2_image sdl2_mixer sdl2_ttf

name=lbreakouthd
version=1.1.9
release=1
source=(https://downloads.sourceforge.net/project/lgames/$name/$name-$version.tar.gz)

build() {
    cd $name-$version
    sed -e 's/uint /unsigned int /g' \
        -e 's/(uint)/(unsigned int)/g' \
        -i src/*.{h,cpp}

    autoreconf -ivf
    ./configure --disable-nls \
        --prefix=/usr \
        --localstatedir=/var/lib/games

    make DESTDIR=$PKG install
    rm -f $PKG/var/lib/games/lbreakouthd.hscr
    chmod 1777 $PKG/var/lib/games
}