View | Details | Raw Unified | Return to bug 252192
Collapse All | Expand All

(-)b/emulators/libretro-reicast/Makefile (+46 lines)
Added Link Here
1
# Created by: Timothy Beyer <beyert@cs.ucr.edu>
2
3
PORTNAME=	libretro-reicast
4
PORTVERSION=	0.20201231
5
CATEGORIES=	emulators games
6
7
MAINTAINER=	beyert@cs.ucr.edu
8
COMMENT=	Standalone port of reicast to libretro
9
10
LICENSE=	BSD3CLAUSE LGPL21 GPLv2
11
LICENSE_COMB=	multi
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
LIB_DEPENDS=	libcurl.so:ftp/curl \
15
	libasound.so:audio/alsa-lib \
16
	libao.so:audio/libao \
17
	libevdev.so:devel/libevdev \
18
	libpulse.so:audio/pulseaudio \
19
	libudev.so:devel/libudev-devd
20
21
USES=		compiler cmake gl xorg
22
USE_GCC=	yes
23
24
USE_LDCONFIG=	yes
25
CMAKE_ARGS=	-DLIBRETRO_CORE=ON \
26
	-DOPENGL_EGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/EGL \
27
	-DOPENGL_GLX_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \
28
	-DOPENGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \
29
	-DOPENGL_opengl_LIBRARY:PATH=${LOCALBASE}/lib/libGL.so
