blob: d28b19d2608c0a2e6fb4bd256f0a7c12ebfa21f1 (
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
|
PORTNAME= minetest
PORTVERSION= 5.6.0
CATEGORIES= games
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Near-infinite-world block sandbox game
WWW= https://www.minetest.net/
LICENSE= LGPL21+
LICENSE_FILE= ${WRKSRC}/doc/lgpl-2.1.txt
LIB_DEPENDS= libgmp.so:math/gmp \
libjsoncpp.so:devel/jsoncpp \
libzstd.so:archivers/zstd
USES= cmake compiler:c++14-lang cpe iconv:wchar_t sqlite
USE_GITHUB= yes
# check https://github.com/minetest/minetest/releases for applicable irrlichmt version
GH_TUPLE= minetest:irrlicht:1.9.0mt7:irrlicht/lib/irrlichtmt
CMAKE_ARGS= -DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc" \
CMAKE_ON= ENABLE_SYSTEM_JSONCPP
TEST_ENV= ${MAKE_ENV} LC_ALL=C.UTF-8
LDFLAGS_i386= -Wl,-znotext
PORTDATA= *
PORTDOCS= *
OPTIONS_DEFINE= CURL SOUND NCURSES LUAJIT TEST \
DOCS EXAMPLES NLS
OPTIONS_MULTI= COMP
OPTIONS_GROUP= DATABASE
OPTIONS_MULTI_COMP= CLIENT SERVER
OPTIONS_GROUP_DATABASE= PGSQL LEVELDB REDIS SPATIAL
OPTIONS_DEFAULT= CLIENT SERVER \
CURL SOUND NCURSES LUAJIT
OPTIONS_SUB= yes
COMP_DESC= Software components
DATABASE_DESC= Database support
CLIENT_DESC= Build client
CLIENT_CMAKE_BOOL= BUILD_CLIENT
CLIENT_LIB_DEPENDS= libpng.so:graphics/png \
libfreetype.so:print/freetype2
CLIENT_USES= gl jpeg xorg
CLIENT_USE= GL=gl XORG=x11,xext,xi
SERVER_DESC= Build server
SERVER_CMAKE_BOOL= BUILD_SERVER
CURL_DESC= Enable cURL support for fetching media
CURL_CMAKE_BOOL= ENABLE_CURL
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
SOUND_DESC= Enable sound
SOUND_CMAKE_BOOL= ENABLE_SOUND
NCURSES_DESC= Enable ncurses console
NCURSES_CMAKE_BOOL= ENABLE_CURSES
NCURSES_USES= ncurses
LUAJIT_DESC= LuaJIT support
LUAJIT_CMAKE_BOOL= ENABLE_LUAJIT REQUIRE_LUAJIT
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
PGSQL_USES= pgsql
PGSQL_CMAKE_BOOL= ENABLE_POSTGRESQL
LEVELDB_DESC= Enable LevelDB backend
LEVELDB_CMAKE_BOOL= ENABLE_LEVELDB
LEVELDB_LIB_DEPENDS= libleveldb.so:databases/leveldb
REDIS_DESC= Enable Redis backend
REDIS_CMAKE_BOOL= ENABLE_REDIS
REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis
SPATIAL_DESC= Enable SpatialIndex AreaStore backend
SPATIAL_LIB_DEPENDS= libspatialindex.so:devel/spatialindex
SPATIAL_CMAKE_BOOL= ENABLE_SPATIAL
NLS_CMAKE_BOOL= ENABLE_GETTEXT
NLS_USES= gettext
NLS_LDFLAGS= -L${LOCALBASE}/lib
TEST_CMAKE_BOOL= BUILD_UNITTESTS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
USES+= openal
LIB_DEPENDS+= libvorbis.so:audio/libvorbis \
libogg.so:audio/libogg
.endif
.if ${PORT_OPTIONS:MSERVER}
USE_RC_SUBR= ${PORTNAME}
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
.endif
post-extract:
# make sure no bundled gmp is used
@${RM} -rf ${WRKSRC}/lib/gmp ${WRKSRC}/lib/jsoncpp
# bundled lua is OK, there's no option to use system one
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
${WRKSRC}/cmake/Modules/*.cmake
do-test-TEST-on:
.if ${PORT_OPTIONS:MCLIENT}
cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/minetest --run-unittests
.endif
.if ${PORT_OPTIONS:MSERVER}
cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/minetestserver --run-unittests
.endif
.include <bsd.port.mk>
|