summaryrefslogtreecommitdiff
path: root/emulators/dolphin-emu/Makefile
blob: 6f828adfec755df9e69e5bca600c33bb86a1e577 (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
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
96
97
98
99
# Created by: Ganael Laplanche <ganael.laplanche@martymac.org>
# $FreeBSD$

PORTNAME=	dolphin-emu
DISTVERSION=	5.0-rc
PORTREVISION=	1
CATEGORIES=	emulators

MAINTAINER=	martymac@FreeBSD.org
COMMENT=	Gamecube and Wii Emulator

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/license.txt

# Notes on dependencies:
# - keep enet from externals as Dolphin's version diverges
# - xxhash and SOIL are not (yet) in ports
LIB_DEPENDS=	libfreetype.so:print/freetype2 \
		liblzo2.so:archivers/lzo2 \
		libpng.so:graphics/png \
		libSoundTouch.so:audio/soundtouch \
		libmbedtls.so.9:security/polarssl13 \
		libsfml-system.so:devel/sfml

USE_GITHUB=	yes
GH_PROJECT=	dolphin

USE_SDL=	sdl2
USE_XORG=	ice x11 xext xi xrandr
USE_WX=		3.0+
USE_GL=		gl glew glu

USES=		cmake compiler:c++11-lib dos2unix iconv openal pkgconfig tar:tgz
DOS2UNIX_REGEX=	.*\.(h|c|cpp)

# Disable ALSA (emulated) and ao (buggy)
CMAKE_ARGS+=	-DTRY_X11:BOOL=ON \
		-DDISABLE_WX:BOOL=OFF \
		-DENABLE_QT:BOOL=OFF \
		-DENABLE_PCH:BOOL=OFF \
		-DENABLE_SDL:BOOL=ON \
		-DDISABLE_ALSA:BOOL=ON \
		-DDISABLE_AO:BOOL=ON \
		-DDISABLE_BLUEZ:BOOL=ON \
		-DDISABLE_OPENAL:BOOL=OFF \
		-DCMAKE_REQUIRED_INCLUDES:PATH="${LOCALBASE}/include" \
		-DCMAKE_REQUIRED_FLAGS:STRING="-L${LOCALBASE}/lib" \
		-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON

# XXX Bypass git check (and set a dummy -unused- revision)
CMAKE_ARGS+=	-DDOLPHIN_WC_BRANCH:STRING="stable" \
		-DDOLPHIN_WC_REVISION:STRING="1"

OPTIONS_DEFINE=	PULSEAUDIO PORTAUDIO DEBUG FRAMEDUMPS UPNP NLS
OPTIONS_DEFAULT=	PORTAUDIO FRAMEDUMPS UPNP NLS
OPTIONS_SUB=	yes
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_ON=	-DDISABLE_PULSEAUDIO:BOOL=OFF
PULSEAUDIO_CMAKE_OFF=	-DDISABLE_PULSEAUDIO:BOOL=ON
PORTAUDIO_DESC=	Enable PortAudio (mic) support
PORTAUDIO_LIB_DEPENDS=	libportaudio.so:audio/portaudio
PORTAUDIO_CMAKE_ON=	-DDISABLE_PORTAUDIO:BOOL=OFF
PORTAUDIO_CMAKE_OFF=	-DDISABLE_PORTAUDIO:BOOL=ON
DEBUG_MAKE_ENV=	VERBOSE=yes
DEBUG_CMAKE_ON=	-DFASTLOG:BOOL=ON
DEBUG_CMAKE_OFF=	-DFASTLOG:BOOL=OFF
FRAMEDUMPS_DESC=	Encode framedumps in AVI format
FRAMEDUMPS_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
			libavformat.so:multimedia/ffmpeg \
			libswscale.so:multimedia/ffmpeg \
			libavutil.so:multimedia/ffmpeg
FRAMEDUMPS_CMAKE_ON=	-DENCODE_FRAMEDUMPS:BOOL=ON
FRAMEDUMPS_CMAKE_OFF=	-DENCODE_FRAMEDUMPS:BOOL=OFF
UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
UPNP_CMAKE_ON=	-DUSE_UPNP:BOOL=ON
UPNP_CMAKE_OFF=	-DUSE_UPNP:BOOL=OFF
NLS_USES=	gettext
NLS_CMAKE_ON=	-DDISABLE_NLS:BOOL=OFF
NLS_CMAKE_OFF=	-DDISABLE_NLS:BOOL=ON

.include <bsd.port.pre.mk>

# JIT-enabled binaries are amd64 only
.if ${ARCH} != "amd64"
CMAKE_ARGS+=	-DENABLE_GENERIC:BOOL=ON
.endif

# When building with Gcc, needs Gcc 4.9+
.if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} < 49
USE_GCC=	4.9+
# Enable std::stoul()
CXXFLAGS+=	-D_GLIBCXX_USE_C99
# Enable log2f(), exp2f() and roundf()
CXXFLAGS+=	-D_GLIBCXX_USE_C99_MATH_TR1
# Turn on extra long double versions of math functions, needed for cmath
CXXFLAGS+=	-D__ISO_C_VISIBLE=1999 -D_DECLARE_C99_LDBL_MATH
.endif

.include <bsd.port.post.mk>