aboutsummaryrefslogtreecommitdiffstats
path: root/games/craft/Makefile
blob: 0244494b6c77e04c12a12aa5d351093b35775441 (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
# Created by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
# $FreeBSD$

PORTNAME=   craft
PORTVERSION=    1.0
PORTREVISION=   1
DISTVERSIONPREFIX=  v
DISTVERSIONSUFFIX=  fbsd
CATEGORIES= games

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

OPTIONS_DEFINE=     SERVER
SERVER_DESC=        Install the craft server
OPTIONS_DEFAULT=    SERVER
OPTIONS_SUB=        yes

USES=       cmake compiler:c11
USE_XORG=   x11 xi xrandr
USE_GL=     gl glu

SERVER_USES=        python
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>