git: 13490562a684 - main - games/libretro-boom3: new port

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

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

commit 13490562a684c056511822e668c5799451814823
Author:     Stephane D'Alu <sdalu@sdalu.com>
AuthorDate: 2023-10-26 22:27:47 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-11-07 00:16:55 +0000

    games/libretro-boom3: new port
    
    PR:             274647
---
 games/Makefile                                     |  1 +
 games/libretro-boom3/Makefile                      | 27 ++++++++++++++++++++++
 games/libretro-boom3/distinfo                      |  3 +++
 .../patch-sys_libretro-common_rthreads_rthreads.c  | 11 +++++++++
 games/libretro-boom3/pkg-descr                     |  1 +
 5 files changed, 43 insertions(+)

diff --git a/games/Makefile b/games/Makefile
index 9905c845c5d7..b7a55a4b5538 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -510,6 +510,7 @@
     SUBDIR += libretro-beetle_vb
     SUBDIR += libretro-beetle_wswan
     SUBDIR += libretro-bluemsx
+    SUBDIR += libretro-boom3
     SUBDIR += libretro-cap32
     SUBDIR += libretro-core-info
     SUBDIR += libretro-desmume2015
diff --git a/games/libretro-boom3/Makefile b/games/libretro-boom3/Makefile
new file mode 100644
index 000000000000..fd2ca401d1ad
--- /dev/null
+++ b/games/libretro-boom3/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	libretro-boom3
+DISTVERSION=	0.20220810
+CATEGORIES=	games
+
+MAINTAINER=	sdalu@sdalu.com
+COMMENT=	dhewm3 (Doom 3) core for libretro API
+WWW=		https://github.com/libretro/boom3
+
+LICENSE=	GPLv3
+
+USES=		gmake gl localbase:ldflags
+USE_GL=		gl
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	libretro
+GH_PROJECT=	boom3
+GH_TAGNAME=	0bea79abf5ec8262dfe9af73cb8c54ea6e2aeb98
+
+WRKSRC_SUBDIR=	neo
+
+PLIST_FILES=	lib/libretro/boom3_libretro.so
+
+do-install:
+	${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro
+	${INSTALL_LIB} ${WRKSRC}/boom3_libretro.so ${STAGEDIR}/${PREFIX}/lib/libretro
+
+.include <bsd.port.mk>
diff --git a/games/libretro-boom3/distinfo b/games/libretro-boom3/distinfo
new file mode 100644
index 000000000000..33ff6ffeb16c
--- /dev/null
+++ b/games/libretro-boom3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1698356977
+SHA256 (libretro-boom3-0.20220810-0bea79abf5ec8262dfe9af73cb8c54ea6e2aeb98_GH0.tar.gz) = 613d655c7f05dd2fd90fc27721165efad2be6c30ed85d82a07d28d81e30324cc
+SIZE (libretro-boom3-0.20220810-0bea79abf5ec8262dfe9af73cb8c54ea6e2aeb98_GH0.tar.gz) = 6893409
diff --git a/games/libretro-boom3/files/patch-sys_libretro-common_rthreads_rthreads.c b/games/libretro-boom3/files/patch-sys_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..3e362b35ad45
--- /dev/null
+++ b/games/libretro-boom3/files/patch-sys_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- sys/libretro-common/rthreads/rthreads.c.orig	2023-10-28 13:28:00 UTC
++++ sys/libretro-common/rthreads/rthreads.c
+@@ -58,7 +58,7 @@
+ #include <time.h>
+ #endif
+ 
+-#if defined(VITA) || defined(BSD) || defined(ORBIS)
++#if defined(VITA) || defined(BSD) || defined(ORBIS) || (__FreeBSD__ <= 12)
+ #include <sys/time.h>
+ #endif
+ 
diff --git a/games/libretro-boom3/pkg-descr b/games/libretro-boom3/pkg-descr
new file mode 100644
index 000000000000..dd30601b6454
--- /dev/null
+++ b/games/libretro-boom3/pkg-descr
@@ -0,0 +1 @@
+dhewm3 (Doom 3) core for libretro API