From nobody Mon Sep 09 22:31:15 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X2hPv2vw2z5VHNC; Mon, 09 Sep 2024 22:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X2hPv2hNKz49KV; Mon, 9 Sep 2024 22:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725921075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwSZBLC+8Q9N39ZchdyYUPJOtNZDR2cAfzpZiQxk9xo=; b=q32L/uWg5G75TzX0F+uzn/MrB4gN2Czqn+UxXUiy/mrSi2FSPFoK/jm+XhOjnbzQ6+1kY8 ZaCFd8+B+3VPkshIDuAQvLXmVAmB/WGJ3NTPi7/L7n9yRX9AYXp1Df4L6ApZMFNhbSl53t tmKPOde25+xzP02l/7hKQlamsVZp2Kqt9rud4qia0igMxCfzjZTOudFRI51sMX5SAYFnOF NpUHtga3tc7McnEsEFp10dezlBHeLSb7GwYOuqdfM5ojVNhSiNKTwx76L+j1PDOkdx2Ntz 9rlra3QIkKVu5fb7oeSTGHwVFWuM8eTS13uSHG9YUPi24CDk/75hP9UaHOvEJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725921075; a=rsa-sha256; cv=none; b=Twt6RkjsFfqq+w3Y4ZLcmbaiC+8aPdoLAD6T7LZFjkg0XF8HmslEAO6QHONwq4CK6nqX6P hcEB47AuqQJ5yFZmq6/qy/ZBl7/W3xs5oT+JhRyFUIimj/NrKg9uWm2Sd7VBUP4bNwLU2T u1TrwptLGmordhXGvI+1kqQbelezPfI8MZLG5f1/vhIPeHHW9hV7u6gvkFClyaMS10xr3Q 0QWBS60ybc55EBhi04Ryf3LayZJ/UcC7pj4+xltou5ngBNuSpt9ZFtSEJNe50ZekpPMrv6 5Y/r5mlqodiL6IDBRcwBMJE9RhA8oD7WI4UQSmZkEA398x2WW3gk91oWvKYKhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725921075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwSZBLC+8Q9N39ZchdyYUPJOtNZDR2cAfzpZiQxk9xo=; b=Xr3vHk+C6zXVrC1tntGIenZbdCCtLQql1qbXTox9kaTv1iOZI4z+o5kpEkoI1V/XX+qof9 lXGaUvnuw+2HqM0EpTeH92ioip1Ku8Bq3oq3tODprieHPGsFRsDzOeiuxGGTLiA4wfRz4G JmuJhsoTb0tFfQJGcPF/ctdIlsxqCpAp3wdM5b9CNg1GRAW5Ry5tQbSt6ZbxVHfLNJOTQU DCp3s+UQXkHzTf5oTd7w1HGUHd3M7DM4KdZ5mhSdo0aUIgHHYhhA1s+BDwfxY2ZYngmMT0 Z/xaE1gCQie+YSJM+QPIqRz9exXoFuVlnInBEpJtO1clBDvxkx/LHdXDwBSPAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X2hPv2HtlzLQV; Mon, 9 Sep 2024 22:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 489MVFdq003030; Mon, 9 Sep 2024 22:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 489MVFO6003027; Mon, 9 Sep 2024 22:31:15 GMT (envelope-from git) Date: Mon, 9 Sep 2024 22:31:15 GMT Message-Id: <202409092231.489MVFO6003027@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: a64dfb2870a6 - main - emulators/mednafen: Update to 1.32.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a64dfb2870a63c038e7e028a75528f193e84dcfb Auto-Submitted: auto-generated The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=a64dfb2870a63c038e7e028a75528f193e84dcfb commit a64dfb2870a63c038e7e028a75528f193e84dcfb Author: Stefan Schlosser AuthorDate: 2024-09-09 22:28:22 +0000 Commit: Jose Alonso Cardenas Marquez 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 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 ++ #include + #else + #include + #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 - // - // - // 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: <