# Maintainer : Daniel Bermond <dbermond@archlinux.org>
# Contributor: Jonathan Steel <jsteel at aur.archlinux.org>
# Contributor: Sebastian Wolf < fatmike303 at gmail dot com >
# Contributor: Guilherme Calé <gui@cabritacale.eu>

pkgname=fs-uae
pkgver=3.0.5
pkgrel=1
pkgdesc='An Amiga emulator based on UAE/WinUAE with a focus on emulating games'
arch=('x86_64')
url='https://fs-uae.net/'
license=('GPL2')
depends=('sdl2' 'glib2' 'libpng' 'openal' 'libx11' 'libmpeg2' 'zlib'
         'shared-mime-info' 'desktop-file-utils' 'hicolor-icon-theme')
optdepends=('fs-uae-launcher: for the graphical user interface')
makedepends=('freetype2' 'gettext' 'libxi' 'mesa' 'zip')
source=("https://fs-uae.net/stable/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('f26ec42e03cf1a7b53b6ce0d9845aa45bbf472089b5ec046b3eb784ec6859fe3')

build() {
    cd "${pkgname}-${pkgver}"
    
    # need to disable the jit compiler to add PIE to binaries
    ./configure --prefix='/usr' --disable-jit
    
    make 
}

package() {
    make -C "${pkgname}-${pkgver}" DESTDIR="$pkgdir" install
}
