# Maintainer: jc_gargma # Maintainer (Arch): George Rawlinson # Contributor: (AUR): Dimitris Kiziridis # Contributor (AUR): Christian Krause ("wookietreiber") # # I maintain this because: # AUR version lacks additional optimization and hardening flags _isaarch64=0 pkgname=freeorion pkgver=0.4.10.2 pkgrel=6 pkgdesc='A turn-based space empire and galactic conquest game' url='https://www.freeorion.org' arch=('x86_64' 'i686' 'aarch64') license=('GPL2') options=(lto) depends=( 'boost-libs' 'python' 'sdl2' 'libvorbis' 'glew' 'openal' 'hicolor-icon-theme' 'freetype2' ) makedepends=( 'cmake' 'boost' ) conflicts=('freeorion-git' 'freeorion-bin') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/freeorion/freeorion/archive/v${pkgver}.tar.gz") sha512sums=('13832992efe17fe48615ccdf284d1e9f391c35ed518abd15276992128a02894f4b30c8fe3d950e41935efb823cf834dc430330f0bcc6c9e91f13a3dea9812628') b2sums=('4f707b5296bdbc05b2b775b62f0393d1770bcf64c48f08d3332fbbb4b78e1bdc3e8111a1e421a8d0f0e03ca7454bba981809b9486d3d803e39faf042f1145059') build() { cd "${srcdir}/${pkgname}-${pkgver}" # PIE breaks compiling # aarch64 is prone to oom if [ "${_isaarch64}" == "1" ]; then export CFLAGS="$(echo $CFLAGS | sed 's/ -pipe//' - )" export CXXFLAGS="$(echo $CXXFLAGS | sed 's/ -pipe//' - )" export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=1" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=1" export MAKEFLAGS="-j1" else export CFLAGS="$CFLAGS -O3 -fstack-protector-all" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all" fi cmake \ -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release cmake --build build } package() { cd "${srcdir}/${pkgname}-${pkgver}" DESTDIR="$pkgdir" cmake --install build }