aboutsummaryrefslogtreecommitdiff
path: root/emulators/mednafen/Makefile
blob: 8d4643e2ebfb4db0f0c64b06276c8abff0237a03 (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
# $FreeBSD$

PORTNAME=	mednafen
PORTVERSION=	0.9.33.2
PORTREVISION=	3
PORTEPOCH=	1
CATEGORIES=	emulators games
MASTER_SITES=	SF/${PORTNAME}/Mednafen/${PORTVERSION}

MAINTAINER=	acm@FreeBSD.org
COMMENT=	Portable multi-system emulator

LICENSE=	GPLv2

LIB_DEPENDS=	libcdio.so:${PORTSDIR}/sysutils/libcdio \
		libsndfile.so:${PORTSDIR}/audio/libsndfile \
		libvorbis.so:${PORTSDIR}/audio/libvorbis

GNU_CONFIGURE=	yes
USE_SDL=	sdl net
USE_GL=		gl glu
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
WRKSRC=	${WRKDIR}/${PORTNAME}
SUB_FILES=	pkg-message

CONFIGURE_ARGS+=--disable-alsa --disable-alsatest \
		--with-sdl-prefix=${LOCALBASE}

USES=		iconv pkgconfig:build tar:bzip2

OPTIONS_DEFINE=	NLS DOCS JACK
OPTIONS_MULTI=	EMU
OPTIONS_MULTI_EMU=	GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB
OPTIONS_DEFAULT=	GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB

GB_DESC=	build with GameBoy emulation
GBA_DESC=	build with GameBoy Advance emulation
LINX_DESC=	build with Atari Lynx emulation
MD_DESC=	build with Sega Genesis/MegaDrive emulation
NES_DESC=	build with Nintendo Entertainment System emulation
NGP_DESC=	build with Neo Geo Pocket emulation
PCE_DESC=	build with PC Engine (TurboGrafx 16) emulation
PCFX_DESC=	build with PC-FX emulation
PSX_DESC=	build with Playstation emulation
SMS_DESC=	build with SMS+GG emulation
SWAN_DESC=	build with WonderSWan emulation
VB_DESC=	build with Virtual Boy emulation
JACK_DESC=	support the JACK audio API

OPTIONS_SUB=	yes

NLS_USES=	gettext
NLS_CONFIGURE_ENABLE=nls

JACK_LIB_DEPENDS=libjack.so:${PORTSDIR}/audio/jack
JACK_CONFIGURE_ENABLE=jack

GB_CONFIGURE_ENABLE=gb
GBA_CONFIGURE_ENABLE=gba
LINX_CONFIGURE_ENABLE=lynx
MD_CONFIGURE_ENABLE=md
NES_CONFIGURE_ENABLE=nes
NGP_CONFIGURE_ENABLE=ngp
PCE_CONFIGURE_ENABLE=pce
PCFX_CONFIGURE_ENABLE=pcfx
PSX_CONFIGURE_ENABLE=psx
SMS_CONFIGURE_ENABLE=sms
SWAN_CONFIGURE_ENABLE=wswan
VB_CONFIGURE_ENABLE=vb

BROKEN_sparc64=	does not compile due to internal compiler error

pre-configure:
	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
		-e 's|/usr/X11R6|${LOCALBASE}|g' \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's|NetBSD|FreeBSD|' \
		${WRKSRC}/include/trio/triodef.h

post-install:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/Documentation/mednafen.html ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>