# Maintainer: jc_gargma # Maintainer (Arch): Alexander F Rødseth # Contriutor (Arch): Eric Belanger # Contributor (Arch): Jo Christian Bergskås # # I maintain this because: # Arch version lacks additional optimization and hardening flags # Arch version uses git pkgname=fceux pkgver=2.6.6 pkgrel=2 url='https://fceux.com/' pkgdesc='Fast and ultra-compatible NES/Famicom emulator' arch=(x86_64) license=(GPL) options=('lto') depends=(gd lua minizip qt5-base sdl2) makedepends=(cmake glu mesa-libgl ninja) optdepends=('ffmpeg: for recording') source=(fceux-${pkgver}.tar.gz::"https://github.com/TASEmulators/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz") b2sums=('4d7779af0afc5fa12d3734d282f92b105757d204c69091b4e3574e4ced6179c5e202b752225f412d68331c9866c63b626703b014835d398ca1262deeb0d32654') build() { cd ${pkgname}-${pkgver} # -fPIC is required to build export CFLAGS="$CFLAGS -O3 -fPIC" export CXXFLAGS="$CXXFLAGS -O3 -fPIC" mkdir -p build cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -G Ninja ninja "$MAKEFLAGS" } package() { cd ${pkgname}-${pkgver} DESTDIR="$pkgdir" ninja -C build install install -d "${pkgdir}/usr/share/doc/${pkgname}" cp -r ${srcdir}/${pkgname}-${pkgver}/documentation/* "${pkgdir}/usr/share/doc/${pkgname}/" install -Dm644 ${srcdir}/${pkgname}-${pkgver}/changelog.txt \ "$pkgdir/usr/share/doc/$pkgname/changelog.txt" }