# Maintainer: jc_gargma # Maintainer: Maxime Gauduin # Contributor (Arch): schuay # Contributor (Arch): Jonathan Conder # Contributor (Arch): Brad Fanella # Contributor (Arch): Arkham # Contributor (Arch): Nathan Jones # Contributor (Arch): Javier "Phrodo_00" Aravena # Contributor (Arch): angvp # Contributor (Arch): Allan # Contributor (Arch): w0rm # Contributor (Arch): vEX # Contributor (Arch): Asher256 # # I maintain this because: # Arch version is out of date # Arch version lacks additional optimization and hardening flags pkgname=desmume pkgver=0.9.13 _pkgver=0_9_13 pkgrel=1.2 pkgdesc="Nintendo DS emulator" arch=('x86_64') url="https://desmume.org/" license=('GPL') # # For some reason this breaks compiling. "error: C++ compiler cannot create executables" # # But old-fashioned raw injection of -flto=auto via export doesn't. #options=(lto) depends=('alsa-lib' 'desktop-file-utils' 'glu' 'gtk2' 'libopenal.so' 'libpcap' 'sdl2' 'soundtouch' 'zlib' 'zziplib') makedepends=('intltool' 'mesa' 'meson') source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/TASEmulators/${pkgname}/archive/refs/tags/release_${_pkgver}.tar.gz") b2sums=('d63ed03801a15a3429c12b05da4ff2e4ea851a7dc307d4a4e02b6a0f74b2c4fab3a27ff14f6c563c9b84a827bb7d7db3083884154049cf8a8ffd5df6aa310e5c') build() { cd "$srcdir/${pkgname}-release_${_pkgver}/${pkgname}/src/frontend/posix/" # Prevents build failure CXXFLAGS+=" -Wno-error=format-security" # Upstream suggested export CFLAGS="$CFLAGS -fuse-linker-plugin -minline-all-stringops" export CXXFLAGS="$CXXFLAGS -fuse-linker-plugin -minline-all-stringops" # General optimizations export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" export LDFLAGS="$LDFLAGS,-pie" autoreconf -i ./configure --prefix=/usr --enable-wifi --enable-openal make } package() { cd "$srcdir/${pkgname}-release_${_pkgver}/${pkgname}/src/frontend/posix/" make DESTDIR="$pkgdir/" install }