# Maintainer: jc_gargma # Maintainer (Arch): Jaroslav Lichtblau # Maintainer (Arch): Carl Smedstad # Contributor (Arch): Eric Bélanger # # I maintain this because: # Arch version lacks additional optimization and hardening flags # Arch version broken with arch-style lto pkgname=lincity-ng pkgver=2.11.1 pkgrel=1 pkgdesc="A city simulation game" arch=('x86_64') url="https://github.com/lincity-ng/lincity-ng" license=( 'CC-BY-SA-2.0' 'GPL-2.0-or-later' 'LicenseRef-ArevFontsCopyright' 'LicenseRef-BitstreamVeraFontsCopyright' ) depends=( 'gcc-libs' 'glibc' 'hicolor-icon-theme' 'libglvnd' 'libxml2' 'physfs' 'sdl2' 'sdl2_gfx' 'sdl2_image' 'sdl2_mixer' 'sdl2_ttf' 'zlib' ) makedepends=( 'cmake' 'libxslt' ) # # 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) source=(https://github.com/lincity-ng/lincity-ng/archive/$pkgname-$pkgver.tar.gz) sha256sums=('536eae1bc4f7a7a42ab330f9650d3608ae963e3464177068c4d8a9ce916e9f42') b2sums=('a54c38f60be1b4ac0b6cb9f3e082fbab3bba58cb22fc40abb02ce54d5f25705f6620ebf3c470f665fd96b299bf116867b324bdcbb36619bc321f379fc182e240') build() { cd ${pkgname}-${pkgname}-${pkgver} export CFLAGS="$CFLAGS -O3 -fPIE -flto=auto" export CXXFLAGS="$CXXFLAGS -O3 -fPIE -flto=auto" export LDFLAGS="$LDFLAGS,-pie" cmake -S . -B build \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -Wno-dev cmake --build build } package() { cd ${pkgname}-${pkgname}-${pkgver} DESTDIR="$pkgdir" cmake --install build install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" COPYING-data.txt install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" COPYING-fonts.txt }