git: fb2a0ab633f5 - main - games/melonds: new port: melonDS emulator

From: Neel Chauhan <nc_at_FreeBSD.org>
Date: Tue, 13 Sep 2022 16:09:58 UTC
The branch main has been updated by nc:

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

commit fb2a0ab633f51b12a1725628be35fbc18e0aad3d
Author:     Henry Hu <henry.hu.sh@gmail.com>
AuthorDate: 2022-09-13 16:04:05 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-09-13 16:09:48 +0000

    games/melonds: new port: melonDS emulator
    
    PR:     266390
---
 games/Makefile          |  1 +
 games/melonds/Makefile  | 41 +++++++++++++++++++++++++++++++++++++++++
 games/melonds/distinfo  |  3 +++
 games/melonds/pkg-descr | 17 +++++++++++++++++
 games/melonds/pkg-plist |  8 ++++++++
 5 files changed, 70 insertions(+)

diff --git a/games/Makefile b/games/Makefile
index 169a81534ab3..b3556eea5470 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -612,6 +612,7 @@
     SUBDIR += megaglest
     SUBDIR += megaglest-data
     SUBDIR += megamario
+    SUBDIR += melonds
     SUBDIR += memonix
     SUBDIR += meqcc
     SUBDIR += meritous
diff --git a/games/melonds/Makefile b/games/melonds/Makefile
new file mode 100644
index 000000000000..39f1638b9e19
--- /dev/null
+++ b/games/melonds/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	melonds
+PORTVERSION=	0.9.4
+CATEGORIES=	games
+PKGNAMESUFFIX=	-${FLAVOR}
+
+MAINTAINER=	henry.hu.sh@gmail.com
+COMMENT=	Nintendo DS emulator
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libslirp.so:net/libslirp \
+		libepoxy.so:graphics/libepoxy
+
+FLAVORS=	qt5 qt6
+FLAVOR?=	qt5
+
+USES=		cmake compiler:c++17-lang desktop-file-utils gnome \
+		iconv libarchive pkgconfig qt:${FLAVOR:S/qt//} sdl
+USE_GNOME=	glib20
+USE_SDL=	sdl2
+
+.if ${FLAVOR} == qt5
+CMAKE_OFF=	USE_QT6
+.else
+CMAKE_ON=	USE_QT6
+.endif
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	melonDS-emu
+GH_PROJECT=	melonDS
+GH_TAGNAME=	0.9.4
+
+qt5_CONFLICTS_INSTALL=	${PORTNAME}-qt6
+qt6_CONFLICTS_INSTALL=	${PORTNAME}-qt5
+
+_USE_QT5=	core gui network widgets buildtools:build qmake:build
+_USE_QT6=	base
+USE_QT=		${_USE_QT${FLAVOR:S/qt//}}
+
+.include <bsd.port.mk>
diff --git a/games/melonds/distinfo b/games/melonds/distinfo
new file mode 100644
index 000000000000..12ee4fff5a36
--- /dev/null
+++ b/games/melonds/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662945631
+SHA256 (melonDS-emu-melonDS-0.9.4_GH0.tar.gz) = 8022c8798a723f8ffae6ffdad2e7637cf9046e88f86b55b5f9ad3fa3b2e6d398
+SIZE (melonDS-emu-melonDS-0.9.4_GH0.tar.gz) = 2330696
diff --git a/games/melonds/pkg-descr b/games/melonds/pkg-descr
new file mode 100644
index 000000000000..268b5597e4da
--- /dev/null
+++ b/games/melonds/pkg-descr
@@ -0,0 +1,17 @@
+melonDS aims at providing fast and accurate Nintendo DS emulation. While it is
+still a work in progress, it has a pretty solid set of features:
+
+ * Nearly complete core (CPU, video, audio, ...)
+ * JIT recompiler for fast emulation
+ * OpenGL renderer, 3D upscaling
+ * RTC, microphone, lid close/open
+ * Joystick support
+ * Savestates
+ * Various display position/sizing/rotation modes
+ * (WIP) Wifi: local multiplayer, online connectivity
+ * (WIP) DSi emulation
+ * DLDI
+ * (WIP) GBA slot add-ons
+ * and more are planned!
+
+WWW: https://melonds.kuribo64.net/
diff --git a/games/melonds/pkg-plist b/games/melonds/pkg-plist
new file mode 100644
index 000000000000..1b3ec5792104
--- /dev/null
+++ b/games/melonds/pkg-plist
@@ -0,0 +1,8 @@
+bin/melonDS
+share/applications/net.kuribo64.melonDS.desktop
+share/icons/hicolor/128x128/apps/net.kuribo64.melonDS.png
+share/icons/hicolor/16x16/apps/net.kuribo64.melonDS.png
+share/icons/hicolor/256x256/apps/net.kuribo64.melonDS.png
+share/icons/hicolor/32x32/apps/net.kuribo64.melonDS.png
+share/icons/hicolor/48x48/apps/net.kuribo64.melonDS.png
+share/icons/hicolor/64x64/apps/net.kuribo64.melonDS.png