git: a64dfb2870a6 - main - emulators/mednafen: Update to 1.32.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 09 Sep 2024 22:31:15 UTC
The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=a64dfb2870a63c038e7e028a75528f193e84dcfb commit a64dfb2870a63c038e7e028a75528f193e84dcfb Author: Stefan Schlosser <bsdcode@disroot.org> AuthorDate: 2024-09-09 22:28:22 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2024-09-09 22:30:56 +0000 emulators/mednafen: Update to 1.32.1 * consolidate LIB_DEPENDS, USES, USE_*, OPTIONS_*, *_DESC and patches * unbundle external libraries * ALSA: add support, enabled by default * DOCS: install complete documentation * SS: remove hardcoded -mtune=haswell * pkg-message: add OSS section * pet portclippy(1), portfmt(1) PR: 280021 280958 --- emulators/mednafen/Makefile | 165 ++++++++++++--------- emulators/mednafen/distinfo | 6 +- .../files/extra-patch-src_drivers_main.cpp | 11 ++ emulators/mednafen/files/patch-configure.ac | 26 ++++ .../mednafen/files/patch-src-drivers_Joystick.cpp | 20 --- .../files/patch-src_cdrom_CDAFReader__Vorbis.cpp | 20 +++ .../patch-src_sound_OwlResampler__altivec.inc | 7 - emulators/mednafen/files/pkg-message.in | 14 +- emulators/mednafen/pkg-plist | 64 +++++++- 9 files changed, 231 insertions(+), 102 deletions(-) diff --git a/emulators/mednafen/Makefile b/emulators/mednafen/Makefile index 17469deebc1e..c9404fb73b46 100644 --- a/emulators/mednafen/Makefile +++ b/emulators/mednafen/Makefile @@ -1,6 +1,5 @@ PORTNAME= mednafen -PORTVERSION= 1.26.1 -PORTREVISION= 3 +DISTVERSION= 1.32.1 PORTEPOCH= 1 CATEGORIES= emulators games MASTER_SITES= https://mednafen.github.io/releases/files/ @@ -12,75 +11,107 @@ WWW= https://mednafen.github.io LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libcdio.so:sysutils/libcdio \ - libsndfile.so:audio/libsndfile \ - libvorbis.so:audio/libvorbis +LIB_DEPENDS= libFLAC.so:audio/flac \ + liblzo2.so:archivers/lzo2 \ + libmpcdec.so:audio/musepack \ + libtrio.so:devel/trio \ + libvorbisfile.so:audio/libvorbis \ + libzstd.so:archivers/zstd + +USES= autoreconf compiler:c++11-lang gl iconv localbase pkgconfig sdl \ + tar:xz +USE_GL= egl +USE_SDL= sdl2 + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --with-external-libzstd \ + --with-external-lzo \ + --with-external-mpcdec \ + --with-external-tremor \ + --with-external-trio -GNU_CONFIGURE= yes -USE_SDL= sdl2 net2 -USE_GL= gl glu -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -WRKSRC= ${WRKDIR}/${PORTNAME} SUB_FILES= pkg-message -CONFIGURE_ARGS+=--disable-alsa --disable-alsatest \ - --with-sdl-prefix=${LOCALBASE} - -USES= compiler:c++11-lib cpe gl iconv pkgconfig:build sdl tar:xz -CPE_VENDOR= david_shadoff - -OPTIONS_DEFINE= NLS DOCS JACK -OPTIONS_MULTI= EMU -OPTIONS_MULTI_EMU= GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB -OPTIONS_DEFAULT= GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB - -GB_DESC= build with GameBoy emulation -GBA_DESC= build with GameBoy Advance emulation -LINX_DESC= build with Atari Lynx emulation -MD_DESC= build with Sega Genesis/MegaDrive emulation -NES_DESC= build with Nintendo Entertainment System emulation -NGP_DESC= build with Neo Geo Pocket emulation -PCE_DESC= build with PC Engine (TurboGrafx 16) emulation -PCFX_DESC= build with PC-FX emulation -PSX_DESC= build with Playstation emulation -SMS_DESC= build with SMS+GG emulation -SWAN_DESC= build with WonderSWan emulation -VB_DESC= build with Virtual Boy emulation -JACK_DESC= support the JACK audio API - -OPTIONS_SUB= yes - -NLS_USES= gettext -NLS_CONFIGURE_ENABLE=nls - -JACK_LIB_DEPENDS=libjack.so:audio/jack -JACK_CONFIGURE_ENABLE=jack - -GB_CONFIGURE_ENABLE=gb -GBA_CONFIGURE_ENABLE=gba -LINX_CONFIGURE_ENABLE=lynx -MD_CONFIGURE_ENABLE=md -NES_CONFIGURE_ENABLE=nes -NGP_CONFIGURE_ENABLE=ngp -PCE_CONFIGURE_ENABLE=pce -PCFX_CONFIGURE_ENABLE=pcfx -PSX_CONFIGURE_ENABLE=psx -SMS_CONFIGURE_ENABLE=sms -SWAN_CONFIGURE_ENABLE=wswan -VB_CONFIGURE_ENABLE=vb - -post-patch: - @${REINPLACE_CMD} -e 's|versionsort|alphasort|g' \ - ${WRKSRC}/src/drivers/Joystick_Linux.cpp +WRKSRC= ${WRKDIR}/${PORTNAME} -pre-configure: - @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ - -e 's|/usr/X11R6|${LOCALBASE}|g' \ - ${WRKSRC}/configure +OPTIONS_DEFINE= DOCS NLS +OPTIONS_DEFAULT= ALSA APPLE2 GP GPA JACK LYNX MD NES NGP PCE PCFX PSX \ + SMS SNES SS VB WSWAN +OPTIONS_GROUP= AUDIO +OPTIONS_GROUP_AUDIO= ALSA JACK +OPTIONS_MULTI= EMU +OPTIONS_MULTI_EMU= APPLE2 GP GPA LYNX MD NES NGP PCE PCFX PSX SMS SNES SS \ + VB WSWAN +OPTIONS_SUB= yes + +APPLE2_DESC= Apple II +GPA_DESC= GameBoy Advance +GP_DESC= GameBoy +LYNX_DESC= Atari Lynx +MD_DESC= Sega Genesis/Megadrive +NES_DESC= Nintendo Entertainment System +NGP_DESC= Neo Geo Pocket +PCE_DESC= PC Engine/TurboGrafx 16 +PCFX_DESC= PC-FX +PSX_DESC= Sony PlayStation +SMS_DESC= Sega Game Gear + Sega Master System +SNES_DESC= Super Nintendo Entertainment System/Super Famicom +SS_DESC= Sega Saturn +VB_DESC= Virtual Boy +WSWAN_DESC= WonderSwan + +ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib +ALSA_CONFIGURE_ENABLE= alsa +ALSA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_drivers_main.cpp + +APPLE2_CONFIGURE_ENABLE= apple2 + +GPA_CONFIGURE_ENABLE= gba + +GP_CONFIGURE_ENABLE= gb + +JACK_LIB_DEPENDS= libjack.so:audio/jack +JACK_CONFIGURE_ENABLE= jack + +LYNX_CONFIGURE_ENABLE= lynx + +MD_CONFIGURE_ENABLE= md + +NES_CONFIGURE_ENABLE= nes + +NGP_CONFIGURE_ENABLE= ngp -post-install: - @${MKDIR} ${STAGEDIR}${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/Documentation/mednafen.html ${STAGEDIR}${DOCSDIR} +NLS_USES= gettext +NLS_CONFIGURE_ENABLE= nls + +PCE_CONFIGURE_ENABLE= pce pce-fast + +PCFX_CONFIGURE_ENABLE= pcfx + +PSX_CONFIGURE_ENABLE= psx + +SMS_CONFIGURE_ENABLE= sms + +SNES_CONFIGURE_ENABLE= snes snes-faust + +SS_CONFIGURE_ENABLE= ss + +VB_CONFIGURE_ENABLE= vb + +WSWAN_CONFIGURE_ENABLE= wswan + +pre-configure: + ${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ + ${WRKSRC}/m4/lib-link.m4 \ + ${WRKSRC}/m4/lib-prefix.m4 + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/ChangeLog \ + ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README \ + ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && \ + ${COPYTREE_SHARE} Documentation ${STAGEDIR}${DOCSDIR}) .include <bsd.port.mk> diff --git a/emulators/mednafen/distinfo b/emulators/mednafen/distinfo index 1a02d1ce9f9a..3f7b1613e18e 100644 --- a/emulators/mednafen/distinfo +++ b/emulators/mednafen/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1606839934 -SHA256 (mednafen-1.26.1.tar.xz) = 842907c25c4292c9ba497c9cb9229c7d10e04e22cb4740d154ab690e6587fdf4 -SIZE (mednafen-1.26.1.tar.xz) = 3319756 +TIMESTAMP = 1724063426 +SHA256 (mednafen-1.32.1.tar.xz) = de7eb94ab66212ae7758376524368a8ab208234b33796625ca630547dbc83832 +SIZE (mednafen-1.32.1.tar.xz) = 3571236 diff --git a/emulators/mednafen/files/extra-patch-src_drivers_main.cpp b/emulators/mednafen/files/extra-patch-src_drivers_main.cpp new file mode 100644 index 000000000000..6b9d37e7766b --- /dev/null +++ b/emulators/mednafen/files/extra-patch-src_drivers_main.cpp @@ -0,0 +1,11 @@ +--- src/drivers/main.cpp.orig 2024-08-20 23:31:51 UTC ++++ src/drivers/main.cpp +@@ -181,7 +181,7 @@ static const MDFNSetting DriverSettings[] = + { "nothrottle", MDFNSF_NOFLAGS, gettext_noop("Disable speed throttling when sound is disabled."), NULL, MDFNST_BOOL, "0"}, + { "autosave", MDFNSF_NOFLAGS, gettext_noop("Automatically load/save state on game load/close."), gettext_noop("Automatically save and load save states when a game is closed or loaded, respectively."), MDFNST_BOOL, "0"}, + { "sound.driver", MDFNSF_NOFLAGS, gettext_noop("Select sound driver."), gettext_noop("The following choices are possible, sorted by preference, high to low, when \"default\" driver is used, but dependent on being compiled in."), MDFNST_ENUM, "default", NULL, NULL, NULL, NULL, SDriver_List }, +- { "sound.device", MDFNSF_NOFLAGS, gettext_noop("Select sound output device."), gettext_noop("When using ALSA sound output under Linux, the \"sound.device\" setting \"default\" is Mednafen's default, IE \"hw:0\", not ALSA's \"default\". If you want to use ALSA's \"default\", use \"sexyal-literal-default\"."), MDFNST_STRING, "default", NULL, NULL }, ++ { "sound.device", MDFNSF_NOFLAGS, gettext_noop("Select sound output device."), gettext_noop("When using ALSA sound output under Linux, the \"sound.device\" setting \"default\" is Mednafen's default, IE \"hw:0\", not ALSA's \"default\". If you want to use ALSA's \"default\", use \"sexyal-literal-default\"."), MDFNST_STRING, "sexyal-literal-default", NULL, NULL }, + { "sound.volume", MDFNSF_NOFLAGS, gettext_noop("Sound volume level, in percent."), gettext_noop("Setting this volume control higher than the default of \"100\" may severely distort the sound."), MDFNST_UINT, "100", "0", "150" }, + { "sound", MDFNSF_NOFLAGS, gettext_noop("Enable sound output."), NULL, MDFNST_BOOL, "1" }, + { "sound.period_time", MDFNSF_NOFLAGS, gettext_noop("Desired period size in microseconds(μs)."), gettext_noop("Currently only affects OSS, ALSA, WASAPI(exclusive mode), and SDL output. A value of 0 defers to the default in the driver code in SexyAL.\n\nNote: This is not the \"sound buffer size\" setting, that would be \"\5sound.buffer_time\"."), MDFNST_UINT, "0", "0", "100000" }, diff --git a/emulators/mednafen/files/patch-configure.ac b/emulators/mednafen/files/patch-configure.ac new file mode 100644 index 000000000000..495dbe30a62e --- /dev/null +++ b/emulators/mednafen/files/patch-configure.ac @@ -0,0 +1,26 @@ +--- configure.ac.orig 2024-08-19 17:50:17 UTC ++++ configure.ac +@@ -238,7 +238,6 @@ SS_EXTRA_FLAGS="" + # Begin ss flags + # + SS_EXTRA_FLAGS="" +-AX_APPEND_COMPILE_FLAGS([-mtune=haswell], SS_EXTRA_FLAGS) + AC_SUBST(SS_EXTRA_FLAGS) + # + # End ss flags +@@ -626,12 +625,12 @@ if test x$with_external_tremor = xyes; then + [], + [with_external_tremor=no]) + if test x$with_external_tremor = xyes; then +- AC_CHECK_LIB([vorbisidec], [ov_read], [], AC_MSG_ERROR([*** libvorbisidec not found!])) +- AC_CHECK_HEADER([tremor/ivorbisfile.h], [], AC_MSG_ERROR([*** libvorbisidec not found!])) ++ AC_CHECK_LIB([vorbisfile], [ov_read], [], AC_MSG_ERROR([*** libvorbisfile not found!])) ++ AC_CHECK_HEADER([vorbis/vorbisfile.h], [], AC_MSG_ERROR([*** libvorbisfile not found!])) + + AC_DEFINE([HAVE_EXTERNAL_TREMOR], [1], [Define if we are compiling and linking with external tremor.]) + AM_CONDITIONAL(HAVE_EXTERNAL_TREMOR, true) +- AC_SUBST([TREMOR_LIBS], ["-lvorbisidec"]) ++ AC_SUBST([TREMOR_LIBS], ["-lvorbisfile"]) + fi + + # diff --git a/emulators/mednafen/files/patch-src-drivers_Joystick.cpp b/emulators/mednafen/files/patch-src-drivers_Joystick.cpp deleted file mode 100644 index 76d158e5efa6..000000000000 --- a/emulators/mednafen/files/patch-src-drivers_Joystick.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/drivers/Joystick.cpp 2020-11-10 01:04:17.000000000 -0500 -+++ src/drivers/Joystick.cpp 2020-12-01 11:34:01.154240000 -0500 -@@ -32,7 +32,7 @@ - #include "Joystick_SDL.h" - #endif - --#ifdef HAVE_LINUX_JOYSTICK -+#if defined(HAVE_LINUX_JOYSTICK) && !defined(__FreeBSD__) - #include "Joystick_Linux.h" - #endif - -@@ -175,7 +175,7 @@ - - try - { -- #ifdef HAVE_LINUX_JOYSTICK -+ #if defined(HAVE_LINUX_JOYSTICK) && !defined(__FreeBSD__) - main_driver = JoystickDriver_Linux_New(); - #elif defined(WIN32) - { diff --git a/emulators/mednafen/files/patch-src_cdrom_CDAFReader__Vorbis.cpp b/emulators/mednafen/files/patch-src_cdrom_CDAFReader__Vorbis.cpp new file mode 100644 index 000000000000..3b543c8a15df --- /dev/null +++ b/emulators/mednafen/files/patch-src_cdrom_CDAFReader__Vorbis.cpp @@ -0,0 +1,20 @@ +--- src/cdrom/CDAFReader_Vorbis.cpp.orig 2024-04-05 02:27:32 UTC ++++ src/cdrom/CDAFReader_Vorbis.cpp +@@ -24,7 +24,7 @@ + #include "CDAFReader_Vorbis.h" + + #ifdef HAVE_EXTERNAL_TREMOR +- #include <tremor/ivorbisfile.h> ++ #include <vorbis/vorbisfile.h> + #else + #include <mednafen/tremor/ivorbisfile.h> + #endif +@@ -143,7 +143,7 @@ uint64 CDAFReader_Vorbis::Read_(int16 *buffer, uint64 + + while(toread > 0) + { +- long didread = ov_read(&ovfile, (char*)tw_buf, toread, &cursection); ++ long didread = ov_read(&ovfile, (char*)tw_buf, toread, 0, 2, 1, &cursection); + + if(didread == 0) + break; diff --git a/emulators/mednafen/files/patch-src_sound_OwlResampler__altivec.inc b/emulators/mednafen/files/patch-src_sound_OwlResampler__altivec.inc deleted file mode 100644 index cad6e417a854..000000000000 --- a/emulators/mednafen/files/patch-src_sound_OwlResampler__altivec.inc +++ /dev/null @@ -1,7 +0,0 @@ ---- src/sound/OwlResampler_altivec.inc.orig 2024-05-08 15:13:14 UTC -+++ src/sound/OwlResampler_altivec.inc -@@ -1,3 +1,4 @@ -+#include <altivec.h> - // - // - // diff --git a/emulators/mednafen/files/pkg-message.in b/emulators/mednafen/files/pkg-message.in index 3bb65580db19..03cc2a5c54b1 100644 --- a/emulators/mednafen/files/pkg-message.in +++ b/emulators/mednafen/files/pkg-message.in @@ -1,13 +1,19 @@ [ { type: install message: <<EOM -1) Run mednafen [OPTION] [FILE] +The complete documentation is available at: -2) See complete documentation at: + %%DOCSDIR%%/Documentation/mednafen.html - %%DOCSDIR%%/mednafen.html +If you experience crackling or choppy audio when using the OSS audio backend, +then Mednafen is probably using an unreasonable small period size with the +default value 0 of sound.period_time. In this case retry with an explicit value, +the documentation itself suggests 2.666ms or 5.333ms, i.e. set -3) Enjoy it ;) + sound.period_time 2666 or + sound.period_time 5333 + +Enjoy it ;) EOM } ] diff --git a/emulators/mednafen/pkg-plist b/emulators/mednafen/pkg-plist index 7e53e83d5145..f4ed1dba2d01 100644 --- a/emulators/mednafen/pkg-plist +++ b/emulators/mednafen/pkg-plist @@ -1,5 +1,67 @@ bin/mednafen +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/Documentation/apple2.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/apple2.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/bwolf0.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/bwolf1.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/cdplay.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/cdplay.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/cheat.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/cheats.txt +%%PORTDOCS%%%%DOCSDIR%%/Documentation/debugger.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/docgen.inc +%%PORTDOCS%%%%DOCSDIR%%/Documentation/fname_format.txt +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gb.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gb.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gba.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gba.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/generate.sh +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gg.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/gg.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/headerbg.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/lynx.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/lynx.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/md.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/md.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.css +%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/modules.def +%%PORTDOCS%%%%DOCSDIR%%/Documentation/nes.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/nes.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/netplay.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/netplay.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ngp.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ngp.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce_fast.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce_fast.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pcfx.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/pcfx.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/psx.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/psx.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sapphire0.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sapphire1.png +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sasplay.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sasplay.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/settings.def +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sms.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/sms.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes_faust.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes_faust.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ss.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ss.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ssfplay.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/ssfplay.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/vb.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/vb.php +%%PORTDOCS%%%%DOCSDIR%%/Documentation/wswan.html +%%PORTDOCS%%%%DOCSDIR%%/Documentation/wswan.php +%%PORTDOCS%%%%DOCSDIR%%/README %%NLS%%share/locale/de/LC_MESSAGES/mednafen.mo %%NLS%%share/locale/es/LC_MESSAGES/mednafen.mo %%NLS%%share/locale/ru/LC_MESSAGES/mednafen.mo -%%PORTDOCS%%%%DOCSDIR%%/mednafen.html