freebsd-ports/emulators/higan/Makefile
Gerald Pfeifer 3be3e90f93 Update to libmpc version 1.0.1 which brings the following fixes:
- Switched to automake 1.11.6, see CVE-2012-3386.
 - #14669: Fixed extraction of CC from gmp.h.
 - Fixed case of intermediate zero real or imaginary part in mpc_fma,
   found by hydra with GMP_CHECK_RANDOMIZE=1346362345.

This is on top of the following changes from version 1.0

 - Licence change towards LGPLv3+ for the code and GFDLv1.3+ (with no
   invariant sections) for the documentation.
 - 100% of all lines are covered by tests
 - Renamed functions
   . mpc_mul_2exp to mpc_mul_2ui
   . mpc_div_2exp to mpc_div_2ui
 - 0^0, which returned (NaN,NaN) previously, now returns (1,+0).
 - Removed compatibility with K&R compilers, which was untestable due
   to lack of such compilers.
 - New functions
   . mpc_log10
   . mpc_mul_2si, mpc_div_2si
 - Speed-ups
   . mpc_fma
 - Bug fixes
   . mpc_div and mpc_norm now return a value indicating the effective
     rounding direction, as the other functions.
   . mpc_mul, mpc_sqr and mpc_norm now return correct results even if
     there are over- or underflows during the computation.
   . mpc_asin, mpc_proj, mpc_sqr: Wrong result when input variable has
     infinite part and equals output variable is corrected.
   . mpc_fr_sub: Wrong return value for imaginary part is corrected.

Convert to the new LIB_DEPENDS standard and remove hard-coded
.so versions from a couple of dependent ports.

Bump PORTREVISIONS of all dependent ports.

PR:		183141
Approved by:	portmgr (bdrewery)
2013-10-26 00:52:33 +00:00

147 lines
3.5 KiB
Makefile

# Created by: elbarto
# $FreeBSD$
PORTNAME= higan
PORTVERSION= 0.92
PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= GOOGLE_CODE
DISTNAME= ${PORTNAME}_v${PORTVERSION:S/.//}-source
MAINTAINER= cyberbotx@cyberbotx.com
COMMENT= Nintendo multi-system emulator
USES= pkgconfig
USE_XZ= yes
USE_GMAKE= yes
USE_GCC= yes
USE_LDCONFIG= yes
ONLY_FOR_ARCHS= i386 amd64
MAKE_ENV+= c="${CC} -std=gnu99" cpp="${CXX} -std=gnu++0x"
OPTIONS_DEFINE= DEBUG
OPTIONS_SINGLE= PROFILE GUI
OPTIONS_SINGLE_PROFILE= ACCURACY BALANCED PERFORMANCE
OPTIONS_SINGLE_GUI= GTK2 QT4
OPTIONS_MULTI= VIDEO SOUND INPUT
OPTIONS_MULTI_VIDEO= GLX SDL XV
OPTIONS_MULTI_SOUND= AO OPENAL OSS PULSEAUDIO
OPTIONS_MULTI_INPUT= INPUT_SDL INPUT_X
OPTIONS_DEFAULT= BALANCED GTK2 GLX XV SDL \
OSS INPUT_SDL INPUT_X
ACCURACY_DESC= Use accuracy profile
BALACNED_DESC= Use balanced profile
PERFORMANCE_DESC= Use performance profile
GTK2_DESC= Build with GTK+2 GUI
QT4_DESC= Build with QT4 GUI
GLX_DESC= Build GLX video driver
SDL_DESC= Build SDL video driver
XV_DESC= Build Xv video driver
AO_DESC= Build AO sound driver
OPENAL_DESC= Build OpenAL sound driver
OSS_DESC= Build OSS sound driver
PULSEAUDIO_DESC= Build Pulseaudio sound driver
INPUT_SDL_DESC= Build SDL input driver
INPUT_X_DESC= Build X input driver
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MACCURACY}
MAKE_ENV+= profile="accuracy"
.elif ${PORT_OPTIONS:MBALANCED}
MAKE_ENV+= profile="balanced"
.else
MAKE_ENV+= profile="performance"
.endif
.if ${PORT_OPTIONS:MGTK2}
USE_GNOME+= gtk20
MAKE_ENV+= phoenix="gtk"
.endif
.if ${PORT_OPTIONS:MQT4}
USE_QT4+= gui moc_build
MAKE_ENV+= phoenix="qt"
.endif
.if ${PORT_OPTIONS:MGLX}
USE_GL+= gl
VIDEO_DRIVER+= video.glx
.endif
.if ${PORT_OPTIONS:MXV}
USE_XORG+= xv
VIDEO_DRIVER+= video.xv
.endif
.if ${PORT_OPTIONS:MSDL}
USE_XORG+= xv
USE_SDL+= sdl
VIDEO_DRIVER+= video.sdl
.endif
.if ${PORT_OPTIONS:MOPENAL}
USE_OPENAL+= al
AUDIO_DRIVER+= audio.openal
.endif
.if ${PORT_OPTIONS:MOSS}
AUDIO_DRIVER+= audio.oss
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio
AUDIO_DRIVER+= audio.pulseaudio
.endif
.if ${PORT_OPTIONS:MAO}
LIB_DEPENDS+= ao:${PORTSDIR}/audio/libao
AUDIO_DRIVER+= audio.ao
.endif
.if ${PORT_OPTIONS:MINPUT_X}
INPUT_DRIVER+= input.x
.endif
.if ${PORT_OPTIONS:MINPUT_SDL}
USE_SDL+= sdl
INPUT_DRIVER+= input.sdl
.endif
post-patch:
${REINPLACE_CMD} \
-e 's|%%VIDEO%%|${VIDEO_DRIVER}|' \
-e 's|%%AUDIO%%|${AUDIO_DRIVER}|' \
-e 's|%%INPUT%%|${INPUT_DRIVER}|' \
${WRKSRC}/higan/target-ethos/Makefile
.if ${PORT_OPTIONS:MDEBUG}
${REINPLACE_CMD} -e 's|-O3|-g|g' \
${WRKSRC}/ananke/Makefile \
${WRKSRC}/higan/Makefile
${REINPLACE_CMD} -e 's|:= -s|:= #|g' \
${WRKSRC}/higan/Makefile
.endif
${RM} ${WRKSRC}/shaders/Sepia.Direct3D.shader
do-build:
.for d in higan ananke
.if ${PORT_OPTIONS:MQT4}
cd ${WRKSRC}/${d}/phoenix/qt && ${MOC} -i -o platform.moc platform.moc.hpp
.endif
cd ${WRKSRC}/${d} && ${GMAKE} ${MAKE_ENV}
.endfor
do-install:
${INSTALL_LIB} ${WRKSRC}/ananke/libananke.so ${PREFIX}/lib/libananke.so.1
${LN} -sf ${PREFIX}/lib/libananke.so.1 ${PREFIX}/lib/libananke.so
${INSTALL_PROGRAM} ${WRKSRC}/higan/out/higan ${PREFIX}/bin/
${INSTALL_DATA} ${WRKSRC}/higan/data/higan.png ${PREFIX}/share/pixmaps/
${INSTALL_DATA} ${WRKSRC}/higan/data/higan.desktop ${PREFIX}/share/applications/
${MKDIR} ${DATADIR}/Video\ Shaders
(cd ${WRKSRC}/higan/profile && ${COPYTREE_SHARE} \* ${DATADIR}/)
${INSTALL_DATA} ${WRKSRC}/shaders/* ${DATADIR}/Video\ Shaders/
.include <bsd.port.mk>