aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/libretro-cores/Makefile114
-rw-r--r--games/libretro-cores/distinfo192
-rw-r--r--games/libretro-cores/files/patch-81-libretro_81_sp0256.c10
-rw-r--r--games/libretro-cores/files/patch-Craft_Makefile.libretro22
-rw-r--r--games/libretro-cores/files/patch-Craft_deps_sqlite_sqlite3.c20
-rw-r--r--games/libretro-cores/files/patch-Dinothawr_libretro-common_rthreads_rthreads.c10
-rw-r--r--games/libretro-cores/files/patch-beetle-bsnes-libretro_Makefile11
-rw-r--r--games/libretro-cores/files/patch-beetle-pcfx-libretro_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-beetle-pcfx-libretro_mednafen_sound_OwlResampler.cpp2
-rw-r--r--games/libretro-cores/files/patch-beetle-psx-libretro_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-bsnes-libretro_Makefile4
-rw-r--r--games/libretro-cores/files/patch-bsnes-libretro_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-bsnes-libretro_nall_Makefile11
-rw-r--r--games/libretro-cores/files/patch-bsnes-libretro_nall_platform.hpp15
-rw-r--r--games/libretro-cores/files/patch-bsnes-libretro_target-libretro_Makefile4
-rw-r--r--games/libretro-cores/files/patch-desmume_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-desmume_desmume_src_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-emux_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-emux_libretro_Makefile.bsd2
-rw-r--r--games/libretro-cores/files/patch-fbalpha_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-fbalpha_makefile.libretro10
-rw-r--r--games/libretro-cores/files/patch-fbalpha_src_cpu_mips3_mips3_dasm.cpp12
-rw-r--r--games/libretro-cores/files/patch-gambatte-libretro_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-hatari_Makefile.libretro10
-rw-r--r--games/libretro-cores/files/patch-hatari_libretro_libretro-sdk_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-libretro-fceumm_src_general.c20
-rw-r--r--games/libretro-cores/files/patch-libretro-lutro_Makefile12
-rw-r--r--games/libretro-cores/files/patch-libretro-uae_Makefile10
-rw-r--r--games/libretro-cores/files/patch-libretro-uae_sources_src_disk.c11
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_3rdparty_genie_build_gmake.linux_genie.make20
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_3rdparty_mongoose_test_Makefile11
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_Makefile23
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_src_lib_lib.mak15
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_src_osd_modules_sync_sync__retro.c2
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrodir.c2
-rw-r--r--games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrofile.c72
-rw-r--r--games/libretro-cores/files/patch-meteor-libretro_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-mgba_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-nestopia_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-nxengine-libretro_Makefile10
-rw-r--r--games/libretro-cores/files/patch-pcsx__rearmed_Makefile.libretro6
-rw-r--r--games/libretro-cores/files/patch-reicast-emulator_Makefile35
-rw-r--r--games/libretro-cores/files/patch-reicast-emulator_Makefile.common11
-rw-r--r--games/libretro-cores/files/patch-reicast-emulator_core_hw_sh4_dyna_driver.cpp11
-rw-r--r--games/libretro-cores/files/patch-reicast-emulator_core_libretro_common.cpp68
-rw-r--r--games/libretro-cores/files/patch-scummvm_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-snes9x2010_Makefile.libretro6
-rw-r--r--games/libretro-cores/files/patch-snes9x_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-vba-next_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-cores/files/patch-vbam-libretro_Makefile.freebsd2
-rw-r--r--games/libretro-cores/files/patch-yabause_Makefile.freebsd2
-rw-r--r--games/libretro-cores/pkg-descr8
53 files changed, 507 insertions, 385 deletions
diff --git a/games/libretro-cores/Makefile b/games/libretro-cores/Makefile
index b0d70fed1d38..ed6b2fc3ebf8 100644
--- a/games/libretro-cores/Makefile
+++ b/games/libretro-cores/Makefile
@@ -2,79 +2,85 @@
# $FreeBSD$
PORTNAME= libretro-cores
-PORTVERSION= 0.20151110
-PORTREVISION= 2
+PORTVERSION= 0.20161109
CATEGORIES= games
MAINTAINER= yuri@rawbw.com
COMMENT= Core pack for RetroArch
BUILD_DEPENDS= cmake:devel/cmake
+LIB_DEPENDS+= libinotify.so:devel/libinotify # for libretro-lutro
+LIB_DEPENDS+= libcurl.so:ftp/curl # for Craft
ONLY_FOR_ARCHS= i386 amd64
# core list (complete list that libretro distributes: http://buildbot.libretro.com/nightly/linux/x86_64/latest/)
-ALL_CORES+= libretro:libretro-2048:2048:d69235a:x
-ALL_CORES+= libretro:4do-libretro:4do:cbd700e:x
+ALL_CORES+= libretro:libretro-2048:2048:6730b2b:x
+ALL_CORES+= libretro:4do-libretro:4do:f433301:x
+ALL_CORES+= libretro:81-libretro:81:b484a7a:x
ALL_CORES+= libretro:blueMSX-libretro:bluemsx:ee4ff9c:x
-ALL_CORES+= libretro:bsnes-libretro:bsnes:ee95143:accuracy,balanced,performance
+ALL_CORES+= libretro:bsnes-libretro:bsnes:365c5c1:accuracy,balanced,performance
ALL_CORES+= libretro:CATSFC-libretro:catsfc:5907687:x
-ALL_CORES+= libretro:desmume:desmume:cae5945:x
-ALL_CORES+= libretro:Dinothawr:dinothawr:b49d969:x
-ALL_CORES+= libretro:dosbox-libretro:dosbox:bc5d578:x
-ALL_CORES+= libretro:emux:emux:be9022b:chip8,gb,nes,sms
+ALL_CORES+= libretro:Craft:craft:dc6ae44:x
+ALL_CORES+= libretro:desmume:desmume:ab1bd5a:x
+ALL_CORES+= libretro:Dinothawr:dinothawr:4ef365e:x
+ALL_CORES+= libretro:dosbox-libretro:dosbox:e1ab4fc:x
+ALL_CORES+= libretro:emux:emux:834f9f9:chip8,gb,nes,sms
ALL_CORES+= libretro:fba_cores_cps1:fb_alpha_cps1:5614a9a:x
ALL_CORES+= libretro:fba_cores_cps2:fb_alpha_cps2:f806c77:x
-ALL_CORES+= libretro:fbalpha:fbalpha:2a3256e:x
-ALL_CORES+= libretro:libretro-fceumm:fceumm:70ee9e6:x
-ALL_CORES+= libretro:fmsx-libretro:fmsx:4651948:x
-ALL_CORES+= libretro:fuse-libretro:fuse:c871953:x
+ALL_CORES+= libretro:fbalpha:fbalpha:6d36b3a:x
+ALL_CORES+= libretro:libretro-fceumm:fceumm:50d0dfe:x
+ALL_CORES+= libretro:fmsx-libretro:fmsx:91e6deb:x
+ALL_CORES+= libretro:fuse-libretro:fuse:6cda7ed:x
ALL_CORES+= libretro:gambatte-libretro:gambatte:59fb6a6:x
-ALL_CORES+= libretro:Genesis-Plus-GX:genesis_plus_gx:7d8d5f1:x
-ALL_CORES+= libretro:gpsp:gpsp:f1d14fb:x
-ALL_CORES+= libretro:gw-libretro:gw:95e3c4d:x
-ALL_CORES+= libretro:libretro-handy:handy:13d86fb:x
-ALL_CORES+= libretro:hatari:hatari:204dc6e:x
+ALL_CORES+= libretro:Genesis-Plus-GX:genesis_plus_gx:3c6d839:x
+ALL_CORES+= libretro:gpsp:gpsp:4d860ae:x
+ALL_CORES+= libretro:gw-libretro:gw:0408906:x
+ALL_CORES+= libretro:libretro-handy:handy:84f188b:x
+ALL_CORES+= libretro:hatari:hatari:4930236:x
ALL_CORES+= libretro:imageviewer-libretro:imageviewer:ae1465c:x
-#ALL_CORES+= libretro:mame:mame:a9d5a09:x BROKEN: missing file: https://github.com/libretro/mame/issues/38
-ALL_CORES+= libretro:mame2014-libretro:mame2014:6d370c1:x
-ALL_CORES+= libretro:beetle-gba-libretro:mednafen_gba:5110115:x
-ALL_CORES+= libretro:beetle-lynx-libretro:mednafen_lynx:a29513a:x
-ALL_CORES+= libretro:beetle-ngp-libretro:mednafen_ngp:f18354e:x
-ALL_CORES+= libretro:beetle-pce-fast-libretro:mednafen_pce_fast:6e2eaf7:x
-ALL_CORES+= libretro:beetle-pcfx-libretro:mednafen_pcfx:5b62ae8:x
-ALL_CORES+= libretro:beetle-psx-libretro:mednafen_psx:83b4b48:x
-ALL_CORES+= libretro:beetle-bsnes-libretro:mednafen_snes:7d9be82:x
-ALL_CORES+= libretro:beetle-supergrafx-libretro:mednafen_supergrafx:c6d3488:x
-ALL_CORES+= libretro:beetle-vb-libretro:mednafen_vb:085e0b6:x
-ALL_CORES+= libretro:beetle-wswan-libretro:mednafen_wswan:b850831:x
+ALL_CORES+= libretro:libretro-lutro:lutro:4d6da23:x
+ALL_CORES+= libretro:mame2000-libretro:mame2000:b4ca94b:x
+ALL_CORES+= libretro:mame2003-libretro:mame2003:57f6dae:x
+ALL_CORES+= libretro:mame2014-libretro:mame2014:2e3943d:x
+#ALL_CORES= libretro:mame:mame:cfa60c7:x BROKEN: fails to build https://github.com/libretro/mame/issues/15
+ALL_CORES+= libretro:beetle-gba-libretro:mednafen_gba:b17b3a2:x
+ALL_CORES+= libretro:beetle-lynx-libretro:mednafen_lynx:76fd67f:x
+ALL_CORES+= libretro:beetle-ngp-libretro:mednafen_ngp:15887b8:x
+ALL_CORES+= libretro:beetle-pce-fast-libretro:mednafen_pce_fast:8daf99e:x
+ALL_CORES+= libretro:beetle-pcfx-libretro:mednafen_pcfx:89d16cd:x
+ALL_CORES+= libretro:beetle-psx-libretro:mednafen_psx:e661a34:x
+ALL_CORES+= libretro:beetle-bsnes-libretro:mednafen_snes:ff6938b:x
+ALL_CORES+= libretro:beetle-supergrafx-libretro:mednafen_supergrafx:42c8c0d:x
+ALL_CORES+= libretro:beetle-vb-libretro:mednafen_vb:c99ba93:x
+ALL_CORES+= libretro:beetle-wswan-libretro:mednafen_wswan:afbcd37:x
ALL_CORES+= libretro:meteor-libretro:meteor:38b10c0:x
-ALL_CORES+= mgba-emu:mgba:mgba:b3d08ec:x
+ALL_CORES+= mgba-emu:mgba:mgba:8fd14f4:x
#ALL_CORES+= libretro:mupen64plus-libretro:mupen64plus:7db9296:x BROKEN: needs GLES,GL....
-ALL_CORES+= libretro:nestopia:nestopia:dcaed96:x
-ALL_CORES+= libretro:nxengine-libretro:nxengine:4723600:x
-ALL_CORES+= libretro:libretro-o2em:o2em:c54042e:x
-ALL_CORES+= libretro:pcsx_rearmed:pcsx_rearmed:ce36c10:x
-ALL_CORES+= libretro:picodrive:picodrive:e912fdf:x
+ALL_CORES+= libretro:nestopia:nestopia:b8de4c8:x
+ALL_CORES+= libretro:nxengine-libretro:nxengine:ee65158:x
+ALL_CORES+= libretro:libretro-o2em:o2em:0d54d35:x
+ALL_CORES+= libretro:pcsx_rearmed:pcsx_rearmed:1aa232f:x
+ALL_CORES+= libretro:picodrive:picodrive:0d87bd6:x
#ALL_CORES+= libretro:pocketsnes-libretro:pocketsnes:5339c79:x BROKEN: asm
#ALL_CORES+= libretro:libretro-ppsspp:ppsspp:ea17e27:x BROKEN: requires multiple distfiles?
-ALL_CORES+= libretro:libretro-prboom:prboom:d34af3f:x
-ALL_CORES+= libretro:prosystem-libretro:prosystem:7c8059c:x
-ALL_CORES+= libretro:QuickNES_Core:quicknes:518638b:x
+ALL_CORES+= libretro:libretro-prboom:prboom:d1479f0:x
+ALL_CORES+= libretro:prosystem-libretro:prosystem:b675fdf:x
+ALL_CORES+= libretro:QuickNES_Core:quicknes:ff4c152:x
+ALL_CORES+= libretro:reicast-emulator:reicast:3601150:x
#ALL_CORES+= libretro:libretro-remotejoy:remotejoy:2e99718:x BROKEN: needs linux USB, is this linux-only?
-ALL_CORES+= libretro:scummvm:scummvm:c3e719a:x
+ALL_CORES+= libretro:scummvm:scummvm:47bb6e5:x
ALL_CORES+= libretro:snes9x:snes9x:ccf1ee2:x
-# broken for now
ALL_CORES+= libretro:snes9x2010:snes9x2010:dfb7eef:x
-ALL_CORES+= libretro:stella-libretro:stella:96619e4:x
-ALL_CORES+= libretro:tgbdual-libretro:tgbdual:b1bf294:x
-ALL_CORES+= libretro:tyrquake:tyrquake:8261e19:x
-#ALL_CORES+= libretro:libretro-uae:uae:7cbc230:x BROKEN: compile error https://github.com/libretro/libretro-uae/issues/4
-ALL_CORES+= libretro:vba-next:vba_next:0c20cd9:x
+ALL_CORES+= libretro:stella-libretro:stella:3aa5737:x
+ALL_CORES+= libretro:tgbdual-libretro:tgbdual:6f8bfe5:x
+ALL_CORES+= libretro:tyrquake:tyrquake:34bd008:x
+ALL_CORES+= libretro:libretro-uae:puae:99af768:x
+ALL_CORES+= libretro:vba-next:vba_next:7623670:x
ALL_CORES+= libretro:vbam-libretro:vbam:bedddba:x
-ALL_CORES+= libretro:libretro-vecx:vecx:be67ef1:x
-ALL_CORES+= libretro:virtualjaguar-libretro:virtualjaguar:ffec5c7:x
-ALL_CORES+= libretro:yabause:yabause:b121882:x
+ALL_CORES+= libretro:libretro-vecx:vecx:1a86382:x
+ALL_CORES+= libretro:virtualjaguar-libretro:virtualjaguar:8be4390:x
+ALL_CORES+= libretro:yabause:yabause:dac3c5a:x
USE_GITHUB= nodefault
@@ -96,10 +102,10 @@ PLIST_FILES:= ${PLIST_FILES:S/_x_libretro/_libretro/}
WRKSRC= ${WRKDIR}/all-cores
-USES= compiler:c++11-lib dos2unix gmake lua:53 python:2
+USES= compiler:c++11-lib dos2unix gmake lua:53 python:2 ssl
USE_LDCONFIG= yes
USE_GL= gl
-DOS2UNIX_FILES= hatari/Makefile.libretro
+DOS2UNIX_FILES= hatari/Makefile.libretro 81-libretro/81/sp0256.c libretro-uae/Makefile
.include <bsd.port.pre.mk>
@@ -120,6 +126,9 @@ do-build:
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} Makefile.freebsd ${_MAKE_JOBS} ${MAKE_ARGS}; \
elif [ -f Makefile.libretro ]; then \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} Makefile.libretro ${_MAKE_JOBS} ${MAKE_ARGS}; \
+ elif [ -f CMakeLists.txt ]; then \
+ ${SETENV} ${CONFIGURE_ENV} ${LOCALBASE}/bin/cmake . && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} Makefile ${_MAKE_JOBS} ${MAKE_ARGS}; \
else \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} Makefile ${_MAKE_JOBS} ${MAKE_ARGS}; \
fi; \
@@ -131,6 +140,9 @@ do-install:
${INSTALL_LIB} $$(find ${WRKSRC}/$${dir}/ -name "*.so") ${STAGEDIR}/${PREFIX}/libexec/libretro; \
done;
+post-install:
+ @${RM} ${STAGEDIR}/${PREFIX}/libexec/libretro/libcurl.so
+
print-upstream-revisions:
@${ECHO} "--begin print upstream revisions--" && \
${GIT_REV} \
diff --git a/games/libretro-cores/distinfo b/games/libretro-cores/distinfo
index 31bf5d89ad71..09a7e56c3594 100644
--- a/games/libretro-cores/distinfo
+++ b/games/libretro-cores/distinfo
@@ -1,109 +1,123 @@
-TIMESTAMP = 1473306410
-SHA256 (libretro-libretro-2048-d69235a_GH0.tar.gz) = cdbb3e39ef70cf96434491bd28ed8057ed1c5157d39be2f381cbc0ace33422f5
-SIZE (libretro-libretro-2048-d69235a_GH0.tar.gz) = 2681285
-SHA256 (libretro-4do-libretro-cbd700e_GH0.tar.gz) = d11f2bdf41db507c94e1bbbed01cbfea5c69389922cda5013a1edf12f5320454
-SIZE (libretro-4do-libretro-cbd700e_GH0.tar.gz) = 89043
+TIMESTAMP = 1478648600
+SHA256 (libretro-libretro-2048-6730b2b_GH0.tar.gz) = a506fb93e30860af2975771a4566730b75ba8f6432a116cbba2b98289a65769a
+SIZE (libretro-libretro-2048-6730b2b_GH0.tar.gz) = 2681324
+SHA256 (libretro-4do-libretro-f433301_GH0.tar.gz) = 988e0d5db1c7c995338c8aaf6b57a01a46ff27b7d009d7654b02bd5223c32269
+SIZE (libretro-4do-libretro-f433301_GH0.tar.gz) = 92280
+SHA256 (libretro-81-libretro-b484a7a_GH0.tar.gz) = 329644feaa8411b450b73aa16ea91a7523db1250b686674e8f273d71a5912aa3
+SIZE (libretro-81-libretro-b484a7a_GH0.tar.gz) = 1228733
SHA256 (libretro-blueMSX-libretro-ee4ff9c_GH0.tar.gz) = 70f36e94737428859452bef673074b283cd3663f01c8327d9b1104ae98770a1e
SIZE (libretro-blueMSX-libretro-ee4ff9c_GH0.tar.gz) = 2401332
-SHA256 (libretro-bsnes-libretro-ee95143_GH0.tar.gz) = d9485f98d4ecde4364696f57a4b72c5e3272450f26a8ad09c4f358a95f3046da
-SIZE (libretro-bsnes-libretro-ee95143_GH0.tar.gz) = 1254575
+SHA256 (libretro-bsnes-libretro-365c5c1_GH0.tar.gz) = 087d97c6396e778f2e8873c45f50d2c7934dc4e67585314cf615e4223366089a
+SIZE (libretro-bsnes-libretro-365c5c1_GH0.tar.gz) = 1254980
SHA256 (libretro-CATSFC-libretro-5907687_GH0.tar.gz) = d5f72a5f40d6fb70efd2d4599b07a64209f37450cf910e9fff03649b22054ae4
SIZE (libretro-CATSFC-libretro-5907687_GH0.tar.gz) = 373347
-SHA256 (libretro-desmume-cae5945_GH0.tar.gz) = 6763e5167ed245c75686facf9b9722969e339dd7f9b073ea1a3c720e28c58185
-SIZE (libretro-desmume-cae5945_GH0.tar.gz) = 2112170
-SHA256 (libretro-Dinothawr-b49d969_GH0.tar.gz) = a9f00834a84a4c41b33848bcc2c6d7726df81f17f92864e3d8a85f8b88571198
-SIZE (libretro-Dinothawr-b49d969_GH0.tar.gz) = 6547335
-SHA256 (libretro-dosbox-libretro-bc5d578_GH0.tar.gz) = 139d376bd367045767df7f0640902d97d96bce690048f7d3079de5a831f2ee3e
-SIZE (libretro-dosbox-libretro-bc5d578_GH0.tar.gz) = 1183334
-SHA256 (libretro-emux-be9022b_GH0.tar.gz) = fa64a21371f2617c819502f71992989e6bcddde53b1c26edf85900addddb6472
-SIZE (libretro-emux-be9022b_GH0.tar.gz) = 171134
+SHA256 (libretro-Craft-dc6ae44_GH0.tar.gz) = 5a19a6d802118fe226d37f17d430ad98ae02d27645a977310d96b778633dcf97
+SIZE (libretro-Craft-dc6ae44_GH0.tar.gz) = 3147914
+SHA256 (libretro-desmume-ab1bd5a_GH0.tar.gz) = b7f89e0690d7ec6abdfad952ba72028deef21ec1e4d73b91945e4f0abe0b41fb
+SIZE (libretro-desmume-ab1bd5a_GH0.tar.gz) = 1370736
+SHA256 (libretro-Dinothawr-4ef365e_GH0.tar.gz) = 7c58bf98584c949c77fbbc698f9ded89397f14367773f01dc59f4804e1853bfb
+SIZE (libretro-Dinothawr-4ef365e_GH0.tar.gz) = 6823843
+SHA256 (libretro-dosbox-libretro-e1ab4fc_GH0.tar.gz) = 10623164942c7b5d8db391067d7dd5d2140c44c7969d705c67884b3723b943e3
+SIZE (libretro-dosbox-libretro-e1ab4fc_GH0.tar.gz) = 1166432
+SHA256 (libretro-emux-834f9f9_GH0.tar.gz) = 8196f1389bfd6bd5b7369e54daabd8e66ec6882b3dd1037ae2a1e96409a6ef72
+SIZE (libretro-emux-834f9f9_GH0.tar.gz) = 186822
SHA256 (libretro-fba_cores_cps1-5614a9a_GH0.tar.gz) = 3bf217e9fb5032c6bc6087473386078fd5d853ea2eb59c6b43bdf4da7f412ef8
SIZE (libretro-fba_cores_cps1-5614a9a_GH0.tar.gz) = 1081153
SHA256 (libretro-fba_cores_cps2-f806c77_GH0.tar.gz) = 0bfea9aa0cdb1d1ce5cc94de3fd23f6fd39882023c72667f46d60f77de509a7a
SIZE (libretro-fba_cores_cps2-f806c77_GH0.tar.gz) = 854972
-SHA256 (libretro-fbalpha-2a3256e_GH0.tar.gz) = c82dc90ad83e363eb82faf8b491dc9163592602d1ce0c46c03415cde342a5457
-SIZE (libretro-fbalpha-2a3256e_GH0.tar.gz) = 7848817
-SHA256 (libretro-libretro-fceumm-70ee9e6_GH0.tar.gz) = 015eb4c229a8e71a929b164a363f2099fc7eaab8e1aeed1d5dd2b0c733185e67
-SIZE (libretro-libretro-fceumm-70ee9e6_GH0.tar.gz) = 385028
-SHA256 (libretro-fmsx-libretro-4651948_GH0.tar.gz) = 8df8c7637e4ff9d4ad93fef4531c1fa5797a07c57c53b44e6f316efabf5a765a
-SIZE (libretro-fmsx-libretro-4651948_GH0.tar.gz) = 531605
-SHA256 (libretro-fuse-libretro-c871953_GH0.tar.gz) = 80ca38b6f3d9d668d416b359dacb14ce37373e9e7fd812560643defb182d449f
-SIZE (libretro-fuse-libretro-c871953_GH0.tar.gz) = 4311923
+SHA256 (libretro-fbalpha-6d36b3a_GH0.tar.gz) = 7fb141d6a9d7fc913a500405b606f4a335576b8683b1ebf35247322252d2aaac
+SIZE (libretro-fbalpha-6d36b3a_GH0.tar.gz) = 8234970
+SHA256 (libretro-libretro-fceumm-50d0dfe_GH0.tar.gz) = 70b2b71b7eab34b63afee6d74954e4c62b11df6bd09fad868fa64f3660a2353e
+SIZE (libretro-libretro-fceumm-50d0dfe_GH0.tar.gz) = 392030
+SHA256 (libretro-fmsx-libretro-91e6deb_GH0.tar.gz) = 8807b188c801f3682e1afc36529aa798611763a2038feba8975cf91d2069b7d0
+SIZE (libretro-fmsx-libretro-91e6deb_GH0.tar.gz) = 531566
+SHA256 (libretro-fuse-libretro-6cda7ed_GH0.tar.gz) = 3e7e89032431b28e4bf7e2c7d5a7b713ffa568fbb0e6771cdf5dc8d057b16a72
+SIZE (libretro-fuse-libretro-6cda7ed_GH0.tar.gz) = 4314484
SHA256 (libretro-gambatte-libretro-59fb6a6_GH0.tar.gz) = 7cc7d1084b39cd5b09d31849f852859a96d5ce1e90c05e0a0c5132418f313cd2
SIZE (libretro-gambatte-libretro-59fb6a6_GH0.tar.gz) = 154552
-SHA256 (libretro-Genesis-Plus-GX-7d8d5f1_GH0.tar.gz) = 27531cf061f46ae3fc17b6316a48c878d5b8da8361107f4d6760b057e4c02ec4
-SIZE (libretro-Genesis-Plus-GX-7d8d5f1_GH0.tar.gz) = 5711794
-SHA256 (libretro-gpsp-f1d14fb_GH0.tar.gz) = 8bca47c9fd772357b5722adfc140586717a7834f099979b68f8310f330bb47dd
-SIZE (libretro-gpsp-f1d14fb_GH0.tar.gz) = 258360
-SHA256 (libretro-gw-libretro-95e3c4d_GH0.tar.gz) = 1a1d948d50a90b23e8dc82e6cc11765e8368c8061c7c763b49f73839e1367276
-SIZE (libretro-gw-libretro-95e3c4d_GH0.tar.gz) = 3448370
-SHA256 (libretro-libretro-handy-13d86fb_GH0.tar.gz) = 1198e14f16af20efc89dcee898e580c938c7e1a0c114e781a988f88f78eb6f52
-SIZE (libretro-libretro-handy-13d86fb_GH0.tar.gz) = 96496
-SHA256 (libretro-hatari-204dc6e_GH0.tar.gz) = 54076d3099a24d464e0ea6ac03cc71bfc84344a495ec545a27ec66e8c02daca0
-SIZE (libretro-hatari-204dc6e_GH0.tar.gz) = 2735110
+SHA256 (libretro-Genesis-Plus-GX-3c6d839_GH0.tar.gz) = 1390dbd1180f0e253adf3bbbf1eb5f674c93e1f466bbbfe66aee62f1f5ecfc57
+SIZE (libretro-Genesis-Plus-GX-3c6d839_GH0.tar.gz) = 5795790
+SHA256 (libretro-gpsp-4d860ae_GH0.tar.gz) = 9ebe4445f56a66cdcb0511cb5e8cb10fe060af213ab4272fbc6c5bf132dcd39a
+SIZE (libretro-gpsp-4d860ae_GH0.tar.gz) = 247888
+SHA256 (libretro-gw-libretro-0408906_GH0.tar.gz) = 01c06ca24eb00840da79390c0099741135affcc562d39f43602befe54e4c98f8
+SIZE (libretro-gw-libretro-0408906_GH0.tar.gz) = 3448801
+SHA256 (libretro-libretro-handy-84f188b_GH0.tar.gz) = f61ec0f4ffed7b3bc87bf2b3b96525f08f4894573150ef178676a6d5880a8b7e
+SIZE (libretro-libretro-handy-84f188b_GH0.tar.gz) = 100845
+SHA256 (libretro-hatari-4930236_GH0.tar.gz) = 82acbacf0d18e9723a6d99251f8577820914ecbff7150a93ee408b7cab9a5f4e
+SIZE (libretro-hatari-4930236_GH0.tar.gz) = 2735280
SHA256 (libretro-imageviewer-libretro-ae1465c_GH0.tar.gz) = 7d638f812acc630938d4b512e21ef686163a1ebd63d8fca8eafd2c1b9c901f40
SIZE (libretro-imageviewer-libretro-ae1465c_GH0.tar.gz) = 80001
-SHA256 (libretro-mame2014-libretro-6d370c1_GH0.tar.gz) = 0da4adc412feed25335ad4a01515185f2633ef3397ef58548c1160cad9e3dedc
-SIZE (libretro-mame2014-libretro-6d370c1_GH0.tar.gz) = 84559250
-SHA256 (libretro-beetle-gba-libretro-5110115_GH0.tar.gz) = 0e421771c6b79ba5acef03f5e43fe834cb4b320e6f9afc5a21a7bd124045b39d
-SIZE (libretro-beetle-gba-libretro-5110115_GH0.tar.gz) = 202956
-SHA256 (libretro-beetle-lynx-libretro-a29513a_GH0.tar.gz) = a288880d18529c962d92b45cb2265125e18bb930b86f0db4e1a10d7077ebb941
-SIZE (libretro-beetle-lynx-libretro-a29513a_GH0.tar.gz) = 172021
-SHA256 (libretro-beetle-ngp-libretro-f18354e_GH0.tar.gz) = 996407c5ba17c46b9b35c4f1519cf040bc6493d22c6c9a890068e6219d7a8e42
-SIZE (libretro-beetle-ngp-libretro-f18354e_GH0.tar.gz) = 196355
-SHA256 (libretro-beetle-pce-fast-libretro-6e2eaf7_GH0.tar.gz) = b7a8be5a41d9f82e82c3237993b4d424c9389f7996a74de45e6f3b2023873ca3
-SIZE (libretro-beetle-pce-fast-libretro-6e2eaf7_GH0.tar.gz) = 366978
-SHA256 (libretro-beetle-pcfx-libretro-5b62ae8_GH0.tar.gz) = 92472d9bd2132646db5693e1a70c5299b6e47895c9e20abe274281a6a9996e41
-SIZE (libretro-beetle-pcfx-libretro-5b62ae8_GH0.tar.gz) = 485807
-SHA256 (libretro-beetle-psx-libretro-83b4b48_GH0.tar.gz) = fcc199577e4d539fcd375083edf328f0844318f2c8f066419f90b7bd1a888c31
-SIZE (libretro-beetle-psx-libretro-83b4b48_GH0.tar.gz) = 444614
-SHA256 (libretro-beetle-bsnes-libretro-7d9be82_GH0.tar.gz) = 2133ee6afef2be455f6dd230e858f0188e199ee6696319910d3328a117da414a
-SIZE (libretro-beetle-bsnes-libretro-7d9be82_GH0.tar.gz) = 506584
-SHA256 (libretro-beetle-supergrafx-libretro-c6d3488_GH0.tar.gz) = 620386fecfb02ec8126e3375b7869892002374c1c2ed93d7d0930c04dddbf73e
-SIZE (libretro-beetle-supergrafx-libretro-c6d3488_GH0.tar.gz) = 378180
-SHA256 (libretro-beetle-vb-libretro-085e0b6_GH0.tar.gz) = 92bc807fd7448ea01c6b9a292def205eb4d0294b54fb61c2f2129f718d1516fe
-SIZE (libretro-beetle-vb-libretro-085e0b6_GH0.tar.gz) = 201233
-SHA256 (libretro-beetle-wswan-libretro-b850831_GH0.tar.gz) = 53f2c11e9d860abce2552cfc26659c57bc1e6c6b7147744b56db2b8dd33542b2
-SIZE (libretro-beetle-wswan-libretro-b850831_GH0.tar.gz) = 175725
+SHA256 (libretro-libretro-lutro-4d6da23_GH0.tar.gz) = 957facfd880b031ae15b3f279d943087cbcb5fec0a48177bce24ff9a74f48ca5
+SIZE (libretro-libretro-lutro-4d6da23_GH0.tar.gz) = 3372409
+SHA256 (libretro-mame2000-libretro-b4ca94b_GH0.tar.gz) = 670c3065696fd84a86c29f1470548f9f6a3ef8c0db02a0aac33f319d47b49194
+SIZE (libretro-mame2000-libretro-b4ca94b_GH0.tar.gz) = 4560919
+SHA256 (libretro-mame2003-libretro-57f6dae_GH0.tar.gz) = fa6fb6e4734d134c29b112259de6f171d61844fa3a7b1f6e17549a48e284ea94
+SIZE (libretro-mame2003-libretro-57f6dae_GH0.tar.gz) = 9679405
+SHA256 (libretro-mame2014-libretro-2e3943d_GH0.tar.gz) = 325af5af7ea4a43c6f350a05adc883fd357a0d80f522939d17646d2f8706663c
+SIZE (libretro-mame2014-libretro-2e3943d_GH0.tar.gz) = 84559993
+SHA256 (libretro-beetle-gba-libretro-b17b3a2_GH0.tar.gz) = 2051dcf72a07608113bb2eb3233b3aaec791ca4c4d2a403d1252e09dfc9e8543
+SIZE (libretro-beetle-gba-libretro-b17b3a2_GH0.tar.gz) = 167336
+SHA256 (libretro-beetle-lynx-libretro-76fd67f_GH0.tar.gz) = 6bdb59d8e68657e45f0245c90a071a1adbf8707eb2de8ef5e1261c0e0c20afdb
+SIZE (libretro-beetle-lynx-libretro-76fd67f_GH0.tar.gz) = 127986
+SHA256 (libretro-beetle-ngp-libretro-15887b8_GH0.tar.gz) = d48806e393da7b59140cdc3f890a87bb67b6a844ac6b6ed9a3c590363d6088bd
+SIZE (libretro-beetle-ngp-libretro-15887b8_GH0.tar.gz) = 167919
+SHA256 (libretro-beetle-pce-fast-libretro-8daf99e_GH0.tar.gz) = 52ccf51970f0683d17309073fef55f6831d72a35923ad34f222aff6e7ba6929b
+SIZE (libretro-beetle-pce-fast-libretro-8daf99e_GH0.tar.gz) = 363345
+SHA256 (libretro-beetle-pcfx-libretro-89d16cd_GH0.tar.gz) = 7cecd31211dd984d48f15989202a7ea6befd7691ce501fc7fe81ff6eb5763a9f
+SIZE (libretro-beetle-pcfx-libretro-89d16cd_GH0.tar.gz) = 456954
+SHA256 (libretro-beetle-psx-libretro-e661a34_GH0.tar.gz) = 9408a7278c244686f69a8edfb921595e28dfe0f56093012db3deadf8cc890372
+SIZE (libretro-beetle-psx-libretro-e661a34_GH0.tar.gz) = 1011281
+SHA256 (libretro-beetle-bsnes-libretro-ff6938b_GH0.tar.gz) = 81dd34c6d93e945e2b3a65216a9fc9189d229ab651ee4472f028207575ffed35
+SIZE (libretro-beetle-bsnes-libretro-ff6938b_GH0.tar.gz) = 472756
+SHA256 (libretro-beetle-supergrafx-libretro-42c8c0d_GH0.tar.gz) = ad8a61cb111b3422f3115e66619b38097b209e52c68a557a27c7eb4e3b6b8864
+SIZE (libretro-beetle-supergrafx-libretro-42c8c0d_GH0.tar.gz) = 349360
+SHA256 (libretro-beetle-vb-libretro-c99ba93_GH0.tar.gz) = 5b88f5b478f53dfc440075075f2a88a1c5d1eb63cf82377fd0651cda466b5b8d
+SIZE (libretro-beetle-vb-libretro-c99ba93_GH0.tar.gz) = 171328
+SHA256 (libretro-beetle-wswan-libretro-afbcd37_GH0.tar.gz) = f842b98f40477fc736e3a5e8e7790dc783d96fd4846f0dc93d0d7768d42d90e7
+SIZE (libretro-beetle-wswan-libretro-afbcd37_GH0.tar.gz) = 145959
SHA256 (libretro-meteor-libretro-38b10c0_GH0.tar.gz) = b11895884474f0f8caee06795c146f0d387e33b22ded769542fd440b8dc8bd31
SIZE (libretro-meteor-libretro-38b10c0_GH0.tar.gz) = 241351
-SHA256 (mgba-emu-mgba-b3d08ec_GH0.tar.gz) = fd6bbdff1d912478121c8c20f8bc1a3b23daa7e59dbfd0a943b4b303639dc6dd
-SIZE (mgba-emu-mgba-b3d08ec_GH0.tar.gz) = 4801675
-SHA256 (libretro-nestopia-dcaed96_GH0.tar.gz) = 33c69807e37b422fbd47d96b50748b87eb7d4d5577f1f9b4b93038bcb701ab4b
-SIZE (libretro-nestopia-dcaed96_GH0.tar.gz) = 1271711
-SHA256 (libretro-nxengine-libretro-4723600_GH0.tar.gz) = 52d3694e2939d2efed0fd9a6f3df1f2afbae506f7dcb1959f782ef984d097799
-SIZE (libretro-nxengine-libretro-4723600_GH0.tar.gz) = 2693820
-SHA256 (libretro-libretro-o2em-c54042e_GH0.tar.gz) = 4e458a9b2cc51e06bfe351c1715118fb497bfd1518781dabf43940fae5e638e2
-SIZE (libretro-libretro-o2em-c54042e_GH0.tar.gz) = 66521
-SHA256 (libretro-pcsx_rearmed-ce36c10_GH0.tar.gz) = ed894d4259fd5af6e144a777ab52be0184d5d92a99c1abd58fb4adad633be101
-SIZE (libretro-pcsx_rearmed-ce36c10_GH0.tar.gz) = 1186011
-SHA256 (libretro-picodrive-e912fdf_GH0.tar.gz) = b13acc5014ecd157ca3929abb96a50ee3ab0fba6a6fb5124fd9d1bcaa0699e1e
-SIZE (libretro-picodrive-e912fdf_GH0.tar.gz) = 1376528
-SHA256 (libretro-libretro-prboom-d34af3f_GH0.tar.gz) = d4e0d2564100cda30d93002fb0d2791c26c06c07e28fc17abc46a543140a992e
-SIZE (libretro-libretro-prboom-d34af3f_GH0.tar.gz) = 1080987
-SHA256 (libretro-prosystem-libretro-7c8059c_GH0.tar.gz) = c8cc2a4b98e7b686cd45f52e4ad60e56bb50ae4eee3f3d5d63a97ea9360b0c37
-SIZE (libretro-prosystem-libretro-7c8059c_GH0.tar.gz) = 58782
-SHA256 (libretro-QuickNES_Core-518638b_GH0.tar.gz) = 8e91e905f803e249073d57d64498eef205183d96e277d71479a4bbe6a1824835
-SIZE (libretro-QuickNES_Core-518638b_GH0.tar.gz) = 138482
-SHA256 (libretro-scummvm-c3e719a_GH0.tar.gz) = 1e7d8bdbf9afd8c4f5aaf190a7c7de0e3017e9c28bda90c6c5d82837eb27fb78
-SIZE (libretro-scummvm-c3e719a_GH0.tar.gz) = 23890636
+SHA256 (mgba-emu-mgba-8fd14f4_GH0.tar.gz) = 99989329f773548918a9a25a36257687b2067824257dd06ee6ff56ae68cb1998
+SIZE (mgba-emu-mgba-8fd14f4_GH0.tar.gz) = 5351695
+SHA256 (libretro-nestopia-b8de4c8_GH0.tar.gz) = a26224f9570f0310474fd81181f8ee451cc4ce0246cc047190ab07d8d576fda1
+SIZE (libretro-nestopia-b8de4c8_GH0.tar.gz) = 1276664
+SHA256 (libretro-nxengine-libretro-ee65158_GH0.tar.gz) = 93b6c1387aa300c86b0fbcb105f8e2d54bb8463c99ace5b18c80e3ec222c1755
+SIZE (libretro-nxengine-libretro-ee65158_GH0.tar.gz) = 2703059
+SHA256 (libretro-libretro-o2em-0d54d35_GH0.tar.gz) = bfb98e981f57177c26a99465253d4af517e87f9a6a83c9894d67ef9b5bc206f8
+SIZE (libretro-libretro-o2em-0d54d35_GH0.tar.gz) = 66527
+SHA256 (libretro-pcsx_rearmed-1aa232f_GH0.tar.gz) = 07edef8da6623a0550acb6e4a8d6f9135fffeb1083c80466f90b0c0b006707ae
+SIZE (libretro-pcsx_rearmed-1aa232f_GH0.tar.gz) = 1178397
+SHA256 (libretro-picodrive-0d87bd6_GH0.tar.gz) = a2a058ac3bb8b967a3869dc06c0b54ac544289910065c3ac8235501fd4c9426b
+SIZE (libretro-picodrive-0d87bd6_GH0.tar.gz) = 1380011
+SHA256 (libretro-libretro-prboom-d1479f0_GH0.tar.gz) = 0b94d0ff341fb7aa9b7fb127e8f2cd8d5d6a75a58f8e9bfe1b5bf519970f1c4f
+SIZE (libretro-libretro-prboom-d1479f0_GH0.tar.gz) = 2085520
+SHA256 (libretro-prosystem-libretro-b675fdf_GH0.tar.gz) = 4e37c376d2136072b0f84e92f1d1583d697489a371e2a16d3136fa8ebfc84207
+SIZE (libretro-prosystem-libretro-b675fdf_GH0.tar.gz) = 66009
+SHA256 (libretro-QuickNES_Core-ff4c152_GH0.tar.gz) = b5d208a61e75dc1bd496d40fa93a92d366a9b0b0fa7f874f37cabc8691e5e569
+SIZE (libretro-QuickNES_Core-ff4c152_GH0.tar.gz) = 138446
+SHA256 (libretro-reicast-emulator-3601150_GH0.tar.gz) = 1348db3299097c784bc8662a34948722b186b1c02362c601a3e4b2e47e88d621
+SIZE (libretro-reicast-emulator-3601150_GH0.tar.gz) = 1016702
+SHA256 (libretro-scummvm-47bb6e5_GH0.tar.gz) = 67c2992fc228fed058742348c98db4648bb209fd9a0015d672da37576c1073a6
+SIZE (libretro-scummvm-47bb6e5_GH0.tar.gz) = 33506387
SHA256 (libretro-snes9x-ccf1ee2_GH0.tar.gz) = 7f91ab799d9f858775796fba251e3294a3cd3524c72b36f0e3e61f4fe0fe0769
SIZE (libretro-snes9x-ccf1ee2_GH0.tar.gz) = 2133927
SHA256 (libretro-snes9x2010-dfb7eef_GH0.tar.gz) = 19011eac7b69a421ff5f43ce499fe43b450ac1f412870429ad849702924713be
SIZE (libretro-snes9x2010-dfb7eef_GH0.tar.gz) = 384281
-SHA256 (libretro-stella-libretro-96619e4_GH0.tar.gz) = 2cecd7ee012868e305bbd4edc6878b47247ce7ea6ae62ce93b48b8b880870b77
-SIZE (libretro-stella-libretro-96619e4_GH0.tar.gz) = 747535
-SHA256 (libretro-tgbdual-libretro-b1bf294_GH0.tar.gz) = 56687ab994dbb6dc4414cacb85d046722580a3065d3afc92f905a2eeed4c9d75
-SIZE (libretro-tgbdual-libretro-b1bf294_GH0.tar.gz) = 109789
-SHA256 (libretro-tyrquake-8261e19_GH0.tar.gz) = cc9faaa2d1b7b84ba9355189590c10138b5eff5bfed0dbb5910bf069dacc3f61
-SIZE (libretro-tyrquake-8261e19_GH0.tar.gz) = 574800
-SHA256 (libretro-vba-next-0c20cd9_GH0.tar.gz) = 7510dd83fc0ac9c4bf2c9a4191da9559aec7aef496a73b30ba84565dbbf2f059
-SIZE (libretro-vba-next-0c20cd9_GH0.tar.gz) = 135874
+SHA256 (libretro-stella-libretro-3aa5737_GH0.tar.gz) = 9831e4aca4ff3e1b2cd0fee3358c85a54a3ebcb24b08f57328fa43d9b52581a4
+SIZE (libretro-stella-libretro-3aa5737_GH0.tar.gz) = 689482
+SHA256 (libretro-tgbdual-libretro-6f8bfe5_GH0.tar.gz) = 82f132577d76e27def137eebbe187c6cdd00c7bc5f64be09b554a44002a9027f
+SIZE (libretro-tgbdual-libretro-6f8bfe5_GH0.tar.gz) = 109843
+SHA256 (libretro-tyrquake-34bd008_GH0.tar.gz) = a2f233e21db4b5b88a60af057a1861f4d6ea3e2c181ece6625f265c9cedd9cdd
+SIZE (libretro-tyrquake-34bd008_GH0.tar.gz) = 619438
+SHA256 (libretro-libretro-uae-99af768_GH0.tar.gz) = fba197a5b16b4239d75f1d923d7af99a2709c0bbb991be7f3e792e5ae46207ea
+SIZE (libretro-libretro-uae-99af768_GH0.tar.gz) = 7284121
+SHA256 (libretro-vba-next-7623670_GH0.tar.gz) = 8129e6433fe854326e03cc8babf299e9112582a114d455c7ba4e374bbff945e0
+SIZE (libretro-vba-next-7623670_GH0.tar.gz) = 185423
SHA256 (libretro-vbam-libretro-bedddba_GH0.tar.gz) = 45db639102f7fcd8a339f014909a1d971e200d9a3488a54f5733a8cee5e088bb
SIZE (libretro-vbam-libretro-bedddba_GH0.tar.gz) = 1237355
-SHA256 (libretro-libretro-vecx-be67ef1_GH0.tar.gz) = 0cbb52d9365fd0b788ac94aa48953f3ce6ee134f81749c7588640fb3df84be1e
-SIZE (libretro-libretro-vecx-be67ef1_GH0.tar.gz) = 111874
-SHA256 (libretro-virtualjaguar-libretro-ffec5c7_GH0.tar.gz) = 498204de6d4fad904708902f7959398a9b1b7315307ed8bcf677325898a8a6d6
-SIZE (libretro-virtualjaguar-libretro-ffec5c7_GH0.tar.gz) = 1026441
-SHA256 (libretro-yabause-b121882_GH0.tar.gz) = 769b0898fc58d4da4541026359b56ef827b50081218d28116c6927f62d81ebc6
-SIZE (libretro-yabause-b121882_GH0.tar.gz) = 2168003
+SHA256 (libretro-libretro-vecx-1a86382_GH0.tar.gz) = 869b8cd13cae73bb24a3427f7fd3687c072cd5d3ec27fcd35fc1264b06c43247
+SIZE (libretro-libretro-vecx-1a86382_GH0.tar.gz) = 112444
+SHA256 (libretro-virtualjaguar-libretro-8be4390_GH0.tar.gz) = 50c94532e1ac769ace672841bd5df36e00ed98bb255773e2ee6254afcaa618ca
+SIZE (libretro-virtualjaguar-libretro-8be4390_GH0.tar.gz) = 963161
+SHA256 (libretro-yabause-dac3c5a_GH0.tar.gz) = 39c58c75146f08b20e7985c4d8645305ba7e49ef72cb251cae899856644ade64
+SIZE (libretro-yabause-dac3c5a_GH0.tar.gz) = 2168431
diff --git a/games/libretro-cores/files/patch-81-libretro_81_sp0256.c b/games/libretro-cores/files/patch-81-libretro_81_sp0256.c
new file mode 100644
index 000000000000..0c4eb8f0b5c7
--- /dev/null
+++ b/games/libretro-cores/files/patch-81-libretro_81_sp0256.c
@@ -0,0 +1,10 @@
+--- 81-libretro/81/sp0256.c.orig 2016-11-09 04:30:27 UTC
++++ 81-libretro/81/sp0256.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #if !defined(__CELLOS_LV2__) && !defined(__APPLE__)
+-#include <malloc.h>
++#include <stdlib.h>
+ #endif
+ #include <string.h>
+
diff --git a/games/libretro-cores/files/patch-Craft_Makefile.libretro b/games/libretro-cores/files/patch-Craft_Makefile.libretro
new file mode 100644
index 000000000000..435cde27b7aa
--- /dev/null
+++ b/games/libretro-cores/files/patch-Craft_Makefile.libretro
@@ -0,0 +1,22 @@
+--- Craft/Makefile.libretro.orig 2016-10-21 03:09:13 UTC
++++ Craft/Makefile.libretro
+@@ -3,7 +3,7 @@ PERF_TEST=0
+ HAVE_SHARED_CONTEXT=0
+ HAVE_OPENGL=1
+ FORCE_GLES=0
+-HAVE_LIBCURL=0
++HAVE_LIBCURL=1
+
+ INCFLAGS :=
+
+@@ -57,7 +57,9 @@ endif
+ # Unix
+ ifneq (,$(findstring unix,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+- LDFLAGS += -shared -Wl,--version-script=$(ROOT_DIR)/link.T -Wl,--no-undefined
++ CFLAGS += -I$(LOCALBASE)/include
++ CXXFLAGS += -I$(LOCALBASE)/include
++ LDFLAGS += -shared -Wl,--version-script=$(ROOT_DIR)/link.T -Wl,--no-undefined -L$(LOCALBASE)/lib
+
+ fpic = -fPIC
+
diff --git a/games/libretro-cores/files/patch-Craft_deps_sqlite_sqlite3.c b/games/libretro-cores/files/patch-Craft_deps_sqlite_sqlite3.c
new file mode 100644
index 000000000000..f501dd84c6f8
--- /dev/null
+++ b/games/libretro-cores/files/patch-Craft_deps_sqlite_sqlite3.c
@@ -0,0 +1,20 @@
+--- Craft/deps/sqlite/sqlite3.c.orig 2016-10-21 03:09:13 UTC
++++ Craft/deps/sqlite/sqlite3.c
+@@ -17,6 +17,9 @@
+ ** language. The code for the "sqlite3" command-line shell is also in a
+ ** separate file. This file contains only code for the core SQLite library.
+ */
++
++#include <sys/stat.h>
++
+ #define SQLITE_CORE 1
+ #define SQLITE_AMALGAMATION 1
+ #ifndef SQLITE_PRIVATE
+@@ -2330,7 +2333,6 @@ struct sqlite3_mem_methods {
+ #define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
+ #define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
+
+-
+ /*
+ ** CAPI3REF: Enable Or Disable Extended Result Codes
+ **
diff --git a/games/libretro-cores/files/patch-Dinothawr_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-Dinothawr_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..d0f55d2ad802
--- /dev/null
+++ b/games/libretro-cores/files/patch-Dinothawr_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,10 @@
+--- Dinothawr/libretro-common/rthreads/rthreads.c.orig 2016-08-08 17:14:13 UTC
++++ Dinothawr/libretro-common/rthreads/rthreads.c
+@@ -51,6 +51,7 @@
+ #include <time.h>
+ #endif
+
++#include <time.h>
+
+ #ifdef __MACH__
+ #include <mach/clock.h>
diff --git a/games/libretro-cores/files/patch-beetle-bsnes-libretro_Makefile b/games/libretro-cores/files/patch-beetle-bsnes-libretro_Makefile
deleted file mode 100644
index 22c2e2bd8f25..000000000000
--- a/games/libretro-cores/files/patch-beetle-bsnes-libretro_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- beetle-bsnes-libretro/Makefile.orig 2015-10-16 00:48:29 UTC
-+++ beetle-bsnes-libretro/Makefile
-@@ -27,7 +27,7 @@ CORE_DEFINE := -DWANT_SNES_EMU
- TARGET_NAME := mednafen_snes_libretro
-
- ifneq ($(platform),win)
--LDFLAGS += -ldl
-+#LDFLAGS += -ldl
- endif
-
- ifeq ($(platform), unix)
diff --git a/games/libretro-cores/files/patch-beetle-pcfx-libretro_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-beetle-pcfx-libretro_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..552fc73b872e
--- /dev/null
+++ b/games/libretro-cores/files/patch-beetle-pcfx-libretro_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- beetle-pcfx-libretro/libretro-common/rthreads/rthreads.c.orig 2016-09-07 04:41:47 UTC
++++ beetle-pcfx-libretro/libretro-common/rthreads/rthreads.c
+@@ -53,6 +53,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <sys/time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-beetle-pcfx-libretro_mednafen_sound_OwlResampler.cpp b/games/libretro-cores/files/patch-beetle-pcfx-libretro_mednafen_sound_OwlResampler.cpp
index 635955a7d761..87de2117a1a0 100644
--- a/games/libretro-cores/files/patch-beetle-pcfx-libretro_mednafen_sound_OwlResampler.cpp
+++ b/games/libretro-cores/files/patch-beetle-pcfx-libretro_mednafen_sound_OwlResampler.cpp
@@ -1,4 +1,4 @@
---- beetle-pcfx-libretro/mednafen/sound/OwlResampler.cpp.orig 2015-10-16 00:50:34 UTC
+--- beetle-pcfx-libretro/mednafen/sound/OwlResampler.cpp.orig 2016-09-07 04:41:47 UTC
+++ beetle-pcfx-libretro/mednafen/sound/OwlResampler.cpp
@@ -346,7 +346,7 @@ static INLINE void DoMAC_SSE(float *wave
"movups 0(%%" X86_REGC "di), %%xmm0\n\t"
diff --git a/games/libretro-cores/files/patch-beetle-psx-libretro_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-beetle-psx-libretro_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..765eecb20f22
--- /dev/null
+++ b/games/libretro-cores/files/patch-beetle-psx-libretro_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- beetle-psx-libretro/libretro-common/rthreads/rthreads.c.orig 2016-11-07 01:42:50 UTC
++++ beetle-psx-libretro/libretro-common/rthreads/rthreads.c
+@@ -60,6 +60,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <sys/time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-bsnes-libretro_Makefile b/games/libretro-cores/files/patch-bsnes-libretro_Makefile
index 3632535c7773..e25cfa014d38 100644
--- a/games/libretro-cores/files/patch-bsnes-libretro_Makefile
+++ b/games/libretro-cores/files/patch-bsnes-libretro_Makefile
@@ -1,6 +1,6 @@
---- bsnes-libretro/Makefile.orig 2015-10-22 07:40:14 UTC
+--- bsnes-libretro/Makefile.orig 2016-11-04 05:47:02 UTC
+++ bsnes-libretro/Makefile
-@@ -29,7 +29,7 @@ target := libretro
+@@ -32,7 +32,7 @@ sfc_lagfix := 1
ifneq ($(debug),)
flags := -I. -Ilibco -O0 -g
else
diff --git a/games/libretro-cores/files/patch-bsnes-libretro_Makefile.freebsd b/games/libretro-cores/files/patch-bsnes-libretro_Makefile.freebsd
index 0bd99de70360..3df899734280 100644
--- a/games/libretro-cores/files/patch-bsnes-libretro_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-bsnes-libretro_Makefile.freebsd
@@ -1,4 +1,4 @@
---- bsnes-libretro/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- bsnes-libretro/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ bsnes-libretro/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-bsnes-libretro_nall_Makefile b/games/libretro-cores/files/patch-bsnes-libretro_nall_Makefile
deleted file mode 100644
index b720cf155087..000000000000
--- a/games/libretro-cores/files/patch-bsnes-libretro_nall_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- bsnes-libretro/nall/Makefile.orig 2015-10-22 07:40:14 UTC
-+++ bsnes-libretro/nall/Makefile
-@@ -40,7 +40,7 @@ ifeq ($(compiler),)
- else ifeq ($(platform),osx)
- compiler := clang++ -stdlib=libc++
- else
-- compiler := g++
-+ compiler := $(CXX)
- endif
- endif
-
diff --git a/games/libretro-cores/files/patch-bsnes-libretro_nall_platform.hpp b/games/libretro-cores/files/patch-bsnes-libretro_nall_platform.hpp
deleted file mode 100644
index f56c557931be..000000000000
--- a/games/libretro-cores/files/patch-bsnes-libretro_nall_platform.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- bsnes-libretro/nall/platform.hpp.orig 2015-10-22 07:40:14 UTC
-+++ bsnes-libretro/nall/platform.hpp
-@@ -41,11 +41,7 @@ namespace Math {
- #undef interface
- #define dllexport __declspec(dllexport)
- #else
-- #ifdef __APPLE__
-- #include <machine/endian.h>
-- #else
-- #include <endian.h>
-- #endif
-+ #include <machine/endian.h>
- #include <unistd.h>
- #include <pwd.h>
- #define dllexport
diff --git a/games/libretro-cores/files/patch-bsnes-libretro_target-libretro_Makefile b/games/libretro-cores/files/patch-bsnes-libretro_target-libretro_Makefile
index 2d8361e3ef17..39492f0c378c 100644
--- a/games/libretro-cores/files/patch-bsnes-libretro_target-libretro_Makefile
+++ b/games/libretro-cores/files/patch-bsnes-libretro_target-libretro_Makefile
@@ -1,6 +1,6 @@
---- bsnes-libretro/target-libretro/Makefile.orig 2015-10-22 07:40:14 UTC
+--- bsnes-libretro/target-libretro/Makefile.orig 2016-11-04 05:47:02 UTC
+++ bsnes-libretro/target-libretro/Makefile
-@@ -36,7 +36,7 @@ obj/libretro-$(profile).o: $(ui)/libretr
+@@ -38,7 +38,7 @@ obj/libretro-$(profile).o: $(ui)/libretr
#targets
build: $(objects)
ifeq ($(platform),linux)
diff --git a/games/libretro-cores/files/patch-desmume_Makefile.freebsd b/games/libretro-cores/files/patch-desmume_Makefile.freebsd
index c2fec1094a7f..551f5bc9d810 100644
--- a/games/libretro-cores/files/patch-desmume_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-desmume_Makefile.freebsd
@@ -1,4 +1,4 @@
---- desmume/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- desmume/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ desmume/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-desmume_desmume_src_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-desmume_desmume_src_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..064481715f12
--- /dev/null
+++ b/games/libretro-cores/files/patch-desmume_desmume_src_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- desmume/desmume/src/libretro-common/rthreads/rthreads.c.orig 2016-11-01 17:09:43 UTC
++++ desmume/desmume/src/libretro-common/rthreads/rthreads.c
+@@ -60,6 +60,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <sys/time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-emux_Makefile.freebsd b/games/libretro-cores/files/patch-emux_Makefile.freebsd
index 985d1b01ad5a..61624b6040c8 100644
--- a/games/libretro-cores/files/patch-emux_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-emux_Makefile.freebsd
@@ -1,4 +1,4 @@
---- emux/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- emux/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ emux/Makefile.freebsd
@@ -0,0 +1,6 @@
+all:
diff --git a/games/libretro-cores/files/patch-emux_libretro_Makefile.bsd b/games/libretro-cores/files/patch-emux_libretro_Makefile.bsd
index f05d936fe0be..34b966558688 100644
--- a/games/libretro-cores/files/patch-emux_libretro_Makefile.bsd
+++ b/games/libretro-cores/files/patch-emux_libretro_Makefile.bsd
@@ -1,4 +1,4 @@
---- emux/libretro/Makefile.bsd.orig 2015-11-10 19:32:17 UTC
+--- emux/libretro/Makefile.bsd.orig 2016-11-09 04:30:27 UTC
+++ emux/libretro/Makefile.bsd
@@ -0,0 +1,88 @@
+##############
diff --git a/games/libretro-cores/files/patch-fbalpha_Makefile.freebsd b/games/libretro-cores/files/patch-fbalpha_Makefile.freebsd
index 67c6bc3532d7..73d4cb8bd51d 100644
--- a/games/libretro-cores/files/patch-fbalpha_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-fbalpha_Makefile.freebsd
@@ -1,4 +1,4 @@
---- fbalpha/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- fbalpha/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ fbalpha/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-fbalpha_makefile.libretro b/games/libretro-cores/files/patch-fbalpha_makefile.libretro
deleted file mode 100644
index be3d2e3c907d..000000000000
--- a/games/libretro-cores/files/patch-fbalpha_makefile.libretro
+++ /dev/null
@@ -1,10 +0,0 @@
---- fbalpha/makefile.libretro.orig 2016-09-05 06:54:43.000000000 -0700
-+++ fbalpha/makefile.libretro 2016-09-07 19:59:52.496326000 -0700
-@@ -53,6 +53,7 @@
-
- ifeq ($(platform), unix)
- TARGET := $(TARGET_NAME)_libretro.so
-+ PLATFORM_DEFINES := -DUSE_FILE32API
- fpic := -fPIC
- SHARED := -shared -Wl,-no-undefined -Wl,--version-script=$(LIBRETRO_DIR)/link.T
- ENDIANNESS_DEFINES := -DLSB_FIRST
diff --git a/games/libretro-cores/files/patch-fbalpha_src_cpu_mips3_mips3_dasm.cpp b/games/libretro-cores/files/patch-fbalpha_src_cpu_mips3_mips3_dasm.cpp
deleted file mode 100644
index 05c1dcb03f4d..000000000000
--- a/games/libretro-cores/files/patch-fbalpha_src_cpu_mips3_mips3_dasm.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- fbalpha/src/cpu/mips3/mips3_dasm.cpp.orig 2015-11-07 10:29:16 UTC
-+++ fbalpha/src/cpu/mips3/mips3_dasm.cpp
-@@ -6,6 +6,9 @@
- #include <cstring>
- #include "mips3.h"
- #include "mipsdef.h"
-+#include <cstdio>
-+
-+using namespace std;
-
- namespace mips
- {
diff --git a/games/libretro-cores/files/patch-gambatte-libretro_Makefile.freebsd b/games/libretro-cores/files/patch-gambatte-libretro_Makefile.freebsd
index 4c35df1de3a3..616a586d6c3a 100644
--- a/games/libretro-cores/files/patch-gambatte-libretro_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-gambatte-libretro_Makefile.freebsd
@@ -1,4 +1,4 @@
---- gambatte-libretro/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- gambatte-libretro/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ gambatte-libretro/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-hatari_Makefile.libretro b/games/libretro-cores/files/patch-hatari_Makefile.libretro
deleted file mode 100644
index 1d790f5a710d..000000000000
--- a/games/libretro-cores/files/patch-hatari_Makefile.libretro
+++ /dev/null
@@ -1,10 +0,0 @@
---- hatari/Makefile.libretro.orig 2015-11-02 18:02:58 UTC
-+++ hatari/Makefile.libretro
-@@ -20,7 +20,6 @@ EXTERNAL_ZLIB = 0
- TARGET_NAME := hatari
-
- ifeq ($(platform), unix)
-- CC = gcc
- TARGET := $(TARGET_NAME)_libretro.so
- fpic := -fPIC
- SHARED := -lz -lpthread -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined
diff --git a/games/libretro-cores/files/patch-hatari_libretro_libretro-sdk_rthreads_rthreads.c b/games/libretro-cores/files/patch-hatari_libretro_libretro-sdk_rthreads_rthreads.c
new file mode 100644
index 000000000000..bbb610dd234f
--- /dev/null
+++ b/games/libretro-cores/files/patch-hatari_libretro_libretro-sdk_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- hatari/libretro/libretro-sdk/rthreads/rthreads.c.orig 2016-09-09 05:25:46 UTC
++++ hatari/libretro/libretro-sdk/rthreads/rthreads.c
+@@ -44,6 +44,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-libretro-fceumm_src_general.c b/games/libretro-cores/files/patch-libretro-fceumm_src_general.c
deleted file mode 100644
index 9d212b509e7c..000000000000
--- a/games/libretro-cores/files/patch-libretro-fceumm_src_general.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- libretro-fceumm/src/general.c.orig 2015-10-16 01:08:30 UTC
-+++ libretro-fceumm/src/general.c
-@@ -66,7 +66,7 @@ void FCEUI_SetDirOverride(int which, cha
- FCEUSS_CheckStates();
- }
- }
--
-+/*
- #ifndef HAVE_ASPRINTF
- static int asprintf(char **strp, const char *fmt, ...) {
- va_list ap;
-@@ -83,7 +83,7 @@ static int asprintf(char **strp, const c
- return(ret);
- }
- #endif
--
-+*/
- char *FCEU_MakeFName(int type, int id1, char *cd1)
- {
- char *ret = 0;
diff --git a/games/libretro-cores/files/patch-libretro-lutro_Makefile b/games/libretro-cores/files/patch-libretro-lutro_Makefile
new file mode 100644
index 000000000000..d72ca6e7fcb8
--- /dev/null
+++ b/games/libretro-cores/files/patch-libretro-lutro_Makefile
@@ -0,0 +1,12 @@
+--- libretro-lutro/Makefile.orig 2016-11-07 01:47:41 UTC
++++ libretro-lutro/Makefile
+@@ -54,7 +54,8 @@ ifeq ($(platform), unix)
+ SHARED := -shared -Wl,--no-as-needed,--no-undefined
+ LUA_SYSCFLAGS := -DLUA_USE_POSIX
+ HAVE_INOTIFY=1
+- LDFLAGS += -Wl,-E
++ CFLAGS += -I$(LOCALBASE)/include
++ LDFLAGS += -Wl,-E -L$(LOCALBASE)/lib -linotify
+
+ ifeq ($(ARCH), $(filter $(ARCH), intel))
+ WANT_JIT = 1
diff --git a/games/libretro-cores/files/patch-libretro-uae_Makefile b/games/libretro-cores/files/patch-libretro-uae_Makefile
new file mode 100644
index 000000000000..a9f73206ebe2
--- /dev/null
+++ b/games/libretro-cores/files/patch-libretro-uae_Makefile
@@ -0,0 +1,10 @@
+--- libretro-uae/Makefile.orig 2016-09-08 00:35:43 UTC
++++ libretro-uae/Makefile
+@@ -22,7 +22,6 @@ CORE_DIR := .
+ ROOT_DIR := .
+
+ ifeq ($(platform), unix)
+- CC = gcc
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ LDFLAGS := -lz -lpthread
diff --git a/games/libretro-cores/files/patch-libretro-uae_sources_src_disk.c b/games/libretro-cores/files/patch-libretro-uae_sources_src_disk.c
new file mode 100644
index 000000000000..e471cdd4c3ed
--- /dev/null
+++ b/games/libretro-cores/files/patch-libretro-uae_sources_src_disk.c
@@ -0,0 +1,11 @@
+--- libretro-uae/sources/src/disk.c.orig 2016-09-08 00:35:43 UTC
++++ libretro-uae/sources/src/disk.c
+@@ -282,7 +282,7 @@ static void disk_date (uae_u8 *p)
+ struct mytimeval mtv;
+
+ gettimeofday (&tv, NULL);
+- tv.tv_sec -= timezone;
++ //tv.tv_sec -= timezone;
+ mtv.tv_sec = tv.tv_sec;
+ mtv.tv_usec = tv.tv_usec;
+ timeval_to_amiga (&mtv, &days, &mins, &ticks);
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_genie_build_gmake.linux_genie.make b/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_genie_build_gmake.linux_genie.make
deleted file mode 100644
index ec4d22271e6a..000000000000
--- a/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_genie_build_gmake.linux_genie.make
+++ /dev/null
@@ -1,20 +0,0 @@
---- mame2014-libretro/3rdparty/genie/build/gmake.linux/genie.make.orig 2015-11-04 17:31:20 UTC
-+++ mame2014-libretro/3rdparty/genie/build/gmake.linux/genie.make
-@@ -50,7 +50,7 @@ ifeq ($(config),release)
- ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
- ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic
- LDDEPS +=
-- LIBS += $(LDDEPS) -ldl -lm
-+ LIBS += $(LDDEPS) -lm
- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
- OBJECTS := \
- $(OBJDIR)/src/host/os_getcwd.o \
-@@ -126,7 +126,7 @@ ifeq ($(config),debug)
- ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
- ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic
- LDDEPS +=
-- LIBS += $(LDDEPS) -ldl -lm
-+ LIBS += $(LDDEPS) -lm
- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
- OBJECTS := \
- $(OBJDIR)/src/host/os_getcwd.o \
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_mongoose_test_Makefile b/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_mongoose_test_Makefile
deleted file mode 100644
index 56f54ed1a155..000000000000
--- a/games/libretro-cores/files/patch-mame2014-libretro_3rdparty_mongoose_test_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- mame2014-libretro/3rdparty/mongoose/test/Makefile.orig 2015-11-04 17:31:20 UTC
-+++ mame2014-libretro/3rdparty/mongoose/test/Makefile
-@@ -11,7 +11,7 @@ all: $(PROG)
- gcov -b $(PROG).c | egrep '^(File|Lines)'
-
- $(PROG): $(SOURCES) Makefile ../mongoose.c clean
-- $(CC) -o $(PROG) $(SOURCES) $(CFLAGS) -ldl -lssl
-+ $(CC) -o $(PROG) $(SOURCES) $(CFLAGS) -lssl
-
- win:
- wine cl $(SOURCES) /MD /nologo /DNDEBUG /O1 /Fe$(PROG).exe
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_Makefile b/games/libretro-cores/files/patch-mame2014-libretro_Makefile
index f271e0516234..efcfb30624ce 100644
--- a/games/libretro-cores/files/patch-mame2014-libretro_Makefile
+++ b/games/libretro-cores/files/patch-mame2014-libretro_Makefile
@@ -1,4 +1,4 @@
---- mame2014-libretro/Makefile.orig 2015-11-04 17:31:20 UTC
+--- mame2014-libretro/Makefile.orig 2016-09-09 05:23:19 UTC
+++ mame2014-libretro/Makefile
@@ -108,22 +108,21 @@ ifeq ($(platform), unix)
TARGETOS=linux
@@ -12,7 +12,6 @@
PLATCFLAGS += -DHAVE_GL
LIBS += -lGL
endif
-+ LD = $(CXX)
LDFLAGS += $(fpic) $(SHARED)
- REALCC = gcc
- NATIVECC = g++
@@ -23,38 +22,28 @@
- CC = g++
AR = @ar
- LD = g++
++ LD = $(CXX)
CCOMFLAGS += $(PLATCFLAGS)
- LIBS += -lstdc++ -lpthread -ldl
+ LIBS += -lstdc++ -lpthread
ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
PTR64 = 1
endif
-@@ -150,7 +149,7 @@ else ifeq ($(platform), android)
+@@ -148,7 +147,7 @@ else ifeq ($(platform), android)
AR = @arm-linux-androideabi-ar
LD = @arm-linux-androideabi-g++
FORCE_DRC_C_BACKEND = 1
- CCOMFLAGS += -fPIC -mstructure-size-boundary=32 -mthumb-interwork -falign-functions=16 -fsigned-char -finline -fno-common -fno-builtin -fweb -frename-registers -falign-functions=16
+ CCOMFLAGS += -fPIC -mstructure-size-boundary=32 -mthumb-interwork -falign-functions=16 -fsigned-char -finline -fno-common -fno-builtin -falign-functions=16
- PLATCFLAGS += -march=armv7-a -mfloat-abi=softfp -DANDROID -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST -fstrict-aliasing -fno-merge-constants -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK
+ PLATCFLAGS += -march=armv7-a -mfloat-abi=softfp -DANDROID -DALIGN_INTS -DALIGN_SHORTS -fstrict-aliasing -fno-merge-constants -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK
ifeq ($(VRENDER),opengl)
PLATCFLAGS += -DHAVE_GL
-@@ -313,8 +312,8 @@ else ifneq (,$(findstring armv,$(platfor
+@@ -308,7 +307,7 @@ else ifneq (,$(findstring armv,$(platfor
TARGETOS=linux
fpic := -fPIC
SHARED := -shared -Wl,--version-script=src/osd/retro/link.T -Wl,--no-undefined
- CCOMFLAGS += $(fpic) -mstructure-size-boundary=32 -falign-functions=16 -fsigned-char -finline -fno-common -fno-builtin -fweb -frename-registers -falign-functions=16
-- PLATCFLAGS += -march=armv7-a -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST -fstrict-aliasing -fno-merge-constants -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK
+ CCOMFLAGS += $(fpic) -mstructure-size-boundary=32 -falign-functions=16 -fsigned-char -finline -fno-common -fno-builtin -falign-functions=16
-+ PLATCFLAGS += -march=armv7-a -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST -fstrict-aliasing -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK
+ PLATCFLAGS += -march=armv7-a -DALIGN_INTS -DALIGN_SHORTS -fstrict-aliasing -fno-merge-constants -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK
LDFLAGS += -Wl,--fix-cortex-a8 -Wl,--no-as-needed $(fpic) $(SHARED)
REALCC = gcc
- NATIVECC = g++
-@@ -954,7 +953,7 @@ endif
- $(EMULATOR): $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBBUS) $(LIBOPTIONAL) $(LIBEMU) $(LIBDASM) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(JPEG_LIB) $(FLAC_LIB) $(7Z_LIB) $(FORMATS_LIB) $(LUA_LIB) $(SQLITE3_LIB) $(WEB_LIB) $(ZLIB) $(LIBOCORE) $(MIDI_LIB) $(RESFILE)
- $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
- @echo Linking $(TARGETLIB)
-- $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $(TARGETLIB)
-+ $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS:-ldl=) -o $(TARGETLIB)
-
-
- #-------------------------------------------------
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_src_lib_lib.mak b/games/libretro-cores/files/patch-mame2014-libretro_src_lib_lib.mak
new file mode 100644
index 000000000000..cba5c7bb4cc8
--- /dev/null
+++ b/games/libretro-cores/files/patch-mame2014-libretro_src_lib_lib.mak
@@ -0,0 +1,15 @@
+--- mame2014-libretro/src/lib/lib.mak.orig 2016-09-09 05:23:19 UTC
++++ mame2014-libretro/src/lib/lib.mak
+@@ -595,9 +595,9 @@ SQLITE3_FLAGS += -fPIC
+ endif
+ endif
+
+-ifeq ($(TARGETOS),linux)
+-LIBS += -ldl
+-endif
++#ifeq ($(TARGETOS),linux)
++#LIBS += -ldl
++#endif
+
+ $(LIBOBJ)/sqlite3/sqlite3.o: $(3RDPARTY)/sqlite3/sqlite3.c | $(OSPREBUILD)
+ @echo Compiling $<...
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_modules_sync_sync__retro.c b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_modules_sync_sync__retro.c
index d50cf75165b1..1ae986d38a22 100644
--- a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_modules_sync_sync__retro.c
+++ b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_modules_sync_sync__retro.c
@@ -1,4 +1,4 @@
---- mame2014-libretro/src/osd/modules/sync/sync_retro.c.orig 2015-11-04 17:31:20 UTC
+--- mame2014-libretro/src/osd/modules/sync/sync_retro.c.orig 2016-09-09 05:23:19 UTC
+++ mame2014-libretro/src/osd/modules/sync/sync_retro.c
@@ -42,6 +42,8 @@
#include <signal.h>
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..00eb8be60a99
--- /dev/null
+++ b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- mame2014-libretro/src/osd/retro/libretro-common/rthreads/rthreads.c.orig 2016-09-09 05:23:19 UTC
++++ mame2014-libretro/src/osd/retro/libretro-common/rthreads/rthreads.c
+@@ -44,6 +44,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrodir.c b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrodir.c
index fc9fed5c2f4d..4039d56fd018 100644
--- a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrodir.c
+++ b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrodir.c
@@ -1,4 +1,4 @@
---- mame2014-libretro/src/osd/retro/retrodir.c.orig 2015-11-04 17:31:20 UTC
+--- mame2014-libretro/src/osd/retro/retrodir.c.orig 2016-09-09 05:23:19 UTC
+++ mame2014-libretro/src/osd/retro/retrodir.c
@@ -37,10 +37,10 @@ typedef struct stat sdl_stat;
#define sdl_readdir readdir
diff --git a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrofile.c b/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrofile.c
deleted file mode 100644
index 77ae49d04d55..000000000000
--- a/games/libretro-cores/files/patch-mame2014-libretro_src_osd_retro_retrofile.c
+++ /dev/null
@@ -1,72 +0,0 @@
---- mame2014-libretro/src/osd/retro/retrofile.c.orig 2015-11-04 17:31:20 UTC
-+++ mame2014-libretro/src/osd/retro/retrofile.c
-@@ -135,7 +135,7 @@ file_error osd_open(const char *path, UI
- UINT32 access;
- const char *src;
- char *dst;
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- struct stat st;
- #else
- struct stat64 st;
-@@ -238,7 +238,7 @@ file_error osd_open(const char *path, UI
- #endif
-
- // attempt to open the file
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- (*file)->handle = open(tmpstr, access, 0666);
- #else
- (*file)->handle = open64(tmpstr, access, 0666);
-@@ -262,7 +262,7 @@ file_error osd_open(const char *path, UI
- // attempt to reopen the file
- if (error == NO_ERROR)
- {
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- (*file)->handle = open(tmpstr, access, 0666);
- #else
- (*file)->handle = open64(tmpstr, access, 0666);
-@@ -282,7 +282,7 @@ file_error osd_open(const char *path, UI
- }
-
- // get the file size
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- fstat((*file)->handle, &st);
- #else
- fstat64((*file)->handle, &st);
-@@ -315,7 +315,7 @@ file_error osd_read(osd_file *file, void
- switch (file->type)
- {
- case SDLFILE_FILE:
--#if defined(__MACH__) || defined(SDLMAME_BSD)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(SDLMAME_BSD)
- result = pread(file->handle, buffer, count, offset);
- if (result < 0)
- #elif defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_OS2)
-@@ -361,7 +361,7 @@ file_error osd_write(osd_file *file, con
- switch (file->type)
- {
- case SDLFILE_FILE:
--#if defined(__MACH__) || defined(SDLMAME_BSD)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(SDLMAME_BSD)
- result = pwrite(file->handle, buffer, count, offset);
- if (!result)
- #elif defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_OS2)
-@@ -532,13 +532,13 @@ osd_directory_entry *osd_stat(const char
- {
- int err;
- osd_directory_entry *result = NULL;
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- struct stat st;
- #else
- struct stat64 st;
- #endif
-
--#if defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
-+#if defined(__FreeBSD__) || defined(__MACH__) || defined(_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_ARM) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
- err = stat(path, &st);
- #else
- err = stat64(path, &st);
diff --git a/games/libretro-cores/files/patch-meteor-libretro_Makefile.freebsd b/games/libretro-cores/files/patch-meteor-libretro_Makefile.freebsd
index f18859bfa8d5..85cd0905ad21 100644
--- a/games/libretro-cores/files/patch-meteor-libretro_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-meteor-libretro_Makefile.freebsd
@@ -1,4 +1,4 @@
---- meteor-libretro/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- meteor-libretro/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ meteor-libretro/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-mgba_Makefile.freebsd b/games/libretro-cores/files/patch-mgba_Makefile.freebsd
index c515fe85931a..47e9112ae557 100644
--- a/games/libretro-cores/files/patch-mgba_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-mgba_Makefile.freebsd
@@ -1,4 +1,4 @@
---- mgba/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- mgba/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ mgba/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-nestopia_Makefile.freebsd b/games/libretro-cores/files/patch-nestopia_Makefile.freebsd
index b7bda5c0bbc1..ce366568265c 100644
--- a/games/libretro-cores/files/patch-nestopia_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-nestopia_Makefile.freebsd
@@ -1,4 +1,4 @@
---- nestopia/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- nestopia/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ nestopia/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-nxengine-libretro_Makefile b/games/libretro-cores/files/patch-nxengine-libretro_Makefile
deleted file mode 100644
index efd6096a7617..000000000000
--- a/games/libretro-cores/files/patch-nxengine-libretro_Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
---- nxengine-libretro/Makefile.orig 2015-11-01 17:26:48 UTC
-+++ nxengine-libretro/Makefile
-@@ -41,7 +41,6 @@ TARGET_NAME := nxengine
- CORE_DIR := nxengine
- EXTRACTDIR := $(CORE_DIR)/extract-auto
-
--CC = gcc
-
- ifeq ($(ARCHFLAGS),)
- ifeq ($(archs),ppc)
diff --git a/games/libretro-cores/files/patch-pcsx__rearmed_Makefile.libretro b/games/libretro-cores/files/patch-pcsx__rearmed_Makefile.libretro
index 585f9b37a905..12c11b725eb1 100644
--- a/games/libretro-cores/files/patch-pcsx__rearmed_Makefile.libretro
+++ b/games/libretro-cores/files/patch-pcsx__rearmed_Makefile.libretro
@@ -1,7 +1,7 @@
---- pcsx_rearmed/Makefile.libretro.orig 2015-11-01 09:25:51 UTC
+--- pcsx_rearmed/Makefile.libretro.orig 2016-10-18 03:38:59 UTC
+++ pcsx_rearmed/Makefile.libretro
-@@ -23,7 +23,6 @@ TARGET_NAME := pcsx_rearmed
- LIBM := -lm
+@@ -24,7 +24,6 @@ CFLAGS ?=
+ TARGET_NAME := pcsx_rearmed
LIBZ := -lz
LIBPTHREAD := -lpthread
-LIBDL := -ldl
diff --git a/games/libretro-cores/files/patch-reicast-emulator_Makefile b/games/libretro-cores/files/patch-reicast-emulator_Makefile
new file mode 100644
index 000000000000..aecb86e7143a
--- /dev/null
+++ b/games/libretro-cores/files/patch-reicast-emulator_Makefile
@@ -0,0 +1,35 @@
+--- reicast-emulator/Makefile.orig 2016-11-04 17:23:51 UTC
++++ reicast-emulator/Makefile
+@@ -15,11 +15,11 @@ TARGET_NAME := reicast
+
+ MFLAGS :=
+ ASFLAGS :=
+-LDFLAGS :=
++LDFLAGS := -L$(LOCALBASE)/lib
+ INCFLAGS :=
+ LIBS :=
+-CFLAGS :=
+-CXXFLAGS :=
++CFLAGS := -I$(LOCALBASE)/include
++CXXFLAGS := -I$(LOCALBASE)/include
+ CC_AS ?= $(AS)
+
+ UNAME=$(shell uname -a)
+@@ -120,7 +120,7 @@ HOST_CPU_ARM=0x20000002
+ HOST_CPU_MIPS=0x20000003
+ HOST_CPU_X64=0x20000004
+
+-ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
++ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64 amd64))
+ HOST_CPU_FLAGS = -DHOST_CPU=$(HOST_CPU_X64)
+ endif
+
+@@ -151,7 +151,7 @@ ifneq (,$(findstring unix,$(platform)))
+
+ fpic = -fPIC
+
+-ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
++ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64 amd64))
+ CFLAGS += -D TARGET_NO_AREC
+ endif
+ ifeq ($(WITH_DYNAREC), x86)
diff --git a/games/libretro-cores/files/patch-reicast-emulator_Makefile.common b/games/libretro-cores/files/patch-reicast-emulator_Makefile.common
new file mode 100644
index 000000000000..09aebea1c206
--- /dev/null
+++ b/games/libretro-cores/files/patch-reicast-emulator_Makefile.common
@@ -0,0 +1,11 @@
+--- reicast-emulator/Makefile.common.orig 2016-11-04 17:23:51 UTC
++++ reicast-emulator/Makefile.common
+@@ -117,7 +117,7 @@ endif
+
+ # Recompiler (x64)
+
+-ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
++ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64 amd64))
+ DYNAREC_USED = 1
+ SOURCES_CXX += $(CORE_DIR)/rec-x64/rec_x64.cpp
+ # Recompiler (x86 32bit)
diff --git a/games/libretro-cores/files/patch-reicast-emulator_core_hw_sh4_dyna_driver.cpp b/games/libretro-cores/files/patch-reicast-emulator_core_hw_sh4_dyna_driver.cpp
new file mode 100644
index 000000000000..38821661ad48
--- /dev/null
+++ b/games/libretro-cores/files/patch-reicast-emulator_core_hw_sh4_dyna_driver.cpp
@@ -0,0 +1,11 @@
+--- reicast-emulator/core/hw/sh4/dyna/driver.cpp.orig 2016-11-04 17:23:51 UTC
++++ reicast-emulator/core/hw/sh4/dyna/driver.cpp
+@@ -34,7 +34,7 @@
+ u8 SH4_TCB[CODE_SIZE+4096]
+ #if defined(_WIN32) || FEAT_SHREC != DYNAREC_JIT
+ ;
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ __attribute__((section(".text")));
+ #elif defined(__MACH__)
+ __attribute__((section("__TEXT,.text")));
diff --git a/games/libretro-cores/files/patch-reicast-emulator_core_libretro_common.cpp b/games/libretro-cores/files/patch-reicast-emulator_core_libretro_common.cpp
new file mode 100644
index 000000000000..10181142ae7c
--- /dev/null
+++ b/games/libretro-cores/files/patch-reicast-emulator_core_libretro_common.cpp
@@ -0,0 +1,68 @@
+--- reicast-emulator/core/libretro/common.cpp.orig 2016-11-04 17:23:51 UTC
++++ reicast-emulator/core/libretro/common.cpp
+@@ -215,7 +215,7 @@ static void context_segfault(rei_host_co
+ {
+ #if !defined(TARGET_NO_EXCEPTIONS)
+ #if HOST_CPU == CPU_ARM
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ bicopy(reictx->pc, MCTX(.arm_pc), to_segfault);
+ u32* r =(u32*) &MCTX(.arm_r0);
+
+@@ -229,11 +229,16 @@ static void context_segfault(rei_host_co
+ #endif
+
+ #elif HOST_CPU == CPU_X86
+-#ifdef __linux__
++#if defined(__linux__)
+ bicopy(reictx->pc, MCTX(.gregs[REG_EIP]), to_segfault);
+ bicopy(reictx->esp, MCTX(.gregs[REG_ESP]), to_segfault);
+ bicopy(reictx->eax, MCTX(.gregs[REG_EAX]), to_segfault);
+ bicopy(reictx->ecx, MCTX(.gregs[REG_ECX]), to_segfault);
++#elif defined(__FreeBSD__)
++ bicopy(reictx->pc, MCTX(.mc_eip), to_segfault);
++ bicopy(reictx->esp, MCTX(.mc_esp), to_segfault);
++ bicopy(reictx->eax, MCTX(.mc_eax), to_segfault);
++ bicopy(reictx->ecx, MCTX(.mc_ecx), to_segfault);
+ #elif defined(__MACH__)
+ bicopy(reictx->pc, MCTX(->__ss.__eip), to_segfault);
+ bicopy(reictx->esp, MCTX(->__ss.__esp), to_segfault);
+@@ -241,8 +246,10 @@ static void context_segfault(rei_host_co
+ bicopy(reictx->ecx, MCTX(->__ss.__ecx), to_segfault);
+ #endif
+ #elif HOST_CPU == CPU_X64
+-#ifdef __linux__
++#if defined(__linux__)
+ bicopy(reictx->pc, MCTX(.gregs[REG_RIP]), to_segfault);
++#elif defined(__FreeBSD__)
++ bicopy(reictx->pc, MCTX(.mc_rip), to_segfault);
+ #elif defined(__MACH__)
+ bicopy(reictx->pc, MCTX(->__ss.__rip), to_segfault);
+ #endif
+@@ -292,7 +299,7 @@ static void sigill_handler(int sn, sigin
+ }
+ #endif
+
+-#if defined(__MACH__) || defined(__linux__)
++#if defined(__MACH__) || defined(__linux__) || defined(__FreeBSD__)
+ //#define LOG_SIGHANDLER
+
+ static void fault_handler (int sn, siginfo_t * si, void *segfault_ctx)
+@@ -566,7 +573,7 @@ void common_libretro_setup(void)
+ ReserveBottomMemory();
+ #endif
+
+-#if defined(__MACH__) || defined(__linux__)
++#if defined(__MACH__) || defined(__linux__) || defined(__FreeBSD__)
+ enable_runfast();
+ #endif
+ #ifdef _WIN32
+@@ -582,7 +589,7 @@ void common_libretro_setup(void)
+
+ settings.profile.run_counts=0;
+
+-#if defined(__MACH__) || defined(__linux__)
++#if defined(__MACH__) || defined(__linux__) || defined(__FreeBSD__)
+ printf("Linux paging: %08X %08X %08X\n",sysconf(_SC_PAGESIZE),PAGE_SIZE,PAGE_MASK);
+ verify(PAGE_MASK==(sysconf(_SC_PAGESIZE)-1));
+ #endif
diff --git a/games/libretro-cores/files/patch-scummvm_Makefile.freebsd b/games/libretro-cores/files/patch-scummvm_Makefile.freebsd
index 91b387b2a715..98b082af3f52 100644
--- a/games/libretro-cores/files/patch-scummvm_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-scummvm_Makefile.freebsd
@@ -1,4 +1,4 @@
---- scummvm/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- scummvm/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ scummvm/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-snes9x2010_Makefile.libretro b/games/libretro-cores/files/patch-snes9x2010_Makefile.libretro
index 22c896ffa939..27346373bc68 100644
--- a/games/libretro-cores/files/patch-snes9x2010_Makefile.libretro
+++ b/games/libretro-cores/files/patch-snes9x2010_Makefile.libretro
@@ -1,6 +1,6 @@
---- snes9x2010/Makefile.libretro.orig 2015-11-08 19:01:41.000000000 -0800
-+++ snes9x2010/Makefile.libretro 2016-09-07 21:05:07.924657000 -0700
-@@ -69,7 +69,7 @@
+--- snes9x2010/Makefile.libretro.orig 2015-11-09 03:01:41 UTC
++++ snes9x2010/Makefile.libretro
+@@ -69,7 +69,7 @@ else ifneq ($(findstring MINGW,$(shell u
endif
#CC = gcc
diff --git a/games/libretro-cores/files/patch-snes9x_Makefile.freebsd b/games/libretro-cores/files/patch-snes9x_Makefile.freebsd
index f81279ce3f0d..9fd06821c2c2 100644
--- a/games/libretro-cores/files/patch-snes9x_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-snes9x_Makefile.freebsd
@@ -1,4 +1,4 @@
---- snes9x/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- snes9x/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ snes9x/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-vba-next_libretro-common_rthreads_rthreads.c b/games/libretro-cores/files/patch-vba-next_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..d876d985b618
--- /dev/null
+++ b/games/libretro-cores/files/patch-vba-next_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- vba-next/libretro-common/rthreads/rthreads.c.orig 2016-11-07 01:24:49 UTC
++++ vba-next/libretro-common/rthreads/rthreads.c
+@@ -60,6 +60,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-cores/files/patch-vbam-libretro_Makefile.freebsd b/games/libretro-cores/files/patch-vbam-libretro_Makefile.freebsd
index 0976d4172e99..478d2d9dd200 100644
--- a/games/libretro-cores/files/patch-vbam-libretro_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-vbam-libretro_Makefile.freebsd
@@ -1,4 +1,4 @@
---- vbam-libretro/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- vbam-libretro/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ vbam-libretro/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/files/patch-yabause_Makefile.freebsd b/games/libretro-cores/files/patch-yabause_Makefile.freebsd
index b91b5a483d09..7b18b6cb0bdb 100644
--- a/games/libretro-cores/files/patch-yabause_Makefile.freebsd
+++ b/games/libretro-cores/files/patch-yabause_Makefile.freebsd
@@ -1,4 +1,4 @@
---- yabause/Makefile.freebsd.orig 2015-11-10 19:32:17 UTC
+--- yabause/Makefile.freebsd.orig 2016-11-09 04:30:27 UTC
+++ yabause/Makefile.freebsd
@@ -0,0 +1,2 @@
+all:
diff --git a/games/libretro-cores/pkg-descr b/games/libretro-cores/pkg-descr
index ef4f6a16570b..16b80c0c16e5 100644
--- a/games/libretro-cores/pkg-descr
+++ b/games/libretro-cores/pkg-descr
@@ -3,4 +3,12 @@ intended for playing/interpreting the retrogames. They are for the
most part distributed by the Libretro organization, and are usually
licensed under GPL.
+In order to use core packs, you need to know which content can
+play on which core.
+
+For example:
+* picodrive core can play Sega Genesis console games
+* dinothawr core plays the game that can be downloaded from
+ https://github.com/Themaister/Dinothawr
+
WWW: http://www.libretro.com/