From nobody Sat Aug 24 14:27:56 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 4WrfRc6v6Fz5TCpt; Sat, 24 Aug 2024 14:27:56 +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 4WrfRc62mFz441q; Sat, 24 Aug 2024 14:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724509676; 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=6QKq+TK5YtZHJLEcfAu+lNtklQMuw9CkO4JhVXRUcF8=; b=qNfsKRqcdCejQRVqswCmtRdYe0alK9z9KKas98Fe3+bA8v0LYBLweYdez+d1SxPHEUZuy6 qufgaMYyqKYlKQPiAF4ussAP5SApb67dZ7/Qgd04knPm2147/z78/b4hyUj6E9+Gg+WXwF detO6uu9ed4DeuFN6+w047vpp5tzNGHYinfYVbGVRX62tckLTmfsPUU9OYY0bCF+DjtPMm pftb9nDp9PDNDcMchyCg++MqpXAnWqsEagOv/mlAKkMojhO3++V3pIgXgYn0GRNdtoFkc9 YwvNCvs5dOaE0pB4TPrK3jadCGay+QqbtgykcE7N50K9EvLH39T5s8w2TQhUCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724509676; a=rsa-sha256; cv=none; b=YGUcj3ogTKoMQZQbpP39nKnA0jZo6+0u1DM1Fc4/0/uVG12eVW/gAcX2DzPTv3O70ko+zh v4cpTZPXrM7mCDRNYFhB+KZwVdKQDcC1hocoiij4an+FD7Qfdnrevlm/jTRzdoewdPgNBi YM7aQrBG53ugIkDj+sVjRyIH3OEU2gpzeufOovPMz/X7pkO1L7XExMYxLTDAdHGRft3l4K 5Njxc41g+uCGZrvyXlOLGTrVBVgmsv5KoI++EqOXc6yHvZigvg2GA4F1D9o5RdBntKmi6O gVf/LIXs58ZXJCPmmVwomiYaS8hLjLc39ToLJY4SES3cMzsujNsS5ksfU/cBdA== 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=1724509676; 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=6QKq+TK5YtZHJLEcfAu+lNtklQMuw9CkO4JhVXRUcF8=; b=OO8eymb/nvnYRiLbPJwTnDgGtTLTgsnzd4J0ptp6UXrUjK5hOynOsTR6jgamYNG/CyzIaV Un6tiN9FWhpe2Uj2KxPCAg7/VwtH/xOAjaRyfa346NDTEG8JiMmgybvtcp8JC03Oy+IElW YxWyaIejv/Sq0tCa20cfWI+4eNFWRfn/6OvxQ4iVOGfS/bewReiOHlwxsTmknmeffrnraA 8giKvBleCN2eFEkUEThlFyWdc9WOgx7uPVMCd/zHeA9gaILXP1fwuQuMLCOmtgsjtQdP8l H/aFZtKQul5e5XuLyVZe74agpin9toYmAeElW6px8iaQ5h/pkW5d0gkwsiAeMw== 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 4WrfRc5SB7zyTP; Sat, 24 Aug 2024 14:27:56 +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 47OERuiC084995; Sat, 24 Aug 2024 14:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47OERuZf084992; Sat, 24 Aug 2024 14:27:56 GMT (envelope-from git) Date: Sat, 24 Aug 2024 14:27:56 GMT Message-Id: <202408241427.47OERuZf084992@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: 9e6023ac0e0d - main - emulators/ares: update 139.20240809 =?utf-8?Q?=E2=86=92?= 139.20240823 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: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e6023ac0e0df4813dabe10f49023cb6343f0289 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=9e6023ac0e0df4813dabe10f49023cb6343f0289 commit 9e6023ac0e0df4813dabe10f49023cb6343f0289 Author: Stefan Schlosser AuthorDate: 2024-08-24 14:21:38 +0000 Commit: Vladimir Druzenko CommitDate: 2024-08-24 14:27:00 +0000 emulators/ares: update 139.20240809 → 139.20240823 The most notable change to the port is my inclusion of an inofficial patch to control the behaviour of hotkey execution in the emulator. This patch is behind the HOTKEYS option, disabled by default. This patch won't be accepted upstream with its current scope. Currently hotkeys share the binding space with regular game inputs. This can be problematic for gamepad-only users who want to bind some hotkey functions (screenshots, save state, load state, quit emulator, etc...) to gamepad buttons but who don't have enough unassigned buttons left on the gamepad. The patch prevents the execution of hotkey actions unless the emulator is paused. This way users can assign many hotkey actions to gamepad buttons and access them with pausing the emulator. Commit changes: https://github.com/ares-emulator/ares/compare/a76847d..3cd82c8 Port changes: * add HOTKEYS option, disabled by default * remove upstreamed 'unbreak i386 build' patch * use SUB_LIST to update recommended librashader version in pkg-message * replace 'doas' with 'su' in pkg-message - 'doas' is not in base PR: 281023 --- emulators/ares/Makefile | 12 ++++++---- emulators/ares/distinfo | 6 ++--- emulators/ares/files/extra-patch-hotkeys | 35 +++++++++++++++++++++++++++++ emulators/ares/files/patch-nall_GNUmakefile | 11 +-------- emulators/ares/files/pkg-message.in | 21 ++++++++++------- 5 files changed, 60 insertions(+), 25 deletions(-) diff --git a/emulators/ares/Makefile b/emulators/ares/Makefile index a3c37e28d0a8..869f4ec3bd15 100644 --- a/emulators/ares/Makefile +++ b/emulators/ares/Makefile @@ -1,6 +1,5 @@ PORTNAME= ares -DISTVERSION= 139.20240809 -PORTREVISION= 1 +DISTVERSION= 139.20240823 CATEGORIES= emulators MAINTAINER= bsdcode@disroot.org @@ -14,7 +13,7 @@ USES= compiler:c++17-lang gmake gnome localbase:ldflags pkgconfig \ xorg USE_GITHUB= yes GH_ACCOUNT= ares-emulator -GH_TAGNAME= a76847d +GH_TAGNAME= 3cd82c8 USE_GNOME= gtksourceview3 USE_XORG= x11 xext xrandr @@ -31,8 +30,9 @@ MAKE_ARGS= compiler=${CC} \ threaded=true SUB_FILES= pkg-message +SUB_LIST= LIBRASHADER=${_LIBRASHADER} -OPTIONS_DEFINE= DEBUG DOCS NVIDIA OPENMP SHADER +OPTIONS_DEFINE= DEBUG DOCS HOTKEYS NVIDIA OPENMP SHADER OPTIONS_DEFAULT= A26 ALSA AO CV FC GB GBA GLX MD MS MSX MYVISION N64 NG \ NGP OPENAL OPENMP OSS PCE PERFORMANCE PS1 SDLAUDIO \ SDLINPUT SFC SG SHADER SPEC UDEV UHID WS XLIB XVIDEO @@ -51,6 +51,7 @@ CV_DESC= ColecoVision FC_DESC= NES / Famicom GBA_DESC= Game Boy Advance GB_DESC= Game Boy +HOTKEYS_DESC= Inofficial hotkeys locking patch MD_DESC= Mega Drive / Genesis MSX_DESC= MSX MS_DESC= Master System / Mark III @@ -100,6 +101,8 @@ GLX_USES= gl GLX_USE= GL=gl GLX_MAKE_ARGS= ruby+=video.glx +HOTKEYS_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-hotkeys + MD_MAKE_ARGS= cores+=md MSX_MAKE_ARGS= cores+=msx @@ -173,6 +176,7 @@ XLIB_MAKE_ARGS= ruby+=input.xlib XVIDEO_USE= XORG=xv XVIDEO_MAKE_ARGS= ruby+=video.xvideo +_LIBRASHADER= 0.3.3 _SHADERS= share/libretro/shaders/shaders_slang .include diff --git a/emulators/ares/distinfo b/emulators/ares/distinfo index f761049b436c..74c15f75fd96 100644 --- a/emulators/ares/distinfo +++ b/emulators/ares/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1723230097 -SHA256 (ares-emulator-ares-139.20240809-a76847d_GH0.tar.gz) = e1a47c0b8d55214ae4980c7d8248f8024e70b04cfcf7b21cd6a0f0dcd1e3e9b2 -SIZE (ares-emulator-ares-139.20240809-a76847d_GH0.tar.gz) = 50955748 +TIMESTAMP = 1724488423 +SHA256 (ares-emulator-ares-139.20240823-3cd82c8_GH0.tar.gz) = ac559920cb8d54e94b37fcdae3d65343c62bd9d6fb658e97dfbb6ec5304498ff +SIZE (ares-emulator-ares-139.20240823-3cd82c8_GH0.tar.gz) = 50955635 diff --git a/emulators/ares/files/extra-patch-hotkeys b/emulators/ares/files/extra-patch-hotkeys new file mode 100644 index 000000000000..c97e5d0471f4 --- /dev/null +++ b/emulators/ares/files/extra-patch-hotkeys @@ -0,0 +1,35 @@ +--- desktop-ui/input/hotkeys.cpp.orig 2024-08-16 07:21:59 UTC ++++ desktop-ui/input/hotkeys.cpp +@@ -106,7 +106,9 @@ auto InputManager::createHotkeys() -> void { + program.showMessage({"Selected state slot ", program.state.slot}); + })); + +- hotkeys.append(InputHotkey("Pause Emulation").onPress([&] { ++ InputHotkey pause("Pause Emulation"); ++ pause.isPause = true; ++ hotkeys.append(pause.onPress([&] { + if(!emulator) return; + program.pause(!program.paused); + })); +@@ -149,6 +151,9 @@ auto InputManager::pollHotkeys() -> void { + } + + for(auto& hotkey : hotkeys) { ++ if(emulator && !hotkey.isPause && !program.paused) { ++ continue; ++ } + auto state = hotkey.value(); + if(hotkey.state == 0 && state == 1 && hotkey.press) hotkey.press(); + if(hotkey.state == 1 && state == 0 && hotkey.release) hotkey.release(); + +--- desktop-ui/input/input.hpp.orig 2024-08-16 07:21:40 UTC ++++ desktop-ui/input/input.hpp +@@ -73,6 +73,8 @@ struct InputHotkey : InputDigital { + + const string name; + ++ bool isPause = false; ++ + private: + function press; + function release; diff --git a/emulators/ares/files/patch-nall_GNUmakefile b/emulators/ares/files/patch-nall_GNUmakefile index 1d1551df60f3..178b51348abd 100644 --- a/emulators/ares/files/patch-nall_GNUmakefile +++ b/emulators/ares/files/patch-nall_GNUmakefile @@ -1,14 +1,5 @@ ---- nall/GNUmakefile.orig 2024-08-14 12:07:36 UTC +--- nall/GNUmakefile.orig 2024-08-16 16:33:46 UTC +++ nall/GNUmakefile -@@ -102,7 +102,7 @@ else - else - machine_opt := $(if $(findstring clang,$(compiler)),-print-target-triple,-dumpmachine) - machine_str := $(shell $(compiler) $(machine_opt)) -- ifneq ($(filter i686-%,$(machine_str)),) -+ ifneq ($(filter i386-% i486-% i586-% i686-%,$(machine_str)),) - machine := x86 - else ifneq ($(filter amd64-% x86_64-%,$(machine_str)),) - machine := amd64 @@ -169,8 +169,6 @@ ifeq ($(build),debug) lto = false ifeq ($(cl),true) diff --git a/emulators/ares/files/pkg-message.in b/emulators/ares/files/pkg-message.in index bbd2fb81d91a..5c53a71ed905 100644 --- a/emulators/ares/files/pkg-message.in +++ b/emulators/ares/files/pkg-message.in @@ -4,7 +4,7 @@ Users are encouraged to compile the port on their systems with CFLAGS ?= -O3 - CPUTYPE ?= native + CPUTYPE ?= native | ... | x86-64-v3 | ... | skylake | ... WITH_LTO = yes This can improve the performance of demanding cores like the N64. @@ -13,22 +13,27 @@ NVIDIA GPU users with versions >= 535 of the x11/nvidia-driver could encounter crashes or freezes while using the N64 core, see https://github.com/ares-emulator/ares/issues/1547 and https://github.com/Themaister/Granite/issues/133. As a workaround either try to -compile the port with the NVIDIA option set, or disable the NVIDIA shader disk -cache at start with +compile the port with the NVIDIA option set (recommended), or disable the NVIDIA +shader disk cache at startup with $ __GL_SHADER_DISK_CACHE=0 ares +The port provides the HOTKEYS option. This applies an inofficial patch which +locks all hotkey execution in the unpaused state of the emulator. This can be a +convenience for gamepad-only users who want to assign hotkey actions to gamepad +buttons but who don't have enough free unassigned buttons left on the gamepad. + ares uses librashader for its shader support. This library is not available in the FreeBSD ports tree yet, but it is being worked on, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280470. In the meantime users have to compile the library themselves if they want to actually use shaders: - $ doas pkg install rust-nightly - $ fetch https://github.com/SnowflakePowered/librashader/archive/refs/tags/librashader-v0.3.0.tar.gz - $ tar -xf librashader-v0.3.0.tar.gz - $ cd librashader-librashader-v0.3.0 + $ su pkg install rust-nightly + $ fetch https://github.com/SnowflakePowered/librashader/archive/refs/tags/librashader-v%%LIBRASHADER%%.tar.gz + $ tar -xf librashader-v%%LIBRASHADER%%.tar.gz + $ cd librashader-librashader-v%%LIBRASHADER%% $ cargo run -p librashader-build-script -- --profile release - $ doas cp target/release/librashader.so %%LOCALBASE%%/lib + $ su cp target/release/librashader.so %%LOCALBASE%%/lib The port uses the shaders from games/libretro-shaders-slang by default. Users can curate and utilize their own provided collection of shaders by putting them