diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2013-12-07 09:25:01 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2013-12-07 09:25:01 +0800 |
commit | b5c4d00a6e9f592ef341d36b809b2740dc74cabd (patch) | |
tree | f1cbabdd6e696cde068c04677f920e54f1e254bb /games | |
parent | 0345dd523e17666e0c8240313c0b6e567e4abfa8 (diff) | |
download | freebsd-ports-gnome-b5c4d00a6e9f592ef341d36b809b2740dc74cabd.tar.gz freebsd-ports-gnome-b5c4d00a6e9f592ef341d36b809b2740dc74cabd.tar.zst freebsd-ports-gnome-b5c4d00a6e9f592ef341d36b809b2740dc74cabd.zip |
- Add freeminer and freeminer-game: forks of minecraft and
minecraft_game correspondingly
Freeminer is a Minecraft-inspired sandbox game.
WWW: http://freeminer.org/
Diffstat (limited to 'games')
-rw-r--r-- | games/Makefile | 2 | ||||
-rw-r--r-- | games/freeminer-default/Makefile | 30 | ||||
-rw-r--r-- | games/freeminer-default/distinfo | 2 | ||||
-rw-r--r-- | games/freeminer-default/pkg-descr | 3 | ||||
-rw-r--r-- | games/freeminer/Makefile | 86 | ||||
-rw-r--r-- | games/freeminer/distinfo | 2 | ||||
-rw-r--r-- | games/freeminer/files/freeminer.in | 76 | ||||
-rw-r--r-- | games/freeminer/pkg-descr | 3 | ||||
-rw-r--r-- | games/freeminer/pkg-message | 9 | ||||
-rw-r--r-- | games/freeminer/pkg-plist | 7 |
10 files changed, 220 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index 87408e425cdd..9ed65cd7eb42 100644 --- a/games/Makefile +++ b/games/Makefile @@ -280,6 +280,8 @@ SUBDIR += freedoko SUBDIR += freedroid SUBDIR += freedroidrpg + SUBDIR += freeminer + SUBDIR += freeminer-default SUBDIR += freera SUBDIR += freesweep SUBDIR += freesynd diff --git a/games/freeminer-default/Makefile b/games/freeminer-default/Makefile new file mode 100644 index 000000000000..c5fb2343629a --- /dev/null +++ b/games/freeminer-default/Makefile @@ -0,0 +1,30 @@ +# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= default +PORTVERSION= 0.4.8.2 +CATEGORIES= games +PKGNAMEPREFIX= freeminer- +DIST_SUBDIR= freeminer + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= The main game for the Freeminer game engine + +LICENSE= LGPL21 + +RUN_DEPENDS= freeminer:${PORTSDIR}/games/freeminer + +USE_GITHUB= yes +GH_ACCOUNT= freeminer +GH_PROJECT= ${PORTNAME} +GH_COMMIT= 6261db9 + +NO_BUILD= yes +DATADIR= ${PREFIX}/share/freeminer/games/${PORTNAME} +PORTDATA= * + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/ + +.include <bsd.port.mk> diff --git a/games/freeminer-default/distinfo b/games/freeminer-default/distinfo new file mode 100644 index 000000000000..b314731ce2c9 --- /dev/null +++ b/games/freeminer-default/distinfo @@ -0,0 +1,2 @@ +SHA256 (freeminer/default-0.4.8.2.tar.gz) = 7372ea4835dd79e9a317ef0b523291afa39edd324dff34208b679ae1fbeaa82b +SIZE (freeminer/default-0.4.8.2.tar.gz) = 765200 diff --git a/games/freeminer-default/pkg-descr b/games/freeminer-default/pkg-descr new file mode 100644 index 000000000000..c7fc4ba348e5 --- /dev/null +++ b/games/freeminer-default/pkg-descr @@ -0,0 +1,3 @@ +Default game for freeminer + +WWW: http://freeminer.org/ diff --git a/games/freeminer/Makefile b/games/freeminer/Makefile new file mode 100644 index 000000000000..207b4f4c07fc --- /dev/null +++ b/games/freeminer/Makefile @@ -0,0 +1,86 @@ +# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= freeminer +PORTVERSION= 0.4.8.2 +CATEGORIES= games + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Open source sandbox game inspired by Minecraft + +LICENSE= LGPL21 + +LIB_DEPENDS= libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht \ + sqlite3:${PORTSDIR}/databases/sqlite3 + +USE_GITHUB= yes +GH_ACCOUNT= ${PORTNAME} +GH_COMMIT= 79bf405 + +USES= cmake +CMAKE_ARGS= -DCUSTOM_MANDIR="${PREFIX}/man" \ + -DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc" + +PORTDATA= * +PORTDOCS= * + +OPTIONS_DEFINE= CLIENT SERVER CURL NLS SOUND DOCS EXAMPLES FREETYPE LEVELDB LUAJIT +OPTIONS_DEFAULT=CLIENT SERVER CURL SOUND +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 +CLIENT_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ + libpng.so:${PORTSDIR}/graphics/png +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 +CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl +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 +LEVELDB_LIB_DEPENDS= libleveldb.so:${PORTSDIR}/databases/leveldb +FREETYPE_CMAKE_ON= -DENABLE_FREETYPE=1 +FREETYPE_CMAKE_OFF= -DENABLE_FREETYPE=0 +FREETYPE_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 +LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND} +USE_OPENAL+= yes +LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis +.endif + +.if ${PORT_OPTIONS:MSERVER} +USE_RC_SUBR= ${PORTNAME} +USERS= minetest # reuse, as freeminer is a fork of +GROUPS= minetest +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ + ${WRKSRC}/cmake/Modules/*.cmake + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' \ + ${WRKSRC}/src/CMakeLists.txt +.if ! ${PORT_OPTIONS:MLUAJIT} + @${REINPLACE_CMD} -e '/find_/ s|LUA_|NO&|g' \ + ${WRKSRC}/src/CMakeLists.txt +.endif + +.include <bsd.port.mk> diff --git a/games/freeminer/distinfo b/games/freeminer/distinfo new file mode 100644 index 000000000000..99a6d8d45399 --- /dev/null +++ b/games/freeminer/distinfo @@ -0,0 +1,2 @@ +SHA256 (freeminer-0.4.8.2.tar.gz) = 38606ece229b82332765b7777a6ed97f0062eeb1ded4a3b5e1a1211720047f14 +SIZE (freeminer-0.4.8.2.tar.gz) = 5313173 diff --git a/games/freeminer/files/freeminer.in b/games/freeminer/files/freeminer.in new file mode 100644 index 000000000000..4734b3e54dcb --- /dev/null +++ b/games/freeminer/files/freeminer.in @@ -0,0 +1,76 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: freeminer +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf[.local] to enable freeminer server +# +# freeminer_enable (bool): Set to "NO" by default +# Set it to "YES" to enable freeminer server +# freeminer_conffile (str): Path to config file (required). +# (default: /usr/local/etc/freeminer.conf) +# freeminer_rundir (str): Path to directory holding a pidfile. +# (default: /var/run/freeminer) +# freeminer_user (str): User to run as +# (default: freeminer) +# freeminer_group (str): Group to run as +# (default: freeminer) +# freeminer_logdir (str): Path to log directory +# (default: /var/log/freeminer) +# freeminer_dbdir (str): Path to world database directory +# (default: /var/db/freeminer) + +. /etc/rc.subr + +name=freeminer +rcvar=freeminer_enable + +load_rc_config ${name} + +: ${freeminer_enable="NO"} +: ${freeminer_config="/usr/local/etc/freeminer.conf"} +: ${freeminer_rundir="/var/run/freeminer"} +: ${freeminer_user="freeminer"} +: ${freeminer_group="freeminer"} +: ${freeminer_logdir="/var/log/freeminer"} +: ${freeminer_dbdir="/var/db/freeminer"} +: ${freeminer_args:="--logfile ${freeminer_logdir}/debug.log --world ${freeminer_dbdir}/world ${freeminer_flags}"} + +pidfile= + +case "${freeminer_args}" in +*--config\ *) + echo "Warning \$freeminer_args includes --config option." \ + "Please use \$freeminer_conffile instead." + ;; +*) + freeminer_args="--config ${freeminer_config} ${freeminer_args}" + ;; +esac + +command=/usr/sbin/daemon +procname=/usr/local/bin/freeminerserver +pidfile=${freeminer_rundir}/freeminer.pid +command_args="-c -f -p ${pidfile} ${procname} ${freeminer_args}" +required_files=${freeminer_config} +start_precmd=freeminer_prestart + +freeminer_prestart () { + if [ ! -d ${freeminer_rundir} ]; then + mkdir -m 755 -p ${freeminer_rundir} + chown -R ${freeminer_user}:${freeminer_group} ${freeminer_rundir} + fi + if [ ! -d ${freeminer_logdir} ]; then + mkdir -m 755 -p ${freeminer_logdir} + chown -R ${freeminer_user}:${freeminer_group} ${freeminer_logdir} + fi + if [ ! -d ${freeminer_dbdir} ]; then + mkdir -m 755 -p ${freeminer_dbdir}/data + chown -R ${freeminer_user}:${freeminer_group} ${freeminer_dbdir} + fi +} + +run_rc_command "$1" diff --git a/games/freeminer/pkg-descr b/games/freeminer/pkg-descr new file mode 100644 index 000000000000..f8044139ed6d --- /dev/null +++ b/games/freeminer/pkg-descr @@ -0,0 +1,3 @@ +Freeminer is a Minecraft-inspired sandbox game. + +WWW: http://freeminer.org/ diff --git a/games/freeminer/pkg-message b/games/freeminer/pkg-message new file mode 100644 index 000000000000..7e1157455bfb --- /dev/null +++ b/games/freeminer/pkg-message @@ -0,0 +1,9 @@ +Freeminer engine has been installed. + +Note that for offline play or for server hosting you also need +to install game data. For now, only one game is available for +freeminer and you can install it with games/freeminer-default +port. + +For online play engine is sufficient as it will downloaded all +required data automatically. diff --git a/games/freeminer/pkg-plist b/games/freeminer/pkg-plist new file mode 100644 index 000000000000..e194429f13ed --- /dev/null +++ b/games/freeminer/pkg-plist @@ -0,0 +1,7 @@ +%%CLIENT%%bin/freeminer +%%SERVER%%bin/freeminerserver +@unexec if cmp -s %D/etc/freeminer.conf.example %D/etc/freeminer.conf; then rm -f %D/etc/freeminer.conf; fi +etc/freeminer.conf.example +@exec if [ ! -f %B/freeminer.conf ]; then cp -p %D/%F %B/freeminer.conf; fi +man/man6/freeminer.6.gz +man/man6/freeminerserver.6.gz |