git: af3936b2832d - main - emulators/libretro-flycast: update to 0.20231025

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Tue, 07 Nov 2023 00:22:02 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af3936b2832de206d396ac31984bc99d9411e988

commit af3936b2832de206d396ac31984bc99d9411e988
Author:     Stephane D'Alu <sdalu@sdalu.com>
AuthorDate: 2023-10-30 13:41:00 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-11-07 00:17:27 +0000

    emulators/libretro-flycast: update to 0.20231025
    
    PR:             274647
---
 emulators/libretro-flycast/Makefile                | 64 +++++++---------------
 emulators/libretro-flycast/distinfo                | 26 ++++++++-
 emulators/libretro-flycast/files/patch-Makefile    | 33 -----------
 .../files/patch-core_hw_aica_dsp__x64.cpp          | 11 ----
 .../files/patch-core_hw_bba_rtl8139c.h             | 18 ------
 .../patch-core_libretro-common_rthreads_rthreads.c | 14 -----
 .../files/patch-core_rec-x86_rec__x86__driver.cpp  | 11 ----
 7 files changed, 44 insertions(+), 133 deletions(-)

diff --git a/emulators/libretro-flycast/Makefile b/emulators/libretro-flycast/Makefile
index 78c5de024211..5444736e1d4a 100644
--- a/emulators/libretro-flycast/Makefile
+++ b/emulators/libretro-flycast/Makefile
@@ -1,68 +1,46 @@
 PORTNAME=	libretro-flycast
-PORTVERSION=	0.20210608
-PORTREVISION=	3
+DISTVERSION=	0.20231025
 CATEGORIES=	emulators games
 
 MAINTAINER=	beyert@cs.ucr.edu
 COMMENT=	Standalone port of flycast to libretro
-WWW=		https://git.libretro.com/libretro/flycast
+WWW=		https://github.com/flyinghead/flycast
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-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 \
-		libvulkan.so:graphics/vulkan-loader
-
-USES=	compiler:c++11-lib dos2unix gl gmake pkgconfig xorg
+USES=		gl cmake:noninja
 USE_LDCONFIG=	yes
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	libretro
+GH_ACCOUNT=	flyinghead
 GH_PROJECT=	flycast
-GH_TAGNAME=	8e4fa54e
-
-USE_GL+=	egl gl glew glu
-
-CFLAGS+=	-I${LOCALBASE}/include
-CXXFLAGS+=	-I${LOCALBASE}/include
+GH_TAGNAME=	8fb3def2d5cdd6adea00171ed720afb390cafd78
+GH_TUPLE=	libsdl-org:SDL:cc016b0046d563287f0aa9f09b958b5e70d43696:SDL/core/deps/SDL \
+		flyinghead:libchdr:925400c4c4b67bafdff8dfad9a1474b22d980777:libchdr/core/deps/libchdr \
+		vinniefalco:LuaBridge:fab7b33b896a42dcc865ba5ecdbacd9f409137f8:LuaBridge/core/deps/luabridge \
+		flyinghead:mingw-breakpad:1ab24bcc817ebe629bf77daa53529d02361cb1e9:mingw_breakpad/core/deps/breakpad \
+		KhronosGroup:Vulkan-Headers:85c2334e92e215cce34e8e0ed8b2dce4700f4a50:Vulkan_Headers/core/deps/Vulkan-Headers \
+		GPUOpen-LibrariesAndSDKs:VulkanMemoryAllocator:6eb62e1515072827db992c2befd80b71b2d04329:VulkanMemoryAllocator/core/deps/VulkanMemoryAllocator \
+		KhronosGroup:glslang:76b52ebf77833908dc4c0dd6c70a9c357ac720bd:glslang/core/deps/glslang \
+		google:oboe:8740d0fc321a55489dbbf6067298201b7d2e106d:oboe/core/deps/oboe \
+		vkedwardli:Syphon-Framework:486dd8e4ef3bead482ea26de99770f4389e24e37:Syphon_Framework/core/deps/Syphon \
+		vkedwardli:Spout2:ce94918ea3561b936405e7f68b6754d975ed2e8f:Spout2/core/deps/Spout
+
+USE_GL+=	gl
+CMAKE_ARGS=     -DLIBRETRO=ON \
+		-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
+		-DCMAKE_BUILD_TYPE=Release
 
 .include <bsd.port.pre.mk>
 
