summaryrefslogtreecommitdiff
path: root/libre/openttd/PKGBUILD
blob: b1abe2cb3b63a2f75248e10a9d223fd8316a7982 (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
# Maintainer (arch): Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>


# parabola changes and rationale:
#  - removed recommendation for non-free openttd-opensfx
#  - depends on individual icu libraries to prevent upgrade breakages and
#    enable Parabola to provide older icu libraries in a separate package to
#    make transition easier for Parabola contributors. See the comments in
#    the icu-*-compat PKGBUILDs for more details.


pkgname=openttd
pkgver=13.4
pkgrel=2
pkgrel+=.parabola1
pkgdesc='Engine for running Transport Tycoon Deluxe'
arch=(x86_64)
arch+=(i686 armv7h)
url='https://www.openttd.org'
license=(GPL)
depends=(fluidsynth fontconfig hicolor-icon-theme)
depends+=('libicui18n.so' 'libicuuc.so')
makedepends=(cmake ninja)
optdepends=('openttd-opengfx: free graphics')
source=("https://cdn.$pkgname.org/$pkgname-releases/$pkgver/$pkgname-$pkgver-source.tar.xz")
b2sums=('0ef635e40fe47185168bd13e4b8ce24a8ff9c4afe3eced6197298986127ee196a6dcb379643bbb1de9bb552e71cda5df5b5b35006ed2b43d6e33e8513b1cd550')


build() {
  # http://site.icu-project.org/download/61#TOC-Migration-Issues
  CXXFLAGS+=' -DU_USING_ICU_NAMESPACE=1'

  cmake \
    -B build \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_BINDIR=bin \
    -D CMAKE_INSTALL_DATADIR=/usr/share \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -G Ninja \
    -S $pkgname-$pkgver
  ninja -C build
}

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