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

(-)b/emulators/libretro-flycast/Makefile (+62 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	libretro-flycast
4
PORTVERSION=	0.20210608
5
CATEGORIES=	emulators games
6
7
MAINTAINER=	beyert@cs.ucr.edu
8
COMMENT=	Standalone port of flycast to libretro
9
10
LICENSE=	GPLv2
11
#LICENSE_COMB=	multi
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
ONLY_FOR_ARCHS=	amd64 i386
15
16
LIB_DEPENDS+=	libcurl.so:ftp/curl \
17
	libasound.so:audio/alsa-lib \
18
	libao.so:audio/libao \
19
	libevdev.so:devel/libevdev \
20
	libpulse.so:audio/pulseaudio \
21
	libudev.so:devel/libudev-devd \
22
	libvulkan.so:graphics/vulkan-loader
23
24
USES=		compiler:c++11-lib gmake gl xorg dos2unix
25
USE_LDCONFIG=	yes
26
27
USE_GITHUB=	yes
28
GH_ACCOUNT=	libretro
29
GH_PROJECT=	flycast
30
GH_TAGNAME=	8e4fa54e
31
32
USE_GL+=	gl glew glu
33
34
CFLAGS+=	-I${LOCALBASE}/include
35
CXXFLAGS+=	-I${LOCALBASE}/include
36
37
.include <bsd.port.pre.mk>
38
39
DOS2UNIX_FILES=	core/hw/bba/rtl8139c.h
40
41
.if ${ARCH} == amd64
42
CFLAGS+=	-DLOW_END
43
CXXFLAGS+=	-DLOW_END
44
.endif
45
46
LDFLAGS+=	-L${LOCALBASE}/lib
47
MAKE_ARGS=	HAVE_VULKAN=0 HAVE_GENERIC_JIT=0
48
49
.if ${ARCH} == amd64
50
MAKE_ARGS+=	WITH_DYNAREC=x86_64
51
.elif ${ARCH} == i386
52
MAKE_ARGS+=	WITH_DYNAREC=x86
53
.endif
54
55
PLIST_FILES=	lib/libretro/flycast_libretro.so
56
57
do-install:
58
	${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
59
	${INSTALL_LIB} ${WRKSRC}/flycast_libretro.so \
60
		${STAGEDIR}/${PREFIX}/lib/libretro/flycast_libretro.so;
61
62
.include <bsd.port.post.mk>
(-)b/emulators/libretro-flycast/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1623193824
2
SHA256 (libretro-flycast-0.20210608-8e4fa54e_GH0.tar.gz) = c11f19e25cf605ca3a2df74d1595c1b21ef8fff52b7fa42fc9bfc7fde611059e
3
SIZE (libretro-flycast-0.20210608-8e4fa54e_GH0.tar.gz) = 6576666
(-)b/emulators/libretro-flycast/files/patch-Makefile (+33 lines)
Added Link Here
1
--- Makefile.orig	2021-05-17 21:23:19 UTC
2
+++ Makefile
3
@@ -45,12 +45,8 @@ CC_AS    ?= ${CC_PREFIX}as
4
 
5
 MFLAGS   := 
6
 ASFLAGS  := 
7
-LDFLAGS  :=
8
 LDFLAGS_END :=
9
 INCFLAGS :=
10
-LIBS     :=
11
-CFLAGS   := 
12
-CXXFLAGS :=
13
 
14
 GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
15
 ifneq ($(GIT_VERSION)," unknown")
16
@@ -70,7 +66,7 @@ endif
17
 # Target Dynarec
18
 WITH_DYNAREC = $(ARCH)
19
 
20
-ifeq ($(ARCH), $(filter $(ARCH), i386 i686))
21
+ifeq ($(ARCH), $(filter $(ARCH), i386 i486 i686))
22
 	WITH_DYNAREC = x86
23
 endif
24
 
25
@@ -145,7 +141,7 @@ ifneq (,$(findstring unix,$(platform)))
26
 	HAVE_CDROM = 1
27
 	fpic = -fPIC
28
 
29
-	ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
30
+	ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64 amd64))
31
 		CFLAGS += -DTARGET_LINUX_x64
32
 		SINGLE_PREC_FLAGS=1
33
 		HAVE_GENERIC_JIT = 0
(-)b/emulators/libretro-flycast/files/patch-core_hw_aica_dsp__x64.cpp (+11 lines)
Added Link Here
1
--- core/hw/aica/dsp_x64.cpp.orig	2021-05-17 21:23:19 UTC
2
+++ core/hw/aica/dsp_x64.cpp
3
@@ -37,6 +37,8 @@ DECL_ALIGN(4096) static u8 CodeBuffer[32 * 1024]
4
 	__attribute__((section(".text")));
5
 #elif defined(__MACH__)
6
 	__attribute__((section("__TEXT,.text")));
7
+#elif defined(__FreeBSD__)
8
+	__attribute__((section(".text")));
9
 #else
10
 	#error CodeBuffer code section unknown
11
 #endif
(-)b/emulators/libretro-flycast/files/patch-core_hw_bba_rtl8139c.h (+18 lines)
Added Link Here
1
--- core/hw/bba/rtl8139c.h.orig	2021-06-18 06:17:55 UTC
2
+++ core/hw/bba/rtl8139c.h
3
@@ -58,6 +58,7 @@ struct MemoryRegion {
4
 /*
5
  * Byte swapping utilities
6
  */
7
+/*
8
 static inline uint16_t bswap16(uint16_t x)
9
 {
10
     return (((x & 0x00ff) << 8) |
11
@@ -71,6 +72,7 @@ static inline uint32_t bswap32(uint32_t x)
12
             ((x & 0x00ff0000U) >>  8) |
13
             ((x & 0xff000000U) >> 24));
14
 }
15
+*/
16
 #define glue(a, b) _glue(a, b)
17
 #define _glue(a, b) a ## b
18
 
(-)b/emulators/libretro-flycast/files/patch-core_libretro-common_rthreads_rthreads.c (+14 lines)
Added Link Here
1
--- core/libretro-common/rthreads/rthreads.c.orig	2021-05-17 21:23:19 UTC
2
+++ core/libretro-common/rthreads/rthreads.c
3
@@ -55,10 +55,9 @@
4
 #include <sys/sys_time.h>
5
 #else
6
 #include <pthread.h>
7
-#include <time.h>
8
 #endif
9
 
10
-#if defined(VITA) || defined(BSD) || defined(ORBIS)
11
+#if defined(VITA) || defined(__FreeBSD__) || defined(ORBIS)
12
 #include <sys/time.h>
13
 #endif
14
 
(-)b/emulators/libretro-flycast/pkg-descr (+6 lines)
Added Link Here
1
Standalone port of Flycast to libretro.
2
3
Flycast is a multi-platform Sega Dreamcast, Naomi and Atomiswave emulator
4
derived from Reicast.
5
6
WWW: https://git.libretro.com/libretro/flycast
(-)b/emulators/libretro-flycast/pkg-message (+14 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
The libretro core of flycast will not run if run ahead support is enabled.
5
Please set all lines in ~/.config/retroarch/retroarch.cfg that correspond to
6
the setting "run_ahead_enabled" to "false", as shown in the example below:
7
8
run_ahead_enabled = "false"
9
10
To troubleshoot issues, running retroarch with the -v argument may help to
11
acquire more diagnostic information.
12
EOM
13
}
14
]

Return to bug 257170