blob: a765e3f058b6fd7fe34c26f2967b9ff42d3301a9 (
plain) (
blame)
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
171
172
|
# New ports collection makefile for: wesnoth
# Date created: 22 December 2003
# Whom: Mezz <mezz7@cox.net>
#
# $FreeBSD$
#
PORTNAME= wesnoth
PORTVERSION= 1.10.3
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}/${PORTNAME}-${PORTVERSION} \
http://files.wesnoth.org/
MAINTAINER= philip@FreeBSD.org
COMMENT= A fantasy turn-based strategy game
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/COPYING
EXTRACT_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
BUILD_DEPENDS= ${WRKSRC}/fonts/Junicode-Regular.ttf:${PORTSDIR}/x11-fonts/junicode:extract
LIB_DEPENDS= boost_thread.4:${PORTSDIR}/devel/boost-libs \
png15:${PORTSDIR}/graphics/png
CONFLICTS= wesnoth-devel-[0-9]*
USE_SDL= image mixer net ttf
USE_GNOME= pango desktopfileutils
MAKE_JOBS_SAFE= yes
USE_BZIP2= yes
USE_CMAKE= yes
CMAKE_ARGS= -DMANDIR="man"
MAN6= wesnoth.6
PORTDOCS= *
PORTDATA= *
OPTIONS= ANA "Enable Asynchronous Network API (WIP)" Off \
CAMPAIGN "Enable campaign server" On \
FRIBIDI "Enable bidirectional support" On \
LOWMEM "Reduce memory usage (disables animations)" Off \
NOTIFY "Enable desktop notifications" On \
OPENMP "Enable OpenMP support" Off \
POOLALLOC "Use wesnoth own memory allocator" Off \
PYTHON "Enable python developer tools" Off \
RAWSOCKETS "Use raw receiving sockets in multiplayer" Off \
SERVER "Enable server" On \
TESTS "Enable unit tests" Off \
TOOLS "Enable extra tools for artists and translators" On
.include <bsd.port.options.mk>
# XXX: breaks compilation because of -Werror
.if !defined(WITH_STRICT)
CMAKE_ARGS+= -DENABLE_STRICT_COMPILATION=off
.endif
.if defined(WITHOUT_ANA)
CMAKE_ARGS+= -DUSE_ANA_NETWORK=off
.else
CMAKE_ARGS+= -DUSE_ANA_NETWORK=on
.endif
.if defined(WITHOUT_CAMPAIGN)
CMAKE_ARGS+= -DENABLE_CAMPAIGN_SERVER=off
PLIST_SUB+= CAMPAIGN="@comment "
.else
CMAKE_ARGS+= -DENABLE_CAMPAIGN_SERVER=on
PLIST_SUB+= CAMPAIGN=""
.endif
.if defined(WITHOUT_FRIBIDI)
CMAKE_ARGS+= -DENABLE_FRIBIDI=off
.else
CMAKE_ARGS+= -DENABLE_FRIBIDI=on
LIB_DEPENDS+= fribidi.3:${PORTSDIR}/converters/fribidi
.endif
.if defined(WITHOUT_LOWMEM)
CMAKE_ARGS+= -DENABLE_LOW_MEM=off
.else
CMAKE_ARGS+= -DENABLE_LOW_MEM=off
.endif
.if defined(WITHOUT_NOTIFY)
CMAKE_ARGS+= -DENABLE_NOTIFICATIONS=off
.else
CMAKE_ARGS+= -DENABLE_NOTIFICATIONS=on
LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus
.endif
.if defined(WITHOUT_NLS)
CMAKE_ARGS+= -DENABLE_NLS=off
PLIST_SUB+= NLS="@comment "
.else
CMAKE_ARGS+= -DENABLE_NLS=on -DLOCALEDIR=${PREFIX}/share/locale
USE_GETTEXT= yes
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
_MANPAGES+= ${PREFIX}/man/ja/man6/wesnothd.6 \
${PREFIX}/man/pt_BR/man6/wesnothd.6 \
${PREFIX}/man/tr/man6/wesnothd.6
PLIST_SUB+= NLS=""
.endif
.if defined(WITHOUT_OPENMP)
CMAKE_ARGS+= -DENABLE_OMP=off
.else
CMAKE_ARGS+= -DENABLE_OMP=on
.endif
.if defined(WITHOUT_POOLALLOC)
CMAKE_ARGS+= -DENABLE_POOL_ALLOC=off
.else
CMAKE_ARGS+= -DENABLE_POOL_ALLOC=on
.endif
.if defined(WITHOUT_PYTHON)
PLIST_SUB+= PYTHON="@comment "
.else
BROKEN= cmake build doesn\'t support installing python tools
USE_PYTHON= yes
CONFIGURE_ENV+= PYTHON_PREFIX=${PREFIX} \
PYTHON_VERSION=${PYTHON_VERSION:S/python//}
CONFIGURE_ARGS+=--enable-python-install
PLIST_SUB+= PYTHON=""
.endif
.if !defined(WITHOUT_RAWSOCKETS)
CFLAGS+= -DNETWORK_USE_RAW_SOCKETS
.endif
.if defined(WITHOUT_SERVER)
CMAKE_ARGS+= -DENABLE_SERVER=off
PLIST_SUB+= SERVER="@comment "
.else
CMAKE_ARGS+= -DENABLE_SERVER=on
MAN6+= wesnothd.6
PLIST_SUB+= SERVER=""
.endif
.if defined(WITHOUT_TESTS)
CMAKE_ARGS+= -DENABLE_TESTS=off
PLIST_SUB+= TESTS="@comment "
.else
CMAKE_ARGS+= -DENABLE_TESTS=on
PLIST_SUB+= TESTS=""
.endif
.if defined(WITHOUT_TOOLS)
CMAKE_ARGS+= -DENABLE_TOOLS=off
PLIST_SUB+= TOOLS="@comment "
.else
CMAKE_ARGS+= -DENABLE_TOOLS=on
PLIST_SUB+= TOOLS=""
.endif
.if defined(NOPORTDOCS)
CMAKE_ARGS+= -DDOCDIR=none
.endif
pre-build:
${INSTALL_DATA} $$(${MAKE} -V WRKSRC \
-C ${PORTSDIR}/x11-fonts/junicode)/fonts/Junicode-Regular.ttf \
${WRKSRC}/fonts
post-install:
-@update-desktop-database ${PREFIX}/share/applications
.include <bsd.port.mk>
|