aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanilo <danilo@FreeBSD.org>2014-03-25 22:41:18 +0800
committerdanilo <danilo@FreeBSD.org>2014-03-25 22:41:18 +0800
commit01943f0c2001b17e5c5a1d5954a9f1643823e772 (patch)
tree53fd0a6d8c2c7bd32ea16162b36538fd807371b1 /games
parent2116bc0c638e0298860c1017b631dfd7bb34f1b7 (diff)
downloadfreebsd-ports-gnome-01943f0c2001b17e5c5a1d5954a9f1643823e772.tar.gz
freebsd-ports-gnome-01943f0c2001b17e5c5a1d5954a9f1643823e772.tar.zst
freebsd-ports-gnome-01943f0c2001b17e5c5a1d5954a9f1643823e772.zip
Add new port: games/craft
Craft is a Minecraft clone. Just a few thousand lines of C using modern OpenGL (shaders). Online multiplayer support is included using a Python-based server.
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/craft/Makefile45
-rw-r--r--games/craft/distinfo2
-rw-r--r--games/craft/pkg-descr9
-rw-r--r--games/craft/pkg-plist19
5 files changed, 76 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 8585a46c56b2..05c99cb69caf 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -156,6 +156,7 @@
SUBDIR += cosmosmash
SUBDIR += cowsay
SUBDIR += crack-attack
+ SUBDIR += craft
SUBDIR += crafty
SUBDIR += crafty-open-enormous
SUBDIR += crafty-open-large
diff --git a/games/craft/Makefile b/games/craft/Makefile
new file mode 100644
index 000000000000..98a9b00afaed
--- /dev/null
+++ b/games/craft/Makefile
@@ -0,0 +1,45 @@
+# Created by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= craft
+PORTVERSION= 1.0
+CATEGORIES= games
+MASTER_SITES= GH
+
+MAINTAINER= danilo@FreeBSD.org
+COMMENT= Simple Minecraft clone written in C using modern OpenGL
+
+LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
+
+USE_GITHUB= yes
+GH_ACCOUNT= daniloegea
+GH_PROJECT= Craft
+GH_TAGNAME= v1.0fbsd
+
+OPTIONS_DEFINE= SERVER
+SERVER_DESC= Install the craft server
+OPTIONS_DEFAULT= SERVER
+OPTIONS_SUB= yes
+
+WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-fdf801f
+
+USES= cmake compiler:c11
+USE_XORG= x11 xi xrandr
+USE_GL= gl glu
+
+SERVER_USE= PYTHON=yes
+SERVER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=2.2:${PORTSDIR}/www/py-requests \
+ ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3
+SERVER_CMAKE_ON= -DSERVER:BOOL=ON
+
+.include <bsd.port.options.mk>
+
+post-install:
+.if ${PORT_OPTIONS:MSERVER}
+ @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/world.py ${STAGEDIR}${PYTHON_SITELIBDIR}/craft_world.py
+ ${INSTALL_SCRIPT} ${WRKSRC}/server.py ${STAGEDIR}${PREFIX}/bin/craft-server
+ ${INSTALL_LIB} ${WRKSRC}/libworld.so ${STAGEDIR}${PREFIX}/lib/libcraft-world.so
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/craft/distinfo b/games/craft/distinfo
new file mode 100644
index 000000000000..c6b218da33cd
--- /dev/null
+++ b/games/craft/distinfo
@@ -0,0 +1,2 @@
+SHA256 (craft-1.0.tar.gz) = a98ec03fe94b60beecb5c72a8d4fc9d5f16e525d1ab6614ec0c45f19e4c609ce
+SIZE (craft-1.0.tar.gz) = 2373956
diff --git a/games/craft/pkg-descr b/games/craft/pkg-descr
new file mode 100644
index 000000000000..ab40e548de78
--- /dev/null
+++ b/games/craft/pkg-descr
@@ -0,0 +1,9 @@
+Craft is a Minecraft clone.
+Just a few thousand lines of C using modern OpenGL (shaders).
+Online multiplayer support is included using a Python-based server.
+
+This version is adapted to build, install and run on FreeBSD.
+
+Craft was created by Michael Fogleman.
+
+WWW: http://www.michaelfogleman.com/craft/
diff --git a/games/craft/pkg-plist b/games/craft/pkg-plist
new file mode 100644
index 000000000000..d40a92405c8c
--- /dev/null
+++ b/games/craft/pkg-plist
@@ -0,0 +1,19 @@
+bin/craft
+%%SERVER%%bin/craft-server
+%%SERVER%%lib/libcraft-world.so
+%%SERVER%%%%PYTHON_SITELIBDIR%%/craft_world.py
+%%DATADIR%%/shaders/block_fragment.glsl
+%%DATADIR%%/shaders/block_vertex.glsl
+%%DATADIR%%/shaders/line_fragment.glsl
+%%DATADIR%%/shaders/line_vertex.glsl
+%%DATADIR%%/shaders/sky_fragment.glsl
+%%DATADIR%%/shaders/sky_vertex.glsl
+%%DATADIR%%/shaders/text_fragment.glsl
+%%DATADIR%%/shaders/text_vertex.glsl
+%%DATADIR%%/textures/font.png
+%%DATADIR%%/textures/sign.png
+%%DATADIR%%/textures/sky.png
+%%DATADIR%%/textures/texture.png
+@dirrmtry %%DATADIR%%/textures
+@dirrmtry %%DATADIR%%/shaders
+@dirrmtry %%DATADIR%%