30
31
CXXFLAGS+=	-Wno-c++11-extensions
32
USE_GITHUB=	yes
33
GH_ACCOUNT=	reicast
34
GH_PROJECT=	reicast-emulator
35
GH_TAGNAME=	0bd6ea3
36
37
USE_GL=	gl egl gbm
38
39
PLIST_FILES=	lib/libretro/reicast_libretro.so
40
41
do-install:
42
	${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
43
	${INSTALL_LIB} ${WRKDIR}/.build/libreicast.so \
44
		${STAGEDIR}/${PREFIX}/lib/libretro/reicast_libretro.so;
45
46
.include <bsd.port.mk>
(-)b/emulators/libretro-reicast/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1623465538
2
SHA256 (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = a30e67754c28029e16cf2eb3d3878906888178e308800139e64e8e29533bc679
3
SIZE (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = 6467649
(-)b/emulators/libretro-reicast/files/patch-CMakeLists.txt (+11 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2020-10-18 11:22:48 UTC
2
+++ CMakeLists.txt
3
@@ -431,6 +431,8 @@ if(${HOST_OS} EQUAL ${OS_DARWIN})
4
 
5
 endif()
6
 
7
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1")
8
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")
9
 
10
 if(DEBUG_CMAKE)
11
   message(" ------------------------------------------------")
(-)b/emulators/libretro-reicast/files/patch-libswirl_gui_gui__settings__about.cpp (+25 lines)
Added Link Here
1
--- libswirl/gui/gui_settings_about.cpp.orig	2020-10-18 11:22:48 UTC
2
+++ libswirl/gui/gui_settings_about.cpp
3
@@ -40,13 +40,13 @@ void gui_settings_about()
4
 	    {
5
 	    	ImGui::Text("CPU: %s",
6
 #if HOST_CPU == CPU_X86
7
-				"x86"
8
+				"i386"
9
 #elif HOST_CPU == CPU_ARM
10
 				"ARM"
11
 #elif HOST_CPU == CPU_MIPS
12
 				"MIPS"
13
 #elif HOST_CPU == CPU_X64
14
-				"x86/64"
15
+				"amd64"
16
 #elif HOST_CPU == CPU_GENERIC
17
 				"Generic"
18
 #elif HOST_CPU == CPU_ARM64
19
@@ -88,4 +88,4 @@ void gui_settings_about()
20
 		ImGui::PopStyleVar();
21
 		ImGui::EndTabItem();
22
 	}
23
-}
24
\ No newline at end of file
25
+}
(-)b/emulators/libretro-reicast/files/patch-libswirl_linux-dist_main.cpp (+10 lines)
Added Link Here
1
--- libswirl/linux-dist/main.cpp.orig	2020-10-18 11:22:48 UTC
2
+++ libswirl/linux-dist/main.cpp
3
@@ -22,7 +22,6 @@
4
 #include "hw/sh4/dyna/blockmanager.h"
5
 #include "hw/maple/maple_cfg.h"
6
 #include <unistd.h>
7
-#include <pty.h>
8
 
9
 #include "libswirl.h"
10
 #include "hw/pvr/Renderer_if.h"
(-)b/emulators/libretro-reicast/files/patch-libswirl_linux_common.cpp (+42 lines)
Added Link Here
1
--- libswirl/linux/common.cpp.orig	2020-10-18 11:22:48 UTC
2
+++ libswirl/linux/common.cpp
3
@@ -22,6 +22,12 @@
4
     #include <sys/stat.h>
5
     #if HOST_OS == OS_DARWIN
6
         #import <util.h>
7
+    #elif defined(__FreeBSD__)
8
+        #include <dlfcn.h>
9
+        #include <sys/types.h>
10
+        #include <sys/ioctl.h>
11
+        #include <termios.h>
12
+        #include <libutil.h>
13
     #else
14
         #include <pty.h>
15
     #endif
16
@@ -33,7 +39,7 @@
17
 #include <sys/param.h>
18
 #include <sys/mman.h>
19
 #include <sys/time.h>
20
-#if !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64)
21
+#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64)
22
   #include <sys/personality.h>
23
   #include <dlfcn.h>
24
 #endif
25
@@ -294,7 +300,7 @@ void enable_runfast()
26
 }
27
 
28
 void linux_fix_personality() {
29
-    #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN)
30
+    #if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN)
31
         printf("Personality: %08X\n", personality(0xFFFFFFFF));
32
         personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF));
33
         printf("Updated personality: %08X\n", personality(0xFFFFFFFF));
34
@@ -302,7 +308,7 @@ void linux_fix_personality() {
35
 }
36
 
37
 void linux_rpi2_init() {
38
-#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE)
39
+#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE)
40
 	void* handle;
41
 	void (*rpi_bcm_init)(void);
42
 
(-)b/emulators/libretro-reicast/files/patch-reicast_cmake_config.cmake (+16 lines)
Added Link Here
1
--- reicast/cmake/config.cmake.orig	2020-10-18 11:22:48 UTC
2
+++ reicast/cmake/config.cmake
3
@@ -106,11 +106,13 @@ endif()
4
 #		AMD64/x86_64:x64, i*86:x86, ppc/powerpc[64][b|l]e:ppc[64] etc 
5
 #
6
 if(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") OR
7
+   ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386") OR
8
    ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "X86"))   # todo: check MATCHES "i.86" ?
9
   set(host_arch "x86")
10
   set(HOST_CPU ${CPU_X86})
11
 #
12
 elseif(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") OR
13
+       ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") OR
14
        ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") OR
15
        ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x64"))
16
   set(host_arch "x64")
(-)b/emulators/libretro-reicast/pkg-descr (+3 lines)
Added Link Here
1
Standalone port of reicast to libretro.
2
3
WWW: https://github.com/reicast/reicast-emulator
(-)b/emulators/libretro-reicast/pkg-message (+37 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
5
6
On some hardware, The libretro core of reicast may not run if dynarec is
7
enabled.
8
9
It is recommended to set alpha sorting to per-triangle, as follows:
10
11
In ~/.config/retroarch/
12
reicast_alpha_sorting = "per-triangle (normal)"
13
14
It is recommended to enable DSP support:
15
16
reicast_enable_dsp = "enabled"
17
18
in ~/.config/reicast/emu.cfg:
19
20
Dynarec.DspEnabled = 1
21
Dynarec.Enabled = no
22
Dynarec.idleskip = yes
23
Dynarec.safe-mode = yes
24
Dynarec.unstable-opt = no
25
#aica.AutoLatency = no
26
#aica.DSPEnabled = no
27
28
Please set all lines in ~/.config/retroarch/retroarch.cfg that correspond to
29
the setting "run_ahead_enabled" to "false", as shown in the example below:
30
31
run_ahead_enabled = "false"
32
33
To troubleshoot issues, running retroarch with the -v argument may help to
34
acquire more diagnostic information.
35
EOM
36
}
37
]

Return to bug 252192