|
Lines 12-55
COMMENT= Near-infinite-world block sandbox game
Link Here
|
| 12 |
LICENSE= LGPL21+ |
12 |
LICENSE= LGPL21+ |
| 13 |
LICENSE_FILE= ${WRKSRC}/doc/lgpl-2.1.txt |
13 |
LICENSE_FILE= ${WRKSRC}/doc/lgpl-2.1.txt |
| 14 |
|
14 |
|
| 15 |
LIB_DEPENDS= libsqlite3.so:databases/sqlite3 \ |
15 |
LIB_DEPENDS= libsqlite3.so:databases/sqlite3 |
| 16 |
libgmp.so:math/gmp \ |
|
|
| 17 |
libjsoncpp.so:devel/jsoncpp |
| 18 |
|
| 19 |
USE_GITHUB= yes |
| 20 |
GH_ACCOUNT= minetest |
| 21 |
|
16 |
|
| 22 |
USES= cmake compiler:c11 iconv:wchar_t |
17 |
USES= cmake compiler:c11 iconv:wchar_t |
| 23 |
CMAKE_ARGS= -DCUSTOM_MANDIR="${PREFIX}/man" \ |
18 |
CMAKE_ARGS= -DBUILD_UNITTESTS="FALSE" \ |
|
|
19 |
-DCMAKE_BUILD_TYPE="MinSizeRel" \ |
| 24 |
-DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc" \ |
20 |
-DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc" \ |
| 25 |
-DENABLE_SYSTEM_JSONCPP=ON |
21 |
-DCUSTOM_MANDIR="${PREFIX}/man" |
|
|
22 |
# -DVERSION_EXTRA="_${PORTREVISION}" # Except that there is an automatic added dash seperator. |
| 23 |
# OpenGL_GL_PREFERENCE Allowed values are 'GLVND' and 'LEGACY' |
| 24 |
# See CMake Policy CMP0072 for reference: cmake --help-policy CMP0072. GLVND is broken on some nvidia setups, so use LEGACY instead. |
| 25 |
|
| 26 |
USE_GITHUB= yes |
| 27 |
GH_ACCOUNT= minetest |
| 26 |
|
28 |
|
| 27 |
LDFLAGS_i386= -Wl,-znotext |
29 |
LDFLAGS_i386= -Wl,-znotext |
| 28 |
|
30 |
|
| 29 |
PORTDATA= * |
31 |
PORTDATA= * |
| 30 |
PORTDOCS= * |
32 |
PORTDOCS= * |
| 31 |
|
33 |
|
| 32 |
OPTIONS_DEFINE= CURL SOUND FREETYPE NCURSES LUAJIT \ |
34 |
OPTIONS_DEFINE= CURL DOCS EXAMPLES FREETYPE LUAJIT NCURSES NLS SOUND SYSTEM_GMP \ |
| 33 |
DOCS EXAMPLES NLS |
35 |
SYSTEM_JSONCPP |
| 34 |
OPTIONS_MULTI= COMP |
36 |
OPTIONS_MULTI= COMP |
|
|
37 |
OPTIONS_RADIO= GRAPHICS |
| 35 |
OPTIONS_GROUP= DATABASE |
38 |
OPTIONS_GROUP= DATABASE |
| 36 |
|
39 |
|
| 37 |
COMP_DESC= Software components |
40 |
COMP_DESC= Software components |
| 38 |
OPTIONS_MULTI_COMP= CLIENT SERVER |
41 |
OPTIONS_MULTI_COMP= CLIENT SERVER |
| 39 |
|
42 |
|
|
|
43 |
OPTIONS_RADIO_GRAPHICS= GLVND LEGACY |
| 44 |
|
| 45 |
SYSTEM_GMP_DESC= Use gmp from ports (ENABLE_SYSTEM_GMP) |
| 46 |
SYSTEM_GMP_CMAKE_BOOL= ENABLE_SYSTEM_GMP |
| 47 |
SYSTEM_GMP_CMAKE_ON= -DGMP_INCLUDE_DIR="${PREFIX}/include" |
| 48 |
SYSTEM_GMP_LIB_DEPENDS= libgmp.so:math/gmp |
| 49 |
|
| 50 |
SYSTEM_JSONCPP_DESC= Use jsoncpp from ports (ENABLE_SYSTEM_JSONCPP) |
| 51 |
SYSTEM_JSONCPP_CMAKE_BOOL= ENABLE_SYSTEM_JSONCPP |
| 52 |
SYSTEM_JSONCPP_CMAKE_ON= -DJSON_INCLUDE_DIR="${PREFIX}/include/jsoncpp" |
| 53 |
SYSTEM_JSONCPP_LIB_DEPENDS= libjsoncpp.so:devel/jsoncpp |
| 54 |
|
| 55 |
GRAPHICS_DESC= Graphics support |
| 56 |
GLVND_DESC= Use libOpenGL or libGLX |
| 57 |
LEGACY_DESC= Use libGL - where GLVND may be broken on nvidia |
| 58 |
|
| 59 |
GLVND_CMAKE_ON= -DOPENGL_GL_PREFERENCE="GLVND" |
| 60 |
LEGACY_CMAKE_ON= -DOPENGL_GL_PREFERENCE="LEGACY" |
| 61 |
|
| 40 |
DATABASE_DESC= Database support |
62 |
DATABASE_DESC= Database support |
| 41 |
OPTIONS_GROUP_DATABASE= PGSQL LEVELDB REDIS SPATIAL |
63 |
OPTIONS_GROUP_DATABASE= LEVELDB PGSQL REDIS SPATIAL |
| 42 |
|
64 |
|
| 43 |
OPTIONS_DEFAULT= CLIENT SERVER \ |
65 |
OPTIONS_DEFAULT= CLIENT CURL FREETYPE GLVND LUAJIT NCURSES SERVER SOUND \ |
| 44 |
CURL SOUND FREETYPE NCURSES LUAJIT |
66 |
SYSTEM_GMP SYSTEM_JSONCPP |
| 45 |
OPTIONS_SUB= yes |
67 |
OPTIONS_SUB= yes |
| 46 |
|
68 |
|
| 47 |
CLIENT_DESC= Build client |
69 |
CLIENT_DESC= Build client |
| 48 |
CLIENT_CMAKE_BOOL= BUILD_CLIENT |
70 |
CLIENT_CMAKE_BOOL= BUILD_CLIENT |
| 49 |
CLIENT_LIB_DEPENDS= libpng.so:graphics/png \ |
71 |
CLIENT_LIB_DEPENDS= libIrrlicht.so:x11-toolkits/irrlicht \ |
| 50 |
libIrrlicht.so:x11-toolkits/irrlicht |
72 |
libpng.so:graphics/png |
| 51 |
CLIENT_USES= gl jpeg xorg |
73 |
CLIENT_USES= gl jpeg xorg |
| 52 |
CLIENT_USE= GL=gl XORG=x11,xext,xxf86vm |
74 |
CLIENT_USE= GL=gl \ |
|
|
75 |
XORG=x11,xext,xxf86vm |
| 53 |
SERVER_DESC= Build server |
76 |
SERVER_DESC= Build server |
| 54 |
SERVER_CMAKE_BOOL= BUILD_SERVER |
77 |
SERVER_CMAKE_BOOL= BUILD_SERVER |
| 55 |
|
78 |
|
|
Lines 81-96
SPATIAL_DESC= Enable SpatialIndex AreaStore backend
Link Here
|
| 81 |
SPATIAL_LIB_DEPENDS= libspatialindex.so:devel/spatialindex |
104 |
SPATIAL_LIB_DEPENDS= libspatialindex.so:devel/spatialindex |
| 82 |
SPATIAL_CMAKE_BOOL= ENABLE_SPATIAL |
105 |
SPATIAL_CMAKE_BOOL= ENABLE_SPATIAL |
| 83 |
|
106 |
|
| 84 |
NLS_CMAKE_BOOL= ENABLE_GETTEXT |
107 |
NLS_CMAKE_BOOL= ENABLE_GETTEXT |
| 85 |
NLS_USES= gettext |
108 |
NLS_USES= gettext |
| 86 |
NLS_LDFLAGS= -L${LOCALBASE}/lib |
109 |
NLS_LDFLAGS= -L${LOCALBASE}/lib |
| 87 |
|
110 |
|
| 88 |
.include <bsd.port.options.mk> |
111 |
.include <bsd.port.options.mk> |
| 89 |
|
112 |
|
| 90 |
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND} |
113 |
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND} |
| 91 |
USES+= openal |
114 |
USES+= openal |
| 92 |
LIB_DEPENDS+= libvorbis.so:audio/libvorbis \ |
115 |
LIB_DEPENDS+= libogg.so:audio/libogg \ |
| 93 |
libogg.so:audio/libogg |
116 |
libvorbis.so:audio/libvorbis |
| 94 |
.endif |
117 |
.endif |
| 95 |
|
118 |
|
| 96 |
.if ${PORT_OPTIONS:MSERVER} |
119 |
.if ${PORT_OPTIONS:MSERVER} |
|
Lines 101-115
GROUPS= ${PORTNAME}
Link Here
|
| 101 |
|
124 |
|
| 102 |
# hacky way to not bring irrlicht and X11 depends for server only |
125 |
# hacky way to not bring irrlicht and X11 depends for server only |
| 103 |
.if ! ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSERVER} |
126 |
.if ! ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSERVER} |
| 104 |
BUILD_DEPENDS+= ${NONEXISTENT}:x11-toolkits/irrlicht:patch |
127 |
BUILD_DEPENDS+= ${NONEXISTENT}:x11-toolkits/irrlicht:patch |
| 105 |
IRRLICHT_INCLUDE_DIR= `${MAKE} -C ${PORTSDIR}/x11-toolkits/irrlicht -V WRKSRC`/include |
128 |
IRRLICHT_INCLUDE_DIR= `${MAKE} -C ${PORTSDIR}/x11-toolkits/irrlicht -V WRKSRC`/include |
| 106 |
CMAKE_ARGS+= -DIRRLICHT_INCLUDE_DIR:STRING="${IRRLICHT_INCLUDE_DIR}" |
129 |
CMAKE_ARGS+= -DIRRLICHT_INCLUDE_DIR:STRING="${IRRLICHT_INCLUDE_DIR}" |
| 107 |
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-irrlichtdepend |
130 |
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-irrlichtdepend |
| 108 |
.endif |
131 |
.endif |
| 109 |
|
132 |
# From wiki: |
| 110 |
post-extract: |
133 |
# Building without Irrlicht / X dependency |
|
|
134 |
# You can build the Minetest server without library dependencies to Irrlicht or any graphical stuff. |
| 135 |
# You still need the Irrlicht headers for this, so first, download the irrlicht source to somewhere. |
| 136 |
# |
| 137 |
# When invoking CMake, use -DBUILD_CLIENT=0 -DIRRLICHT_SOURCE_DIR=/wherever/you/unzipped/the/source. |
| 138 |
|
| 139 |
#post-extract: |
| 111 |
# make sure no bundled gmp is used |
140 |
# make sure no bundled gmp is used |
| 112 |
@${RM} -rf ${WRKSRC}/lib/gmp ${WRKSRC}/lib/jsoncpp |
141 |
# @${RM} -rf ${WRKSRC}/lib/gmp ${WRKSRC}/lib/jsoncpp |
| 113 |
# bundled lua is OK, there's no option to use system one |
142 |
# bundled lua is OK, there's no option to use system one |
| 114 |
|
143 |
|
| 115 |
post-patch: |
144 |
post-patch: |