aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/mednafen
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-10-25 21:45:13 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-10-25 21:45:13 +0800
commit3fbf88a1b34c3db361a9e309947b2a1357a970bd (patch)
tree1109517fadb919f5dad4fcc12fedd283ac2b7e48 /emulators/mednafen
parentf5e5181a1f442bd3c3dff1c3f2d7683f9f09c609 (diff)
downloadfreebsd-ports-gnome-3fbf88a1b34c3db361a9e309947b2a1357a970bd.tar.gz
freebsd-ports-gnome-3fbf88a1b34c3db361a9e309947b2a1357a970bd.tar.zst
freebsd-ports-gnome-3fbf88a1b34c3db361a9e309947b2a1357a970bd.zip
- Fix build on 11.x+ by fixing abs() issue
- Mention c++11 requirement - Mark broken on 9.x: does not build due to lacking c++11 support Approved by: portmgr blanket
Diffstat (limited to 'emulators/mednafen')
-rw-r--r--emulators/mednafen/Makefile7
-rw-r--r--emulators/mednafen/files/patch-src_cdrom_CDAccess__CCD.cpp11
2 files changed, 15 insertions, 3 deletions
diff --git a/emulators/mednafen/Makefile b/emulators/mednafen/Makefile
index 9f4f5be778d0..9dc1f417a266 100644
--- a/emulators/mednafen/Makefile
+++ b/emulators/mednafen/Makefile
@@ -16,6 +16,9 @@ LIB_DEPENDS= libcdio.so:sysutils/libcdio \
libsndfile.so:audio/libsndfile \
libvorbis.so:audio/libvorbis
+BROKEN_sparc64= does not compile due to internal compiler error
+BROKEN_FreeBSD_9= does not build
+
GNU_CONFIGURE= yes
USE_SDL= sdl net
USE_GL= gl glu
@@ -27,7 +30,7 @@ SUB_FILES= pkg-message
CONFIGURE_ARGS+=--disable-alsa --disable-alsatest \
--with-sdl-prefix=${LOCALBASE}
-USES= cpe iconv pkgconfig:build tar:bzip2
+USES= compiler:c++11-lib cpe iconv pkgconfig:build tar:bzip2
CPE_VENDOR= david_shadoff
OPTIONS_DEFINE= NLS DOCS JACK
@@ -70,8 +73,6 @@ 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' \
diff --git a/emulators/mednafen/files/patch-src_cdrom_CDAccess__CCD.cpp b/emulators/mednafen/files/patch-src_cdrom_CDAccess__CCD.cpp
new file mode 100644
index 000000000000..1b33993f434c
--- /dev/null
+++ b/emulators/mednafen/files/patch-src_cdrom_CDAccess__CCD.cpp
@@ -0,0 +1,11 @@
+--- src/cdrom/CDAccess_CCD.cpp.orig 2015-02-22 20:50:48 UTC
++++ src/cdrom/CDAccess_CCD.cpp
+@@ -346,7 +346,7 @@ void CDAccess_CCD::CheckSubQSanity(void)
+ if(prev_lba != INT_MAX && abs(lba - prev_lba) > 100)
+ throw MDFN_Error(0, _("Garbage subchannel Q data detected(excessively large jump in AMSF)"));
+
+- if(abs(lba - s) > 100)
++ if(abs((long long)lba - (long long)s) > 100)
+ throw MDFN_Error(0, _("Garbage subchannel Q data detected(AMSF value is out of tolerance)"));
+
+ prev_lba = lba;