blob: a71a2d1e1508c71a26008606fb2974fe03fbc77c (
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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
# $FreeBSD$
PORTNAME= wesnoth
PORTVERSION= 1.10.7
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}/${PORTNAME}-${PORTVERSION} \
http://files.wesnoth.org/
MAINTAINER= rnejdl@ringofsaturn.com
COMMENT= Fantasy turn-based strategy game
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/lib/X11/fonts/junicode/Junicode.ttf:${PORTSDIR}/x11-fonts/junicode
LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libpng.so:${PORTSDIR}/graphics/png
USE_SDL= image mixer net ttf
USE_GNOME= pango
USES= cmake desktop-file-utils pkgconfig tar:bzip2
CMAKE_ARGS= -DMANDIR="man"
MAN6= wesnoth.6
PORTDOCS= *
PORTDATA= *
OPTIONS_DEFINE= ANA CAMPAIGN FRIBIDI LOWMEM NOTIFY OPENMP POOLALLOC PYTHON \
RAWSOCKETS SERVER TESTS TOOLS DOCS
OPTIONS_DEFAULT= CAMPAIGN FRIBIDI NOTIFY SERVER TOOLS
ANA_DESC= Asynchronous Network API (WIP)
CAMPAIGN_DESC= Campaign server
FRIBIDI_DESC= Bidirectional support
LOWMEM_DESC= Reduce memory usage (disables animations)
NOTIFY_DESC= Desktop notifications
OPENMP_DESC= OpenMP support
POOLALLOC_DESC= Use wesnoth own memory allocator
PYTHON_DESC= Python developer tools
RAWSOCKETS_DESC= Use raw receiving sockets in multiplayer
SERVER_DESC= Server
TESTS_DESC= Unit tests
TOOLS_DESC= Extra tools for artists and translators
.include <bsd.port.options.mk>
# XXX: breaks compilation because of -Werror
.if empty(PORT_OPTIONS:MSTRICT)
CMAKE_ARGS+= -DENABLE_STRICT_COMPILATION=off
.endif
.if ${PORT_OPTIONS:MANA}
CMAKE_ARGS+= -DUSE_ANA_NETWORK=on
.else
CMAKE_ARGS+= -DUSE_ANA_NETWORK=off
.endif
.if ${PORT_OPTIONS:MCAMPAIGN}
CMAKE_ARGS+= -DENABLE_CAMPAIGN_SERVER=on
PLIST_SUB+= CAMPAIGN=""
.else
CMAKE_ARGS+= -DENABLE_CAMPAIGN_SERVER=off
PLIST_SUB+= CAMPAIGN="@comment "
.endif
.if ${PORT_OPTIONS:MFRIBIDI}
CMAKE_ARGS+= -DENABLE_FRIBIDI=on
LIB_DEPENDS+= libfribidi.so:${PORTSDIR}/converters/fribidi
.else
CMAKE_ARGS+= -DENABLE_FRIBIDI=off
.endif
.if ${PORT_OPTIONS:MLOWMEM}
CMAKE_ARGS+= -DENABLE_LOW_MEM=on
.else
CMAKE_ARGS+= -DENABLE_LOW_MEM=off
.endif
.if ${PORT_OPTIONS:MNOTIFY}
CMAKE_ARGS+= -DENABLE_NOTIFICATIONS=on
LIB_DEPENDS+= libdbus-1.so:${PORTSDIR}/devel/dbus
.else
CMAKE_ARGS+= -DENABLE_NOTIFICATIONS=off
.endif
.if ${PORT_OPTIONS:MNLS}
CMAKE_ARGS+= -DENABLE_NLS=on -DLOCALEDIR=${PREFIX}/share/locale
USES+= gettext
MANLANG= "" cs de en_GB es et fi fr gl hu id it lt pl ru sk \
sr sr@ijekavian sr@ijekavianlatin sr@latin vi zh_CN zh_TW
.if ${PORT_OPTIONS:MSERVER}
_MANPAGES+= ${PREFIX}/man/ja/man6/wesnothd.6 \
${PREFIX}/man/pt_BR/man6/wesnothd.6 \
${PREFIX}/man/tr/man6/wesnothd.6
.endif
PLIST_SUB+= NLS=""
.else
CMAKE_ARGS+= -DENABLE_NLS=off
PLIST_SUB+= NLS="@comment "
.endif
.if ${PORT_OPTIONS:MOPENMP}
CMAKE_ARGS+= -DENABLE_OMP=on
.else
CMAKE_ARGS+= -DENABLE_OMP=off
.endif
.if ${PORT_OPTIONS:MPOOLALLOC}
CMAKE_ARGS+= -DENABLE_POOL_ALLOC=on
BROKEN= does not build with pool alloc
.else
CMAKE_ARGS+= -DENABLE_POOL_ALLOC=off
.endif
.if ${PORT_OPTIONS:MPYTHON}
BROKEN= cmake build doesn't support installing python tools
USES+= python
CONFIGURE_ENV+= PYTHON_PREFIX=${PREFIX} \
PYTHON_VERSION=${PYTHON_VERSION:S/python//}
CONFIGURE_ARGS+=--enable-python-install
PLIST_SUB+= PYTHON=""
.else
PLIST_SUB+= PYTHON="@comment "
.endif
.if ${PORT_OPTIONS:MRAWSOCKETS}
CFLAGS+= -DNETWORK_USE_RAW_SOCKETS
.endif
.if ${PORT_OPTIONS:MSERVER}
CMAKE_ARGS+= -DENABLE_SERVER=on
MAN6+= wesnothd.6
PLIST_SUB+= SERVER=""
.else
CMAKE_ARGS+= -DENABLE_SERVER=off
PLIST_SUB+= SERVER="@comment "
.endif
.if ${PORT_OPTIONS:MTESTS}
CMAKE_ARGS+= -DENABLE_TESTS=on
PLIST_SUB+= TESTS=""
.else
CMAKE_ARGS+= -DENABLE_TESTS=off
PLIST_SUB+= TESTS="@comment "
.endif
.if ${PORT_OPTIONS:MTOOLS}
CMAKE_ARGS+= -DENABLE_TOOLS=on
PLIST_SUB+= TOOLS=""
.else
CMAKE_ARGS+= -DENABLE_TOOLS=off
PLIST_SUB+= TOOLS="@comment "
.endif
.if empty(PORT_OPTIONS:MDOCS)
CMAKE_ARGS+= -DDOCDIR=none
.endif
pre-build:
${CP} ${LOCALBASE}/lib/X11/fonts/junicode/Junicode.ttf \
${WRKSRC}/fonts/Junicode-Regular.ttf
post-install:
-@update-desktop-database ${STAGEDIR}${PREFIX}/share/applications
.include <bsd.port.mk>
|