-DOS2UNIX_FILES=	core/hw/bba/rtl8139c.h
-
-.if ${ARCH} == amd64
-CFLAGS+=	-DLOW_END
-CXXFLAGS+=	-DLOW_END
-.endif
-
-LDFLAGS+=	-L${LOCALBASE}/lib
-MAKE_ARGS=	HAVE_GENERIC_JIT=0 \
-		HAVE_VULKAN=0
-
-.if ${ARCH} == amd64
-MAKE_ARGS+=	WITH_DYNAREC=x86_64
-.elif ${ARCH} == i386
-MAKE_ARGS+=	WITH_DYNAREC=x86
-USE_BINUTILS=	yes
-LDFLAGS+=	-Wl,-z,notext
-.endif
-
 PLIST_FILES=	lib/libretro/flycast_libretro.so
 
-post-patch:
-	@${REINPLACE_CMD} 's|/usr/local|${PREFIX}|' \
-		${WRKSRC}/Makefile
-
 do-install:
 	@${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
-	${INSTALL_LIB} ${WRKSRC}/flycast_libretro.so \
+	${INSTALL_LIB} ${BUILD_WRKSRC}/flycast_libretro.so \
 		${STAGEDIR}/${PREFIX}/lib/libretro/flycast_libretro.so;
 
 .include <bsd.port.post.mk>
diff --git a/emulators/libretro-flycast/distinfo b/emulators/libretro-flycast/distinfo
index eab0e7f1dc9c..5c5ebbc8d1bf 100644
--- a/emulators/libretro-flycast/distinfo
+++ b/emulators/libretro-flycast/distinfo
@@ -1,3 +1,23 @@
-TIMESTAMP = 1623193824
-SHA256 (libretro-flycast-0.20210608-8e4fa54e_GH0.tar.gz) = c11f19e25cf605ca3a2df74d1595c1b21ef8fff52b7fa42fc9bfc7fde611059e
-SIZE (libretro-flycast-0.20210608-8e4fa54e_GH0.tar.gz) = 6576666
+TIMESTAMP = 1698666315
+SHA256 (flyinghead-flycast-0.20231025-8fb3def2d5cdd6adea00171ed720afb390cafd78_GH0.tar.gz) = 9af6c6d677f88683423c9d047b578f4d03a3db718ef45d4a9671bcfb957cd29d
+SIZE (flyinghead-flycast-0.20231025-8fb3def2d5cdd6adea00171ed720afb390cafd78_GH0.tar.gz) = 14515634
+SHA256 (libsdl-org-SDL-cc016b0046d563287f0aa9f09b958b5e70d43696_GH0.tar.gz) = 2f7e3901167aceb34741b3b62e3200b422ed7418f7ee97a416c097ac31a56b5f
+SIZE (libsdl-org-SDL-cc016b0046d563287f0aa9f09b958b5e70d43696_GH0.tar.gz) = 7716438
+SHA256 (flyinghead-libchdr-925400c4c4b67bafdff8dfad9a1474b22d980777_GH0.tar.gz) = 64cef8c353e03b160fd9165e948cf59e5bd2674b6be12040637d98089125ae52
+SIZE (flyinghead-libchdr-925400c4c4b67bafdff8dfad9a1474b22d980777_GH0.tar.gz) = 1748616
+SHA256 (vinniefalco-LuaBridge-fab7b33b896a42dcc865ba5ecdbacd9f409137f8_GH0.tar.gz) = d393adc6bf1659faf2683f6ef2766ee7223650c8087ce53f8ab529e44c1c1575
+SIZE (vinniefalco-LuaBridge-fab7b33b896a42dcc865ba5ecdbacd9f409137f8_GH0.tar.gz) = 543800
+SHA256 (flyinghead-mingw-breakpad-1ab24bcc817ebe629bf77daa53529d02361cb1e9_GH0.tar.gz) = 3fbde8f8cc156cd257504a9f0e7d08b2ecb948d4e6473aea081eea70a9d9a6f0
+SIZE (flyinghead-mingw-breakpad-1ab24bcc817ebe629bf77daa53529d02361cb1e9_GH0.tar.gz) = 5383206
+SHA256 (KhronosGroup-Vulkan-Headers-85c2334e92e215cce34e8e0ed8b2dce4700f4a50_GH0.tar.gz) = 9b85bd804cfc0012bae60f5b540947fc2071603b547ce64674fb8c24a9f6aa25
+SIZE (KhronosGroup-Vulkan-Headers-85c2334e92e215cce34e8e0ed8b2dce4700f4a50_GH0.tar.gz) = 2046570
+SHA256 (GPUOpen-LibrariesAndSDKs-VulkanMemoryAllocator-6eb62e1515072827db992c2befd80b71b2d04329_GH0.tar.gz) = 9afe46ce02681799ca907fb79990ff276877dfb6324d48da21b215b92649368d
+SIZE (GPUOpen-LibrariesAndSDKs-VulkanMemoryAllocator-6eb62e1515072827db992c2befd80b71b2d04329_GH0.tar.gz) = 877925
+SHA256 (KhronosGroup-glslang-76b52ebf77833908dc4c0dd6c70a9c357ac720bd_GH0.tar.gz) = 4b5d9100d8113666fe8d271b30b7ea36a42f470acfeb16ccf39f13649f66980d
+SIZE (KhronosGroup-glslang-76b52ebf77833908dc4c0dd6c70a9c357ac720bd_GH0.tar.gz) = 3710996
+SHA256 (google-oboe-8740d0fc321a55489dbbf6067298201b7d2e106d_GH0.tar.gz) = 4095d9bae448a836c76f890ea193c5ad61d3fae40961bd40df3f70b00f89021d
+SIZE (google-oboe-8740d0fc321a55489dbbf6067298201b7d2e106d_GH0.tar.gz) = 6061640
+SHA256 (vkedwardli-Syphon-Framework-486dd8e4ef3bead482ea26de99770f4389e24e37_GH0.tar.gz) = b5222d44986ad663bf53e7438f59ed758b20f61e2fe28fbe6401091a8ed9faee
+SIZE (vkedwardli-Syphon-Framework-486dd8e4ef3bead482ea26de99770f4389e24e37_GH0.tar.gz) = 326352
+SHA256 (vkedwardli-Spout2-ce94918ea3561b936405e7f68b6754d975ed2e8f_GH0.tar.gz) = 8792f2bebf7617c45a40f834d88a0ede20471a390fa28002660bf0134ff13b37
+SIZE (vkedwardli-Spout2-ce94918ea3561b936405e7f68b6754d975ed2e8f_GH0.tar.gz) = 107660168
diff --git a/emulators/libretro-flycast/files/patch-Makefile b/emulators/libretro-flycast/files/patch-Makefile
deleted file mode 100644
index a0ba13f9b085..000000000000
--- a/emulators/libretro-flycast/files/patch-Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
---- Makefile.orig	2021-05-17 21:23:19 UTC
-+++ Makefile
-@@ -45,12 +45,8 @@ CC_AS    ?= ${CC_PREFIX}as
- 
- MFLAGS   := 
- ASFLAGS  := 
--LDFLAGS  :=
- LDFLAGS_END :=
- INCFLAGS :=
--LIBS     :=
--CFLAGS   := 
--CXXFLAGS :=
- 
- GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
- ifneq ($(GIT_VERSION)," unknown")
-@@ -70,7 +66,7 @@ endif
- # Target Dynarec
- WITH_DYNAREC = $(ARCH)
- 
--ifeq ($(ARCH), $(filter $(ARCH), i386 i686))
-+ifeq ($(ARCH), $(filter $(ARCH), i386 i486 i686))
- 	WITH_DYNAREC = x86
- endif
- 
-@@ -145,7 +141,7 @@ ifneq (,$(findstring unix,$(platform)))
- 	HAVE_CDROM = 1
- 	fpic = -fPIC
- 
--	ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
-+	ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64 amd64))
- 		CFLAGS += -DTARGET_LINUX_x64
- 		SINGLE_PREC_FLAGS=1
- 		HAVE_GENERIC_JIT = 0
diff --git a/emulators/libretro-flycast/files/patch-core_hw_aica_dsp__x64.cpp b/emulators/libretro-flycast/files/patch-core_hw_aica_dsp__x64.cpp
deleted file mode 100644
index e49c4888bf1d..000000000000
--- a/emulators/libretro-flycast/files/patch-core_hw_aica_dsp__x64.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/hw/aica/dsp_x64.cpp.orig	2021-05-17 21:23:19 UTC
-+++ core/hw/aica/dsp_x64.cpp
-@@ -37,6 +37,8 @@ DECL_ALIGN(4096) static u8 CodeBuffer[32 * 1024]
- 	__attribute__((section(".text")));
- #elif defined(__MACH__)
- 	__attribute__((section("__TEXT,.text")));
-+#elif defined(__FreeBSD__)
-+	__attribute__((section(".text")));
- #else
- 	#error CodeBuffer code section unknown
- #endif
diff --git a/emulators/libretro-flycast/files/patch-core_hw_bba_rtl8139c.h b/emulators/libretro-flycast/files/patch-core_hw_bba_rtl8139c.h
deleted file mode 100644
index 9f929eddba9b..000000000000
--- a/emulators/libretro-flycast/files/patch-core_hw_bba_rtl8139c.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- core/hw/bba/rtl8139c.h.orig	2021-06-18 06:17:55 UTC
-+++ core/hw/bba/rtl8139c.h
-@@ -58,6 +58,7 @@ struct MemoryRegion {
- /*
-  * Byte swapping utilities
-  */
-+/*
- static inline uint16_t bswap16(uint16_t x)
- {
-     return (((x & 0x00ff) << 8) |
-@@ -71,6 +72,7 @@ static inline uint32_t bswap32(uint32_t x)
-             ((x & 0x00ff0000U) >>  8) |
-             ((x & 0xff000000U) >> 24));
- }
-+*/
- #define glue(a, b) _glue(a, b)
- #define _glue(a, b) a ## b
- 
diff --git a/emulators/libretro-flycast/files/patch-core_libretro-common_rthreads_rthreads.c b/emulators/libretro-flycast/files/patch-core_libretro-common_rthreads_rthreads.c
deleted file mode 100644
index 82c1108625e7..000000000000
--- a/emulators/libretro-flycast/files/patch-core_libretro-common_rthreads_rthreads.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- core/libretro-common/rthreads/rthreads.c.orig	2021-05-17 21:23:19 UTC
-+++ core/libretro-common/rthreads/rthreads.c
-@@ -55,10 +55,9 @@
- #include <sys/sys_time.h>
- #else
- #include <pthread.h>
--#include <time.h>
- #endif
- 
--#if defined(VITA) || defined(BSD) || defined(ORBIS)
-+#if defined(VITA) || defined(__FreeBSD__) || defined(ORBIS)
- #include <sys/time.h>
- #endif
- 
diff --git a/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp b/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp
deleted file mode 100644
index 0391177b7edc..000000000000
--- a/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/rec-x86/rec_x86_driver.cpp.orig	2022-05-20 09:34:27 UTC
-+++ core/rec-x86/rec_x86_driver.cpp
-@@ -31,7 +31,7 @@ RuntimeBlockInfo* ngen_AllocateBlock(void)
- 
- x86_block* x86e;
- 
--static int cycle_counter;
-+int cycle_counter;
- 
- void* loop_no_update;
- void* intc_sched;