| 1 |
# Created by: Ganael Laplanche <ganael.laplanche@martymac.org> |
| 2 |
# $FreeBSD$ |
| 3 |
|
| 4 |
PORTNAME= dolphin-emu |
| 5 |
DISTVERSION= 5.0-rc |
| 6 |
PORTREVISION= 2 |
| 7 |
CATEGORIES= emulators |
| 8 |
|
| 9 |
MAINTAINER= martymac@FreeBSD.org |
| 10 |
COMMENT= Gamecube and Wii Emulator |
| 11 |
|
| 12 |
LICENSE= GPLv2 |
| 13 |
LICENSE_FILE= ${WRKSRC}/license.txt |
| 14 |
|
| 15 |
# Notes on dependencies: |
| 16 |
# - keep enet from externals as Dolphin's version diverges |
| 17 |
# - xxhash and SOIL are not (yet) in ports |
| 18 |
LIB_DEPENDS= libfreetype.so:print/freetype2 \ |
| 19 |
liblzo2.so:archivers/lzo2 \ |
| 20 |
libpng.so:graphics/png \ |
| 21 |
libSoundTouch.so:audio/soundtouch \ |
| 22 |
libmbedtls.so.9:security/polarssl13 \ |
| 23 |
libsfml-system.so:devel/sfml |
| 24 |
|
| 25 |
USE_GITHUB= yes |
| 26 |
GH_PROJECT= dolphin |
| 27 |
|
| 28 |
USE_SDL= sdl2 |
| 29 |
USE_XORG= ice x11 xext xi xrandr |
| 30 |
USE_WX= 3.0+ |
| 31 |
USE_GL= gl glew glu |
| 32 |
|
| 33 |
USES= cmake compiler:c++11-lib dos2unix iconv openal pkgconfig tar:tgz |
| 34 |
DOS2UNIX_REGEX= .*\.(h|c|cpp) |
| 35 |
|
| 36 |
# Disable ALSA (emulated) and ao (buggy) |
| 37 |
CMAKE_ARGS+= -DTRY_X11:BOOL=ON \ |
| 38 |
-DDISABLE_WX:BOOL=OFF \ |
| 39 |
-DENABLE_QT:BOOL=OFF \ |
| 40 |
-DENABLE_PCH:BOOL=OFF \ |
| 41 |
-DENABLE_SDL:BOOL=ON \ |
| 42 |
-DDISABLE_ALSA:BOOL=ON \ |
| 43 |
-DDISABLE_AO:BOOL=ON \ |
| 44 |
-DDISABLE_BLUEZ:BOOL=ON \ |
| 45 |
-DDISABLE_OPENAL:BOOL=OFF \ |
| 46 |
-DCMAKE_REQUIRED_INCLUDES:PATH="${LOCALBASE}/include" \ |
| 47 |
-DCMAKE_REQUIRED_FLAGS:STRING="-L${LOCALBASE}/lib" \ |
| 48 |
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON |
| 49 |
|
| 50 |
# XXX Bypass git check (and set a dummy -unused- revision) |
| 51 |
CMAKE_ARGS+= -DDOLPHIN_WC_BRANCH:STRING="stable" \ |
| 52 |
-DDOLPHIN_WC_REVISION:STRING="1" |
| 53 |
|
| 54 |
OPTIONS_DEFINE= PULSEAUDIO PORTAUDIO DEBUG FRAMEDUMPS UPNP NLS |
| 55 |
OPTIONS_DEFAULT= PORTAUDIO FRAMEDUMPS UPNP |
| 56 |
OPTIONS_SUB= yes |
| 57 |
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio |
| 58 |
PULSEAUDIO_CMAKE_ON= -DDISABLE_PULSEAUDIO:BOOL=OFF |
| 59 |
PULSEAUDIO_CMAKE_OFF= -DDISABLE_PULSEAUDIO:BOOL=ON |
| 60 |
PORTAUDIO_DESC= Enable PortAudio (mic) support |
| 61 |
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio |
| 62 |
PORTAUDIO_CMAKE_ON= -DDISABLE_PORTAUDIO:BOOL=OFF |
| 63 |
PORTAUDIO_CMAKE_OFF= -DDISABLE_PORTAUDIO:BOOL=ON |
| 64 |
DEBUG_MAKE_ENV= VERBOSE=yes |
| 65 |
DEBUG_CMAKE_ON= -DFASTLOG:BOOL=ON |
| 66 |
DEBUG_CMAKE_OFF= -DFASTLOG:BOOL=OFF |
| 67 |
FRAMEDUMPS_DESC= Encode framedumps in AVI format |
| 68 |
FRAMEDUMPS_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ |
| 69 |
libavformat.so:multimedia/ffmpeg \ |
| 70 |
libswscale.so:multimedia/ffmpeg \ |
| 71 |
libavutil.so:multimedia/ffmpeg |
| 72 |
FRAMEDUMPS_CMAKE_ON= -DENCODE_FRAMEDUMPS:BOOL=ON |
| 73 |
FRAMEDUMPS_CMAKE_OFF= -DENCODE_FRAMEDUMPS:BOOL=OFF |
| 74 |
UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc |
| 75 |
UPNP_CMAKE_ON= -DUSE_UPNP:BOOL=ON |
| 76 |
UPNP_CMAKE_OFF= -DUSE_UPNP:BOOL=OFF |
| 77 |
NLS_USES= gettext |
| 78 |
NLS_CMAKE_ON= -DDISABLE_NLS:BOOL=OFF |
| 79 |
NLS_CMAKE_OFF= -DDISABLE_NLS:BOOL=ON |
| 80 |
|
| 81 |
.include <bsd.port.pre.mk> |
| 82 |
|
| 83 |
# JIT-enabled binaries are amd64 only |
| 84 |
.if ${ARCH} != "amd64" |
| 85 |
CMAKE_ARGS+= -DENABLE_GENERIC:BOOL=ON |
| 86 |
.endif |
| 87 |
|
| 88 |
# When building with Gcc, needs Gcc 4.9+ |
| 89 |
.if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} < 49 |
| 90 |
USE_GCC= 4.9+ |
| 91 |
# Enable std::stoul() |
| 92 |
CXXFLAGS+= -D_GLIBCXX_USE_C99 |
| 93 |
# Enable log2f(), exp2f() and roundf() |
| 94 |
CXXFLAGS+= -D_GLIBCXX_USE_C99_MATH_TR1 |
| 95 |
# Turn on extra long double versions of math functions, needed for cmath |
| 96 |
CXXFLAGS+= -D__ISO_C_VISIBLE=1999 -D_DECLARE_C99_LDBL_MATH |
| 97 |
.endif |
| 98 |
|
| 99 |
.include <bsd.port.post.mk> |