2013-12-07 01:25:01 +00:00
|
|
|
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= freeminer
|
2014-11-25 01:17:32 +00:00
|
|
|
PORTVERSION= 0.4.10.4
|
Bump PORTREVISION for ports depending on the canonical version of GCC
(via Mk/bsd.default-versions.mk and lang/gcc) which has moved from
GCC 5.4 to GCC 6.4 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c++11-lib, c++11-lang,
c++14-lang, c++0x, c11, or gcc-c++11-lib.
PR: 219275
2017-09-10 20:55:38 +00:00
|
|
|
PORTREVISION= 5
|
2013-12-07 01:25:01 +00:00
|
|
|
CATEGORIES= games
|
|
|
|
|
|
|
|
MAINTAINER= amdmi3@FreeBSD.org
|
|
|
|
COMMENT= Open source sandbox game inspired by Minecraft
|
|
|
|
|
2016-01-12 16:20:31 +00:00
|
|
|
LICENSE= LGPL21+ GPLv3+ # source mentions GPLv3+, LICENSE.txt LGPL21+
|
2014-11-25 01:17:32 +00:00
|
|
|
LICENSE_COMB= multi
|
2016-01-12 16:20:31 +00:00
|
|
|
LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING # don't remove space
|
2013-12-07 01:25:01 +00:00
|
|
|
|
2016-04-01 14:00:51 +00:00
|
|
|
LIB_DEPENDS= libsqlite3.so:databases/sqlite3
|
2013-12-07 01:25:01 +00:00
|
|
|
|
|
|
|
USE_GITHUB= yes
|
|
|
|
|
2014-11-25 01:17:32 +00:00
|
|
|
USES= compiler:c++11-lib cmake
|
2018-01-07 22:34:17 +00:00
|
|
|
LLD_UNSAFE= yes
|
2013-12-07 01:25:01 +00:00
|
|
|
CMAKE_ARGS= -DCUSTOM_MANDIR="${PREFIX}/man" \
|
2014-11-25 01:17:32 +00:00
|
|
|
-DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc" \
|
|
|
|
-DRUN_IN_PLACE=0
|
2013-12-07 01:25:01 +00:00
|
|
|
|
|
|
|
PORTDATA= *
|
|
|
|
PORTDOCS= *
|
|
|
|
|
2014-01-27 23:16:41 +00:00
|
|
|
OPTIONS_DEFINE= CLIENT SERVER CURL SOUND FREETYPE LEVELDB LUAJIT NLS DOCS EXAMPLES
|
|
|
|
OPTIONS_DEFAULT=CLIENT SERVER CURL SOUND FREETYPE LEVELDB LUAJIT
|
2013-12-07 01:25:01 +00:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
|
|
|
CLIENT_DESC= Build client
|
|
|
|
SERVER_DESC= Build server
|
|
|
|
CURL_DESC= Enable cURL support for fetching media
|
|
|
|
SOUND_DESC= Enable sound
|
|
|
|
LEVELDB_DESC= Enable LevelDB backend
|
|
|
|
FREETYPE_DESC= Support for TrueType fonts with unicode
|
|
|
|
LUAJIT_DESC= LuaJIT support
|
|
|
|
|
|
|
|
CLIENT_CMAKE_ON= -DBUILD_CLIENT=1
|
|
|
|
CLIENT_CMAKE_OFF= -DBUILD_CLIENT=0
|
2016-04-01 14:00:51 +00:00
|
|
|
CLIENT_LIB_DEPENDS= libpng.so:graphics/png \
|
|
|
|
libIrrlicht.so:x11-toolkits/irrlicht
|
2015-06-22 18:33:20 +00:00
|
|
|
CLIENT_USES= jpeg
|
2013-12-07 01:25:01 +00:00
|
|
|
CLIENT_USE= GL=gl XORG=x11
|
|
|
|
SERVER_CMAKE_ON= -DBUILD_SERVER=1
|
|
|
|
SERVER_CMAKE_OFF= -DBUILD_SERVER=0
|
|
|
|
CURL_CMAKE_ON= -DENABLE_CURL=1
|
|
|
|
CURL_CMAKE_OFF= -DENABLE_CURL=0
|
2016-04-01 14:00:51 +00:00
|
|
|
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
|
2013-12-07 01:25:01 +00:00
|
|
|
NLS_CMAKE_ON= -DENABLE_GETTEXT=1
|
|
|
|
NLS_CMAKE_OFF= -DENABLE_GETTEXT=0
|
|
|
|
NLS_USES= gettext
|
|
|
|
NLS_LDFLAGS= -L${LOCALBASE}/lib
|
|
|
|
SOUND_CMAKE_ON= -DENABLE_SOUND=1
|
|
|
|
SOUND_CMAKE_OFF= -DENABLE_SOUND=0
|
|
|
|
LEVELDB_CMAKE_ON= -DENABLE_LEVELDB=1
|
|
|
|
LEVELDB_CMAKE_OFF= -DENABLE_LEVELDB=0
|
2016-04-01 14:00:51 +00:00
|
|
|
LEVELDB_LIB_DEPENDS= libleveldb.so:databases/leveldb
|
2013-12-07 01:25:01 +00:00
|
|
|
FREETYPE_CMAKE_ON= -DENABLE_FREETYPE=1
|
|
|
|
FREETYPE_CMAKE_OFF= -DENABLE_FREETYPE=0
|
2016-04-01 14:00:51 +00:00
|
|
|
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
|
|
|
|
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
|
2013-12-07 01:25:01 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
|
2013-12-25 23:29:34 +00:00
|
|
|
USES+= openal
|
2016-04-01 14:00:51 +00:00
|
|
|
LIB_DEPENDS+= libvorbis.so:audio/libvorbis
|
2013-12-07 01:25:01 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSERVER}
|
|
|
|
USE_RC_SUBR= ${PORTNAME}
|
|
|
|
USERS= minetest # reuse, as freeminer is a fork of
|
|
|
|
GROUPS= minetest
|
|
|
|
.endif
|
|
|
|
|
2014-02-13 20:45:30 +00:00
|
|
|
# hacky way to not bring irrlicht and X11 depends for server only
|
|
|
|
.if ! ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSERVER}
|
2016-04-01 14:00:51 +00:00
|
|
|
BUILD_DEPENDS+= ${NONEXISTENT}:x11-toolkits/irrlicht:patch
|
2014-02-13 20:45:30 +00:00
|
|
|
IRRLICHT_INCLUDE_DIR= `${MAKE} -C ${PORTSDIR}/x11-toolkits/irrlicht -V WRKSRC`/include
|
|
|
|
CMAKE_ARGS+= -DIRRLICHT_INCLUDE_DIR:STRING="${IRRLICHT_INCLUDE_DIR}"
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-irrlichtdepend
|
|
|
|
.endif
|
|
|
|
|
2013-12-07 01:25:01 +00:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
|
|
|
|
${WRKSRC}/cmake/Modules/*.cmake
|
2014-11-25 01:17:32 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|-lpthread|-pthread|' \
|
2013-12-07 01:25:01 +00:00
|
|
|
${WRKSRC}/src/CMakeLists.txt
|
|
|
|
.if ! ${PORT_OPTIONS:MLUAJIT}
|
|
|
|
@${REINPLACE_CMD} -e '/find_/ s|LUA_|NO&|g' \
|
|
|
|
${WRKSRC}/src/CMakeLists.txt
|
|
|
|
.endif
|
|
|
|
|
2014-01-28 02:58:32 +00:00
|
|
|
post-install:
|
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/games
|
2014-11-25 01:17:32 +00:00
|
|
|
@${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.example \
|
|
|
|
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
2014-01-28 02:58:32 +00:00
|
|
|
|
2013-12-07 01:25:01 +00:00
|
|
|
.include <bsd.port.mk>
|