blob: 2f499bf854d1ae4b279c821cb4af5f408ee2f0ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR): Dimitris Kiziridis <ragouel at outlook dot com>
# Contributor (AUR): Christian Krause ("wookietreiber") <christian.krause@mailbox.org>
# # I maintain this because:
# AUR version lacks additional optimization and hardening flags
_isaarch64=0
pkgname=freeorion
pkgver=0.4.10
pkgrel=1
pkgdesc='A free, Open Source, turn-based space empire and galactic conquest computer game'
url='https://www.freeorion.org/'
arch=('i686' 'x86_64' 'aarch64')
license=('GPL2')
depends=('boost-libs'
'python'
'sdl2'
'libvorbis'
'glew'
'openal'
'hicolor-icon-theme'
'freetype2')
makedepends=('boost' 'cmake')
conflicts=('freeorion-git' 'freeorion-bin')
if [ "${_isaarch64}" == "1" ]; then
options=(!makeflags)
fi
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/freeorion/freeorion/archive/v${pkgver}.tar.gz")
b2sums=('a32716618372629c42499bd96d0877d2d3e79122e3bdc081acd8cbcb8e797be8ef44faea66cf0cb4e1d9331ae7b20fcb2fbecd71c52aa9feb5ca39b24662aedd')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
mkdir -p build
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}/build"
# 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"
else
export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4"
export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4"
fi
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
..
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"/build
make DESTDIR="${pkgdir}" install
}
|