summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e90ed60a9ba9e89975a51115cb8708cb2999d7c7 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: fzerorubigd <fzero@rubi.gd>
# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

pkgname=openage-git
pkgver=0.6.0.r37.gbeb894520
pkgrel=2
pkgdesc="A free (as in freedom) clone of the Age of Empires II engine"
arch=(x86_64 i686 pentium4 armv7h aarch64)
url="https://openage.sft.mx/"
license=(GPL3)
depends=(libepoxy opusfile
         qt6-declarative qt6-multimedia vulkan-icd-loader
         libpng libogg nyan-lang
         python-pillow python-numpy python-toml python-mako
         python-pygments python-lz4

         # namcap implicit depends
         glibc gcc-libs zlib python gperftools harfbuzz fontconfig freetype2
         qt6-base libglvnd opus ncurses)
makedepends=(git cmake cython vulkan-headers eigen toml11 python-setuptools mold)
checkdepends=(ttf-dejavu)
optdepends=('ttf-dejavu: for text display, but you can use any font')
provides=(openage)
conflicts=(openage)
source=("git+https://github.com/SFTtech/openage.git")
sha256sums=('SKIP')

pkgver() {
  cd openage
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  #export CC="/usr/bin/gcc"
  #export CXX="/usr/bin/g++"
  #export CPP="/usr/bin/cpp"
  export LD="/usr/bin/mold"
  export LDFLAGS="-fuse-ld=mold"

  cmake -B build -S "openage" -Wno-dev \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_TESTING=ON

  cmake --build build
}

check() {
  ctest --test-dir build --output-on-failure

  cd build
  ./run.py test --run-all-tests
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}