diff --git a/emulators/Makefile b/emulators/Makefile index 2f85a9ca18de..7f52809d2c5b 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -1,188 +1,189 @@ COMMENT = Emulators for other operating systems SUBDIR += adamem SUBDIR += almostti SUBDIR += anese SUBDIR += aqemu SUBDIR += aranym SUBDIR += atari800 SUBDIR += bfe SUBDIR += bochs SUBDIR += bsvc SUBDIR += cannonball SUBDIR += catapult SUBDIR += cemu SUBDIR += cingb SUBDIR += citra SUBDIR += citra-qt5 SUBDIR += cpmemu SUBDIR += cpmtools SUBDIR += cpmtools2 SUBDIR += darcnes SUBDIR += dgen-sdl SUBDIR += dolphin-emu SUBDIR += dosbox SUBDIR += dosbox-staging SUBDIR += dosbox-x SUBDIR += dps8m SUBDIR += dynamips-community SUBDIR += edumips64 SUBDIR += elliott-803 SUBDIR += emu64 SUBDIR += emulationstation SUBDIR += fceux SUBDIR += fmsx SUBDIR += frodo SUBDIR += fs-uae SUBDIR += fs-uae-launcher SUBDIR += fuse SUBDIR += fuse-roms SUBDIR += fuse-utils SUBDIR += gbe SUBDIR += gens SUBDIR += gngb SUBDIR += gngeo SUBDIR += gxemul SUBDIR += hatari SUBDIR += hercules SUBDIR += higan SUBDIR += hugo SUBDIR += hv_kvp_cmd SUBDIR += ines SUBDIR += javatari SUBDIR += joytran SUBDIR += jzintv SUBDIR += kcemu SUBDIR += klh10 SUBDIR += lib765 SUBDIR += libc6-shim SUBDIR += libdsk SUBDIR += libretro-ppsspp + SUBDIR += libretro-reicast SUBDIR += libretro-vice SUBDIR += libspectrum SUBDIR += linux-c7 SUBDIR += linux-power10-functional-sim SUBDIR += linux-power9-functional-sim SUBDIR += linux_base-c7 SUBDIR += lisaem SUBDIR += magia SUBDIR += mame SUBDIR += mastergear SUBDIR += mednafen SUBDIR += mesen SUBDIR += mess SUBDIR += mgba SUBDIR += mtools SUBDIR += mupen64plus SUBDIR += mupen64plus-audio-sdl SUBDIR += mupen64plus-core SUBDIR += mupen64plus-input-sdl SUBDIR += mupen64plus-plugins SUBDIR += mupen64plus-qt SUBDIR += mupen64plus-rsp-cxd4 SUBDIR += mupen64plus-rsp-hle SUBDIR += mupen64plus-rsp-z64 SUBDIR += mupen64plus-ui-console SUBDIR += mupen64plus-video-arachnoid SUBDIR += mupen64plus-video-glide64 SUBDIR += mupen64plus-video-glide64mk2 SUBDIR += mupen64plus-video-rice SUBDIR += mupen64plus-video-z64 SUBDIR += nemu SUBDIR += nestopia SUBDIR += o2em SUBDIR += ods2reader SUBDIR += open-vm-tools SUBDIR += openmsx SUBDIR += p5-Acme-6502 SUBDIR += parallels-tools SUBDIR += pcem SUBDIR += pcemu SUBDIR += pcsxr SUBDIR += ppsspp SUBDIR += ppsspp-qt5 SUBDIR += py-gns3-converter SUBDIR += py-unicorn SUBDIR += qemu SUBDIR += qemu-cheri SUBDIR += qemu-devel SUBDIR += qemu-guest-agent SUBDIR += qemu-powernv SUBDIR += qemu-user-static SUBDIR += qemu-user-static-devel SUBDIR += qemu5 SUBDIR += qemu6 SUBDIR += qmc2 SUBDIR += quasi88 SUBDIR += reicast SUBDIR += ripes SUBDIR += riscv-isa-sim SUBDIR += rpcs3 SUBDIR += rtc SUBDIR += rubygem-fission SUBDIR += sameboy SUBDIR += simh SUBDIR += simh-hp2100 SUBDIR += simh-hp3000 SUBDIR += simh-hpdoc SUBDIR += skyeye SUBDIR += snes9x-gtk SUBDIR += spim SUBDIR += stella SUBDIR += stonx SUBDIR += teo SUBDIR += tiemu3 SUBDIR += tilem SUBDIR += tme SUBDIR += tnylpo SUBDIR += tpm-emulator SUBDIR += tuxnes SUBDIR += uae SUBDIR += ucon64 SUBDIR += ukncbtl SUBDIR += unicorn SUBDIR += vba SUBDIR += vboxtool SUBDIR += vgb-bin SUBDIR += vgba-bin SUBDIR += vice SUBDIR += virtualbox-ose SUBDIR += virtualbox-ose-additions SUBDIR += virtualbox-ose-additions-legacy SUBDIR += virtualbox-ose-additions-nox11 SUBDIR += virtualbox-ose-additions-nox11-legacy SUBDIR += virtualbox-ose-kmod SUBDIR += virtualbox-ose-kmod-legacy SUBDIR += virtualbox-ose-legacy SUBDIR += virtualbox-ose-nox11 SUBDIR += virtualbox-ose-nox11-legacy SUBDIR += visualboyadvance-m SUBDIR += vmips SUBDIR += vmsbackup SUBDIR += vmw SUBDIR += vt100 SUBDIR += vxtools SUBDIR += wine SUBDIR += wine-devel SUBDIR += wine-gecko SUBDIR += wine-gecko-devel SUBDIR += wine-mono SUBDIR += wine-mono-devel SUBDIR += wine-proton SUBDIR += winetricks SUBDIR += x16-emulator SUBDIR += x16-rom SUBDIR += x48 SUBDIR += x49gp SUBDIR += xbraitenberg SUBDIR += xcpc SUBDIR += xen-kernel SUBDIR += xhomer SUBDIR += xsystem35 SUBDIR += xzx SUBDIR += yaze-ag SUBDIR += yuzu SUBDIR += z80pack SUBDIR += zsnes .include diff --git a/emulators/libretro-reicast/Makefile b/emulators/libretro-reicast/Makefile new file mode 100644 index 000000000000..a5e090211451 --- /dev/null +++ b/emulators/libretro-reicast/Makefile @@ -0,0 +1,46 @@ +# Created by: Timothy Beyer + +PORTNAME= libretro-reicast +PORTVERSION= 0.20201231 +CATEGORIES= emulators games + +MAINTAINER= beyert@cs.ucr.edu +COMMENT= Standalone port of reicast to libretro + +LICENSE= BSD3CLAUSE GPLv2 LGPL21 +LICENSE_COMB= multi +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libao.so:audio/libao \ + libasound.so:audio/alsa-lib \ + libcurl.so:ftp/curl \ + libevdev.so:devel/libevdev \ + libpulse.so:audio/pulseaudio \ + libudev.so:devel/libudev-devd + +USES= cmake compiler gl xorg +USE_GCC= yes + +USE_LDCONFIG= yes +CMAKE_ARGS= -DLIBRETRO_CORE=ON \ + -DOPENGL_EGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/EGL \ + -DOPENGL_GLX_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \ + -DOPENGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \ + -DOPENGL_opengl_LIBRARY:PATH=${LOCALBASE}/lib/libGL.so + +CXXFLAGS+= -Wno-c++11-extensions +USE_GITHUB= yes +GH_ACCOUNT= reicast +GH_PROJECT= reicast-emulator +GH_TAGNAME= 0bd6ea3 + +USE_GL= egl gbm gl + +PLIST_FILES= lib/libretro/reicast_libretro.so + +do-install: + ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; + ${INSTALL_LIB} ${WRKDIR}/.build/libreicast.so \ + ${STAGEDIR}/${PREFIX}/lib/libretro/reicast_libretro.so; + +.include diff --git a/emulators/libretro-reicast/distinfo b/emulators/libretro-reicast/distinfo new file mode 100644 index 000000000000..9ade18ae5b8a --- /dev/null +++ b/emulators/libretro-reicast/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1623465538 +SHA256 (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = a30e67754c28029e16cf2eb3d3878906888178e308800139e64e8e29533bc679 +SIZE (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = 6467649 diff --git a/emulators/libretro-reicast/files/patch-CMakeLists.txt b/emulators/libretro-reicast/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..f44da85be85c --- /dev/null +++ b/emulators/libretro-reicast/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2020-10-18 11:22:48 UTC ++++ CMakeLists.txt +@@ -431,6 +431,8 @@ if(${HOST_OS} EQUAL ${OS_DARWIN}) + + endif() + ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") + + if(DEBUG_CMAKE) + message(" ------------------------------------------------") diff --git a/emulators/libretro-reicast/files/patch-libswirl_gui_gui__settings__about.cpp b/emulators/libretro-reicast/files/patch-libswirl_gui_gui__settings__about.cpp new file mode 100644 index 000000000000..52f170390260 --- /dev/null +++ b/emulators/libretro-reicast/files/patch-libswirl_gui_gui__settings__about.cpp @@ -0,0 +1,25 @@ +--- libswirl/gui/gui_settings_about.cpp.orig 2020-10-18 11:22:48 UTC ++++ libswirl/gui/gui_settings_about.cpp +@@ -40,13 +40,13 @@ void gui_settings_about() + { + ImGui::Text("CPU: %s", + #if HOST_CPU == CPU_X86 +- "x86" ++ "i386" + #elif HOST_CPU == CPU_ARM + "ARM" + #elif HOST_CPU == CPU_MIPS + "MIPS" + #elif HOST_CPU == CPU_X64 +- "x86/64" ++ "amd64" + #elif HOST_CPU == CPU_GENERIC + "Generic" + #elif HOST_CPU == CPU_ARM64 +@@ -88,4 +88,4 @@ void gui_settings_about() + ImGui::PopStyleVar(); + ImGui::EndTabItem(); + } +-} +\ No newline at end of file ++} diff --git a/emulators/libretro-reicast/files/patch-libswirl_linux-dist_main.cpp b/emulators/libretro-reicast/files/patch-libswirl_linux-dist_main.cpp new file mode 100644 index 000000000000..95db907d3c74 --- /dev/null +++ b/emulators/libretro-reicast/files/patch-libswirl_linux-dist_main.cpp @@ -0,0 +1,10 @@ +--- libswirl/linux-dist/main.cpp.orig 2020-10-18 11:22:48 UTC ++++ libswirl/linux-dist/main.cpp +@@ -22,7 +22,6 @@ + #include "hw/sh4/dyna/blockmanager.h" + #include "hw/maple/maple_cfg.h" + #include +-#include + + #include "libswirl.h" + #include "hw/pvr/Renderer_if.h" diff --git a/emulators/libretro-reicast/files/patch-libswirl_linux_common.cpp b/emulators/libretro-reicast/files/patch-libswirl_linux_common.cpp new file mode 100644 index 000000000000..72732d269159 --- /dev/null +++ b/emulators/libretro-reicast/files/patch-libswirl_linux_common.cpp @@ -0,0 +1,42 @@ +--- libswirl/linux/common.cpp.orig 2020-10-18 11:22:48 UTC ++++ libswirl/linux/common.cpp +@@ -22,6 +22,12 @@ + #include + #if HOST_OS == OS_DARWIN + #import ++ #elif defined(__FreeBSD__) ++ #include ++ #include ++ #include ++ #include ++ #include + #else + #include + #endif +@@ -33,7 +39,7 @@ + #include + #include + #include +-#if !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) ++#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) + #include + #include + #endif +@@ -294,7 +300,7 @@ void enable_runfast() + } + + void linux_fix_personality() { +- #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) ++ #if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) + printf("Personality: %08X\n", personality(0xFFFFFFFF)); + personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF)); + printf("Updated personality: %08X\n", personality(0xFFFFFFFF)); +@@ -302,7 +308,7 @@ void linux_fix_personality() { + } + + void linux_rpi2_init() { +-#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) ++#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) + void* handle; + void (*rpi_bcm_init)(void); + diff --git a/emulators/libretro-reicast/files/patch-reicast_cmake_config.cmake b/emulators/libretro-reicast/files/patch-reicast_cmake_config.cmake new file mode 100644 index 000000000000..adb9b8f2c21f --- /dev/null +++ b/emulators/libretro-reicast/files/patch-reicast_cmake_config.cmake @@ -0,0 +1,16 @@ +--- reicast/cmake/config.cmake.orig 2020-10-18 11:22:48 UTC ++++ reicast/cmake/config.cmake +@@ -106,11 +106,13 @@ endif() + # AMD64/x86_64:x64, i*86:x86, ppc/powerpc[64][b|l]e:ppc[64] etc + # + if(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") OR ++ ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "X86")) # todo: check MATCHES "i.86" ? + set(host_arch "x86") + set(HOST_CPU ${CPU_X86}) + # + elseif(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") OR ++ ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x64")) + set(host_arch "x64") diff --git a/emulators/libretro-reicast/pkg-descr b/emulators/libretro-reicast/pkg-descr new file mode 100644 index 000000000000..dda6a565c542 --- /dev/null +++ b/emulators/libretro-reicast/pkg-descr @@ -0,0 +1,3 @@ +Standalone port of reicast to libretro. + +WWW: https://github.com/reicast/reicast-emulator diff --git a/emulators/libretro-reicast/pkg-message b/emulators/libretro-reicast/pkg-message new file mode 100644 index 000000000000..95c40118d334 --- /dev/null +++ b/emulators/libretro-reicast/pkg-message @@ -0,0 +1,37 @@ +[ +{ type: install + message: <