games/supertux/supertux.sh

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 1115
297b5eef115e
child 1216
6710613b88b9
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1107
diff changeset
1 #!/bin/sh
782
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 # TODO: remove tinygettext, physfs included
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
19
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGNAME=supertux
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGVERSION=0.6.0
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGREVISION=1
1107
7791d3dbfecf vanilla: consolidate licenses and many options
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
23 PKGLICENSE="GPLv30"
782
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 PKGSUMMARY="sidescroller platform game"
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 PKGDOWNLOAD="https://github.com/SuperTux/supertux/releases/download/v$PKGVERSION/SuperTux-v$PKGVERSION-Source.tar.gz"
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
26 PKGDEPENDS="libogg
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
27 libvorbis
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
28 openal-soft
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
29 cmake:build
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
30 glbinding
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
31 glew
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
32 libpng
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
33 mesa
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
34 sdl2-image
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
35 boost
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
36 sdl2
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 782
diff changeset
37 curl"
782
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
38
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 : ${CC:=clang}
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 : ${CFLAGS:=-O2}
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 : ${CXX:=clang++}
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 : ${CXXFLAGS:=-O2}
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
43
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 build()
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 {
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 rm -rf SuperTux-v$PKGVERSION-Source
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 tar xvf SuperTux-v$PKGVERSION-Source.tar.gz
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 cd SuperTux-v$PKGVERSION-Source
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
49
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 patch -p0 < ../patch-boost.patch
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 mkdir build && cd build
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 cmake .. \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 -DBUILD_SHARED_LIBS=On \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 -DCMAKE_BUILD_TYPE=Release \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 -DCMAKE_CXX_COMPILER="$CXX" \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 -DCMAKE_C_COMPILER="$CC" \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
58 -DCMAKE_C_FLAGS="$CFLAGS" \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 -DCMAKE_INSTALL_PREFIX= \
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
60 -DINSTALL_SUBDIR_DOC=/share/doc/$PKGNAME
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 make
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 make install DESTDIR=$DESTDIR
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 cd ..
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
64
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
65 cd ..
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 rm -rf SuperTux-v$PKGVERSION-Source
c1e747c056b9 games/supertux: initial import, closes #1654
David Demelier <markand@malikania.fr>
parents:
diff changeset
67 }

mercurial