/
Portfile
107 lines (80 loc) · 3.11 KB
/
Portfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
name ufo-ai
version 2.5
revision 0
homepage https://ufoai.org
description \
UFO: Alien Invasion is a squad-based tactical strategy game in the \
tradition of the old X-COM PC games.
long_description {*}${description}
categories games
installs_libs no
license GPL-2 MIT public-domain permissive
maintainers {gmail.com:herby.gillot @herbygillot} \
openmaintainer
master_sites sourceforge:ufoai
use_bzip2 yes
distname ufoai-${version}-source
distfiles ${distname}${extract.suffix}:gamesrc \
ufoai-${version}-data.tar:gamedata
checksums ${distname}${extract.suffix} \
rmd160 4a60a9f69c7b046378719ca0ae7d0c83da75de06 \
sha256 0c7cc3bc9efeb276f71cbe6ee8ff7c76f98d183de79f1a069fa63059cf182a8f \
size 24239539 \
ufoai-${version}-data.tar \
rmd160 b4a758b2267865cfd35e3cedb62aa2ad04204bb2 \
sha256 5e706a424aff6a2ea30a4c798129d6304e897387eadf808528129b512b7dcdb0 \
size 1277143040
compiler.cxx_standard \
2011
depends_build-append \
port:gawk \
port:gettext \
port:grep \
port:gsed \
port:pkgconfig
depends_lib-append path:include/AL/al.h:openal-soft \
port:curl \
port:gettext-runtime \
port:jpeg \
port:libpng \
port:libsdl2 \
port:libsdl2_mixer \
port:libsdl2_ttf \
port:libtheora \
port:p7zip \
port:python27 \
port:XviD \
port:zlib
post-extract {
file mkdir ${workpath}/gamedata
system -W ${workpath} \
"/usr/bin/tar -C gamedata -xf ${distpath}/ufoai-${version}-data.tar"
}
patch.pre_args-replace -p0 -p1
patchfiles-append patch-bug-5345.diff \
patch-bug-5336.diff
set game_share_dir ${prefix}/share/${name}
configure.args-append \
--datadir=${game_share_dir} \
--enable-release
platform darwin {
configure.args-append \
--target-os=darwin
}
build.target all lang
use_parallel_build no
destroot {
# Install binaries
foreach gamebin {ufo ufo2map ufoded ufomodel ufoslicer} {
xinstall -m 0775 ${worksrcpath}/${gamebin} ${destroot}${prefix}/bin/
}
# Install game data
xinstall -d ${destroot}${game_share_dir}/base
copy {*}[glob ${workpath}/gamedata/base/*] \
${destroot}${game_share_dir}/base/
copy {*}[glob ${worksrcpath}/base/*] \
${destroot}${game_share_dir}/base/
}
notes "Run ${prefix}/bin/ufo to start UFO: Alien Invasion"