aboutsummaryrefslogtreecommitdiff
path: root/games/stonesoup/Makefile
blob: 9ccd7ced79fc15d488d88aced809c158dab8c467 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# New ports collection makefile for:	dcss
# Date created:		2008-07-11
# Whom:			Tobias Rehbein <tobias.rehbein@web.de>
#
# $FreeBSD$
#

PORTNAME=	stonesoup
PORTVERSION=	0.7.1
CATEGORIES=	games
MASTER_SITES=	SF/crawl-ref/Stone%20Soup/${PORTVERSION}
DISTNAME=	stone_soup-${PORTVERSION}-nodeps

MAINTAINER=	tobias.rehbein@web.de
COMMENT=	Dungeon Crawl Stone Soup - a fun, free rogue-like game

USE_SQLITE=	yes
USE_BZIP2=	yes
USE_BISON=	build
USE_GMAKE=	yes
USE_LUA=	5.1
USE_PERL5_BUILD=	yes

MAKE_JOBS_SAFE=	yes

SAVEDIR?=	/var/games/${PORTNAME}
WRKSRC=		${WRKDIR}/stone_soup-${PORTVERSION}-1-g7ce9b19/source/

SUB_FILES=	README.FreeBSD
PLIST_SUB=	SAVEDIR="${SAVEDIR}"

OPTIONS=	SOUND		"Sound support"			off \
		LUA_BINDINGS	"LUA bindings for user scripts"	on \
		UNICODE		"Unicode glyphs (UTF-8)"	off \
		WIZARD		"Wizard mode"			off

MAKEFILE=	makefile
MAKE_ARGS=	FREEBSD_PORT=yes
MAKE_ARGS+=	prefix=${PREFIX} SAVEDIR=${SAVEDIR} DATADIR=${DATADIR}

.include <bsd.port.options.mk>

.if defined(VERBOSE)
MAKE_ARGS+=	V=yes
.endif

.if defined(WITH_WIZARD)
MAKE_ARGS+=	wizard
.endif

.if defined(WITH_SDL)
CONFLICTS+=	${PORTNAME}-[0-9]*
MAKE_ARGS+=	TILES=y
PLIST_SUB+=	SDL=""
PKGNAMESUFFIX=	-sdl
BUILD_DEPENDS+=	pkg-config:${PORTSDIR}/devel/pkg-config
LIB_DEPENDS+=	png.6:${PORTSDIR}/graphics/png \
		freetype:${PORTSDIR}/print/freetype2
USE_SDL=	sdl image
.else
CONFLICTS+=	${PORTNAME}-sdl-[0-9]*
PLIST_SUB+=	SDL="@comment "
.endif

.if defined(WITH_SOUND)
RUN_DEPENDS+=	sox:${PORTSDIR}/audio/sox
.endif

.if defined(WITHOUT_LUA_BINDINGS)
MAKE_ARGS+=	NO_LUA_BINDINGS=yes
.endif

.if defined(WITH_UNICODE)
MAKE_ARGS+=	USE_UNICODE=yes
.endif

post-patch:
.if defined(WITH_SOUND)
	@${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/AppHdr.h
	@${REINPLACE_CMD} -e "s,%%SOUND%%,," ${WRKSRC}/AppHdr.h
.else
	@${REINPLACE_CMD} -e "s,%%SOUND%%,// ," ${WRKSRC}/AppHdr.h
.endif

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKDIR}/README.FreeBSD ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
	${MKDIR} ${EXAMPLESDIR}
	${INSTALL_DATA} ${DATADIR}/settings/init.txt ${EXAMPLESDIR}/sample.crawlrc
.endif

.include <bsd.port.mk>