# 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.5 pkgrel=1 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=('e35119760e52e251a40c4a818e40530f5be1947705651e52173e557263e9debe963e9dd4742ab7937c78cd197c8e2630cfa6dc729f424e13a8a7bbce5e792d67') b2sums=('439a9c9c6c94d75b47b22e65a6e4cd63b3fe2a0494711cc74c5efd919c3f5dd6241356dfe465a5aa5294adc2722ab8b72b05e483c17ab408f996e93fddea2c1f') 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 }