aboutsummaryrefslogtreecommitdiff
path: root/games/openrct2/Makefile
blob: 1d9ef511ac50d1af062f5ae2e13065e4d001bb32 (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
57
58
59
60
61
# Created by: Piotr Kubaj <pkubaj@anongoth.pl>
# $FreeBSD$

PORTNAME=	openrct2
DISTVERSIONPREFIX=	v
DISTVERSION=	0.2.3
PORTREVISION=	2
CATEGORIES=	games

PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+=	a5555649ec59.patch:-p1

MAINTAINER=	pkubaj@FreeBSD.org
COMMENT=	Open source re-implementation of RollerCoaster Tycoon 2

LICENSE=	GPLv3+
LICENSE_FILE=	${WRKSRC}/licence.txt

LIB_DEPENDS=	libpng.so:graphics/png \
		libjansson.so:devel/jansson \
		libzip.so:archivers/libzip \
		libspeexdsp.so:audio/speexdsp \
		libfontconfig.so:x11-fonts/fontconfig \
		libcurl.so:ftp/curl \
		libfreetype.so:print/freetype2 \
		libicuuc.so:devel/icu

USES=		cmake compiler:c++17-lang desktop-file-utils gnome gl iconv \
		localbase:ldflags pkgconfig sdl shared-mime-info ssl xorg
USE_GITHUB=	yes
GH_ACCOUNT=	OpenRCT2
GH_PROJECT=	OpenRCT2
GH_TUPLE=	OpenRCT2:objects:v1.0.12:objects \
		OpenRCT2:title-sequences:v0.1.2c:title_sequences
USE_GL=		gl
USE_LDCONFIG=	yes
USE_SDL=	sdl2

CMAKE_ON=	BUILD_SHARED_LIBS
CMAKE_OFF=	DOWNLOAD_TITLE_SEQUENCES \
		DOWNLOAD_OBJECTS
CXXFLAGS+=	-D_GNU_SOURCE

PORTDATA=	*
PORTDOCS=	changelog.txt contributors.md licence.txt readme.txt

INSTALLS_ICONS=	yes

OPTIONS_DEFINE=	DOCS

post-patch:
	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
		${WRKSRC}/src/openrct2/config/Config.cpp

post-install:
	(cd ${WRKSRC_title_sequences}; \
		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/title)
	(cd ${WRKSRC_objects}; \
		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/object)

.include <bsd.port.mk>