summaryrefslogtreecommitdiff
path: root/games/corsix-th/Makefile
blob: ff9340501f88097cf480c4046b1b8abc42f41624 (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
45
46
47
48
49
50
51
52
53
54
55
56
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$

PORTNAME=	corsixth
PORTVERSION=	0.64
DISTVERSIONPREFIX=	v
CATEGORIES=	games

MAINTAINER=	madpilot@FreeBSD.org
COMMENT=	Open source clone of Theme Hospital

LICENSE=	MIT

LIB_DEPENDS=	libfreetype.so:print/freetype2
RUN_DEPENDS=	${LUA_REFMODLIBDIR}/lfs.so:devel/luafilesystem@${LUA_FLAVOR} \
		${LUA_REFMODLIBDIR}/lpeg.so:devel/lua-lpeg@${LUA_FLAVOR}

USES=		cmake:insource compiler:c++11-lib desktop-file-utils dos2unix \
		iconv lua pkgconfig sdl
USE_SDL=	mixer2
DOS2UNIX_FILES=	CMake/FindFFmpeg.cmake \
		CorsixTH/CMakeLists.txt \
		CorsixTH/Src/iso_fs.cpp
CMAKE_ARGS=	-DWITH_LUAJIT=OFF
CFLAGS+=	-I${ICONV_PREFIX}/include
DATADIR=	${PREFIX}/share/corsix-th

DESKTOP_ENTRIES=	"CorsixTH" \
			"${COMMENT}" \
			"${PREFIX}/share/pixmaps/corsix-th.png" \
			"${PREFIX}/bin/corsix-th" \
			"Game;" \
			""

USE_GITHUB=	yes
GH_ACCOUNT=	CorsixTH
GH_PROJECT=	CorsixTH

OPTIONS_DEFINE=	MOVIES
OPTIONS_DEFAULT=	MOVIES
MOVIES_DESC=	Play in-game movies

MOVIES_CMAKE_ON=	-DWITH_MOVIES=ON
MOVIES_CMAKE_OFF=	-DWITH_MOVIES=OFF
MOVIES_LIB_DEPENDS=	libswresample.so:multimedia/ffmpeg

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/CorsixTH/corsix-th ${STAGEDIR}${PREFIX}/bin
	@${MKDIR} ${STAGEDIR}${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/CorsixTH/CorsixTH.lua ${STAGEDIR}${DATADIR}
	cd ${WRKSRC}/CorsixTH && ${COPYTREE_SHARE} "Bitmap Levels Lua" \
		${STAGEDIR}${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/LDocGen/output/logo.png \
		${STAGEDIR}${PREFIX}/share/pixmaps/corsix-th.png

.include <bsd.port.mk>