summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: f13a8775982decc6f4dbf91300eb2026d171ec21 (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor (Arch): Johan Rehnberg <cleanrock@gmail.com>

# # I maintain this because:
# Arch version lacks additional optimization and hardening flags

pkgname=naev
pkgver=0.7.0
pkgrel=3
pkgdesc='2D action/rpg space game'
arch=('x86_64')
url="http://sourceforge.net/projects/naev/"
license=('GPL3')
depends=('glu' 'openal' 'libvorbis' 'sdl2' 'sdl2_image' 'sdl2_mixer' 'libgl' 'libxml2' 'freetype2' 'libpng' 'libzip' 'luajit')
makedepends=('freeglut' 'zip')
source=("https://github.com/naev/naev/archive/${pkgname}-${pkgver}.tar.gz")
md5sums=('c07e24c2e87d08fdb73e666fb4e59981')

build() {
  cd "$srcdir/$pkgname-$pkgname-$pkgver"

  export CFLAGS="$CFLAGS -O3 -flto=4 -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -flto=4 -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"

  # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  CFLAGS+=' -fcommon'

  ./autogen.sh
  ./configure --prefix=/usr --disable-debug --disable-shave --with-ndata-path=/usr/share/naev/ndata
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}