summaryrefslogtreecommitdiff
path: root/games/onscripter/Makefile
blob: 28e5988b5201fb2413d54ea6934417f9fc5ac0a0 (plain)
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

PORTNAME=	onscripter
PORTVERSION=	20200722
CATEGORIES=	games
MASTER_SITES=	http://onscripter.osdn.jp/

MAINTAINER=	jbeich@FreeBSD.org
COMMENT?=	Visual novel engine compatible with NScripter

LICENSE=	GPLv2+

LIB_DEPENDS=	libsmpeg.so:multimedia/smpeg \
		libfontconfig.so:x11-fonts/fontconfig
RUN_DEPENDS=	sdl_ttf>=2.0.11_6:graphics/sdl_ttf

USES=		gmake jpeg sdl
USE_SDL=	image mixer ttf
MAKEFILE=	Makefile.Linux
ALL_TARGET=	ALL
MAKE_ARGS=	RM="${RM}"
LDFLAGS+=	-Wl,--as-needed # limit jpeg to bin/*conv
PORTDOCS=	*
PLIST_FILES?=	bin/nsaconv \
		bin/nsadec \
		bin/onscripter \
		bin/sarconv \
		bin/sardec

OPTIONS_DEFINE=	DOCS ENGLISH LUA PDA UTF8
OPTIONS_DEFAULT=LUA UTF8
OPTIONS_EXCLUDE?=ENGLISH

ENGLISH_DESC=	Single-byte character mode
ENGLISH_CFLAGS?=-DENABLE_1BYTE_CHAR -DFORCE_1BYTE_CHAR
LUA_USES=	lua
PDA_DESC=	Fit window size to screen on small PDA devices
PDA_CFLAGS?=	-DPDA_AUTOSIZE
UTF8_CFLAGS?=	-DUTF8_CAPTION -DUTF8_FILESYSTEM

post-patch:
	@${REINPLACE_CMD} -e 's/$$(LIBS)/$$(LDFLAGS) &/' \
		${WRKSRC}/Makefile.onscripter

post-patch-LUA-off:
	@${REINPLACE_CMD} '/optional: lua/,/^$$/d' ${WRKSRC}/${MAKEFILE}

.if !target(do-install)
do-install:
.for f in ${PLIST_FILES:T}
	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
.endfor

post-install-DOCS-on:
	(cd ${WRKSRC}/www && ${COPYTREE_SHARE} \
		. ${STAGEDIR}${DOCSDIR} \
		"! -name *.orig ! -name *.bak")
.endif # do-install

.include <bsd.port.mk>