summaryrefslogtreecommitdiff
path: root/hyperrogue/PKGBUILD
blob: 8408a15a181c9dd60a54bb8cabf102c1c0e35396 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Kyle Keen <keenerd@gmail.com>
pkgname=hyperrogue
pkgver=12.1d
pkgrel=1
pkgdesc="You are a lone outsider in a strange, non-Euclidean hyperbolic world.  Optional music."
arch=('i686' 'pentium4' 'x86_64')
url="http://www.roguetemple.com/z/hyper.php"
license=('GPL2')
_pinned_dependencies=(
  'gcc-libs=12.2.0'
  'glibc>=2.31'
  'libGL.so=1'
  'sdl12-compat=1.2.60'
  'sdl_gfx=2.0.26'
  'zlib=1:1.2.13'
)
depends=('sdl_ttf' 'sdl_mixer' 'mesa' 'ttf-dejavu' "${_pinned_dependencies[@]}")
makedepends=('glu')

source=("https://github.com/zenorogue/hyperrogue/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('48cd0f1208f2a9a4f89ef06099860ec6a1aaf069b9e06dc1eb4c377cb186b70d5bf9081ee33a91aaeb743bc4704887bdb76096abe6d1972364f586e19efc26ea')

prepare() {
    cd "$srcdir/$pkgname-${pkgver}"
    sed -i 's|TTF_OpenFont.*;|TTF_OpenFont("/usr/share/fonts/TTF/DejaVuSans-Bold.ttf", siz);|' basegraph.cpp
    #sed -i 's|<SDL.h>|"SDL.h"|' /usr/include/SDL/SDL_gfxPrimitives.h  # todo: confirm bug and open
    sed -i 's|-c hyper.cpp|& -I/usr/include/SDL/|' Makefile  # remove when above bug is fixed
    sed -i 's|savepng.c|savepng.cpp|' Makefile
    sed -i 's|-Werror||' Makefile
}

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

package() {
    cd "$srcdir/$pkgname-${pkgver}"
    install -Dm755 hyperrogue "$pkgdir/usr/bin/hyperrogue"
}