aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Hu <henry.hu.sh@gmail.com>2022-09-13 16:05:19 +0000
committerNeel Chauhan <nc@FreeBSD.org>2022-09-13 16:09:49 +0000
commita441758fae5a8018b50294ceda33387a441c0b54 (patch)
tree7c64753ae85c8a8e1f0ee88bf16a32a9ff148d63
parentfb2a0ab633f51b12a1725628be35fbc18e0aad3d (diff)
downloadports-a441758fae5a8018b50294ceda33387a441c0b54.tar.gz
ports-a441758fae5a8018b50294ceda33387a441c0b54.zip
games/libretro-melonds: new port: libretro port of melonDS
PR: 266391
-rw-r--r--games/Makefile1
-rw-r--r--games/libretro-melonds/Makefile23
-rw-r--r--games/libretro-melonds/distinfo3
-rw-r--r--games/libretro-melonds/files/patch-src_libretro_libretro-common_rthreads_rthreads.c11
-rw-r--r--games/libretro-melonds/files/patch-src_libretro_platform.cpp10
-rw-r--r--games/libretro-melonds/pkg-descr3
6 files changed, 51 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index b3556eea5470..b3e3f9c0e101 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -527,6 +527,7 @@
SUBDIR += libretro-mame2003
SUBDIR += libretro-mame2003_plus
SUBDIR += libretro-mgba
+ SUBDIR += libretro-melonds
SUBDIR += libretro-mu
SUBDIR += libretro-nestopia
SUBDIR += libretro-nxengine
diff --git a/games/libretro-melonds/Makefile b/games/libretro-melonds/Makefile
new file mode 100644
index 000000000000..85cbc5a6d686
--- /dev/null
+++ b/games/libretro-melonds/Makefile
@@ -0,0 +1,23 @@
+PORTNAME= libretro-melonds
+PORTVERSION= 0.20220712
+CATEGORIES= games
+
+MAINTAINER= henry.hu.sh@gmail.com
+COMMENT= Port of melonDS to libretro
+
+LICENSE= GPLv3
+
+USES= compiler:c++17-lang gmake
+
+USE_GITHUB= yes
+GH_ACCOUNT= libretro
+GH_PROJECT= melonDS
+GH_TAGNAME= 490a66a
+
+PLIST_FILES= lib/libretro/melonds_libretro.so
+
+do-install:
+ ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
+ ${INSTALL_LIB} ${WRKSRC}/melonds_libretro.so ${STAGEDIR}/${PREFIX}/lib/libretro;
+
+.include <bsd.port.mk>
diff --git a/games/libretro-melonds/distinfo b/games/libretro-melonds/distinfo
new file mode 100644
index 000000000000..645a224d33a9
--- /dev/null
+++ b/games/libretro-melonds/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662934834
+SHA256 (libretro-melonDS-0.20220712-490a66a_GH0.tar.gz) = e12a41863f9018bb863d4e3f217cc23dd9b67a530f85655c1126471422511ffc
+SIZE (libretro-melonDS-0.20220712-490a66a_GH0.tar.gz) = 2929298
diff --git a/games/libretro-melonds/files/patch-src_libretro_libretro-common_rthreads_rthreads.c b/games/libretro-melonds/files/patch-src_libretro_libretro-common_rthreads_rthreads.c
new file mode 100644
index 000000000000..b19846bae1da
--- /dev/null
+++ b/games/libretro-melonds/files/patch-src_libretro_libretro-common_rthreads_rthreads.c
@@ -0,0 +1,11 @@
+--- src/libretro/libretro-common/rthreads/rthreads.c.orig 2022-07-12 14:45:04 UTC
++++ src/libretro/libretro-common/rthreads/rthreads.c
+@@ -67,6 +67,8 @@
+ #include <mach/mach.h>
+ #endif
+
++#include <sys/time.h>
++
+ struct thread_data
+ {
+ void (*func)(void*);
diff --git a/games/libretro-melonds/files/patch-src_libretro_platform.cpp b/games/libretro-melonds/files/patch-src_libretro_platform.cpp
new file mode 100644
index 000000000000..1912b18b75ec
--- /dev/null
+++ b/games/libretro-melonds/files/patch-src_libretro_platform.cpp
@@ -0,0 +1,10 @@
+--- src/libretro/platform.cpp.orig 2022-09-11 22:46:37 UTC
++++ src/libretro/platform.cpp
+@@ -13,6 +13,7 @@
+ #include <unistd.h>
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #define socket_t int
+ #define sockaddr_t struct sockaddr
+ #define closesocket close
diff --git a/games/libretro-melonds/pkg-descr b/games/libretro-melonds/pkg-descr
new file mode 100644
index 000000000000..c9512a4f6be2
--- /dev/null
+++ b/games/libretro-melonds/pkg-descr
@@ -0,0 +1,3 @@
+Port of melonDS to libretro
+
+WWW: https://github.com/libretro/melonDS