diff --git a/emulators/ares/Makefile b/emulators/ares/Makefile index 869f4ec3bd15..0f3c9edd7c7a 100644 --- a/emulators/ares/Makefile +++ b/emulators/ares/Makefile @@ -1,209 +1,216 @@ PORTNAME= ares -DISTVERSION= 139.20240823 +DISTVERSION= 139.20240825 CATEGORIES= emulators MAINTAINER= bsdcode@disroot.org COMMENT= Multi-system emulator WWW= https://ares-emu.net LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE USES= compiler:c++17-lang gmake gnome localbase:ldflags pkgconfig \ xorg USE_GITHUB= yes GH_ACCOUNT= ares-emulator -GH_TAGNAME= 3cd82c8 +GH_TAGNAME= efb7f61 USE_GNOME= gtksourceview3 USE_XORG= x11 xext xrandr MAKEFILE= GNUmakefile MAKE_ARGS= compiler=${CC} \ cores= \ hiro=gtk3-se \ local=false \ lto=false \ prefix=${PREFIX} \ ruby=video.none \ sdl2=false \ symbols=false \ threaded=true -SUB_FILES= pkg-message -SUB_LIST= LIBRASHADER=${_LIBRASHADER} - 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 OPTIONS_GROUP= AUDIO CORES INPUT VIDEO OPTIONS_GROUP_AUDIO= ALSA AO OPENAL OSS PULSEAUDIO SDLAUDIO OPTIONS_GROUP_CORES= A26 CV FC GB GBA MD MS MSX MYVISION N64 NG NGP PCE PS1 \ SFC SG SPEC WS OPTIONS_GROUP_INPUT= SDLINPUT UDEV UHID XLIB OPTIONS_GROUP_VIDEO= GLX XVIDEO OPTIONS_SINGLE= PROFILE OPTIONS_SINGLE_PROFILE= ACCURACY PERFORMANCE A26_DESC= Atari 2600 ACCURACY_DESC= Slower but more accurate 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 MYVISION_DESC= My Vision N64_DESC= Nintendo 64 NGP_DESC= Neo Geo Pocket NG_DESC= Neo Geo (AES/MVS) NVIDIA_DESC= Apply shader cache workaround (implies ${NVIDIA_IMPLIES}) PCE_DESC= PC-Engine / TurboGrafx PERFORMANCE_DESC= Faster but less accurate PROFILE_DESC= PS1_DESC= PlayStation SDLAUDIO_DESC= ${SDL_DESC} SDLINPUT_DESC= ${SDL_DESC} SFC_DESC= SNES / Super Famicom SG_DESC= SG-1000 SHADER_DESC= Build with shader support SPEC_DESC= ZX Spectrum UDEV_DESC= UDEV input support UHID_DESC= UHID input support VIDEO_DESC= WS_DESC= WonderSwan XLIB_DESC= XLIB input support A26_MAKE_ARGS= cores+=a26 ACCURACY_MAKE_ARGS= profile=accuracy ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_MAKE_ARGS= ruby+=audio.alsa AO_LIB_DEPENDS= libao.so:audio/libao AO_MAKE_ARGS= ruby+=audio.ao CV_MAKE_ARGS= cores+=cv DEBUG_MAKE_ARGS= build=debug DEBUG_MAKE_ARGS_OFF= build=release FC_MAKE_ARGS= cores+=fc GBA_MAKE_ARGS= cores+=gba GB_MAKE_ARGS= cores+=gb 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 MS_MAKE_ARGS= cores+=ms MYVISION_MAKE_ARGS= cores+=myvision N64_RUN_DEPENDS= ${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader N64_MAKE_ARGS= cores+=n64 \ vulkan=true N64_MAKE_ARGS_OFF= vulkan=false N64_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ares_n64_vulkan_parallel-rdp_util_timer.cpp NGP_MAKE_ARGS= cores+=ngp NG_MAKE_ARGS= cores+=ng NVIDIA_IMPLIES= N64 NVIDIA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ares_n64_vulkan_parallel-rdp_vulkan_device.cpp OPENAL_USES= openal OPENAL_MAKE_ARGS= ruby+=audio.openal OPENMP_MAKE_ARGS= openmp=true OPENMP_MAKE_ARGS_OFF= openmp=false OSS_MAKE_ARGS= ruby+=audio.oss PCE_MAKE_ARGS= cores+=pce PERFORMANCE_MAKE_ARGS= profile=performance PS1_MAKE_ARGS= cores+=ps1 PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio \ libpulse.so:audio/pulseaudio PULSEAUDIO_MAKE_ARGS= ruby+=audio.pulseaudio \ ruby+=audio.pulseaudiosimple SDLAUDIO_USES= sdl SDLAUDIO_USE= SDL=sdl2 SDLAUDIO_MAKE_ARGS= ruby+=audio.sdl \ sdl2=true SDLINPUT_USES= sdl SDLINPUT_USE= SDL=sdl2 SDLINPUT_MAKE_ARGS= ruby+=input.sdl \ sdl2=true SFC_MAKE_ARGS= cores+=sfc SG_MAKE_ARGS= cores+=sg -SHADER_RUN_DEPENDS= ${LOCALBASE}/${_SHADERS}/bilinear.slangp:games/libretro-shaders-slang +SHADER_BUILD_DEPENDS= ${LOCALBASE}/include/librashader/librashader.h:devel/librashader +SHADER_RUN_DEPENDS= ${LOCALBASE}/${_SHADERS}/bilinear.slangp:games/libretro-shaders-slang \ + ${LOCALBASE}/lib/librashader.so:devel/librashader SHADER_MAKE_ARGS= librashader=true SHADER_MAKE_ARGS_OFF= librashader=false +SHADER_CFLAGS= -DLIBRA_RUNTIME_OPENGL SHADER_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-desktop-ui_desktop-ui.cpp SPEC_MAKE_ARGS= cores+=spec UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd UDEV_MAKE_ARGS= ruby+=input.udev UHID_MAKE_ARGS= ruby+=input.uhid WS_MAKE_ARGS= cores+=ws 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 .if ${PORT_OPTIONS:MOPENAL} && ${ARCH} == "i386" LLD_UNSAFE= yes .endif +post-patch: + ${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ + ${WRKSRC}/hiro/GNUmakefile + post-patch-SHADER-on: + ${REINPLACE_CMD} 's|-I../thirdparty/librashader/include||g' \ + ${WRKSRC}/desktop-ui/GNUmakefile + ${REINPLACE_CMD} 's|"librashader_ld.h"||g' \ + ${WRKSRC}/ruby/video/opengl/opengl.hpp ${REINPLACE_CMD} 's|@@SHADERS@@|${LOCALBASE}/${_SHADERS}/|g' \ ${WRKSRC}/desktop-ui/desktop-ui.cpp do-install: ${INSTALL_PROGRAM} ${WRKSRC}/desktop-ui/out/ares \ ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/desktop-ui/resource/ares.desktop \ ${STAGEDIR}${PREFIX}/share/applications ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps ${INSTALL_DATA} ${WRKSRC}/desktop-ui/resource/ares.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps ${MKDIR} ${STAGEDIR}${DATADIR}/Database (cd ${WRKSRC}/mia/Database && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/Database) post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md \ ${STAGEDIR}${DOCSDIR} .include diff --git a/emulators/ares/distinfo b/emulators/ares/distinfo index 74c15f75fd96..3ad7898531d2 100644 --- a/emulators/ares/distinfo +++ b/emulators/ares/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1724488423 -SHA256 (ares-emulator-ares-139.20240823-3cd82c8_GH0.tar.gz) = ac559920cb8d54e94b37fcdae3d65343c62bd9d6fb658e97dfbb6ec5304498ff -SIZE (ares-emulator-ares-139.20240823-3cd82c8_GH0.tar.gz) = 50955635 +TIMESTAMP = 1724663853 +SHA256 (ares-emulator-ares-139.20240825-efb7f61_GH0.tar.gz) = 8d4a410b9141399ec0d592edc34ca8dd35d582a87cae3f4ec5fdacc8a1c3c64e +SIZE (ares-emulator-ares-139.20240825-efb7f61_GH0.tar.gz) = 50956365 diff --git a/emulators/ares/files/patch-hiro_GNUmakefile b/emulators/ares/files/patch-hiro_GNUmakefile deleted file mode 100644 index c3f6b4fe5a2d..000000000000 --- a/emulators/ares/files/patch-hiro_GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ ---- hiro/GNUmakefile.orig 2024-08-14 11:19:20 UTC -+++ hiro/GNUmakefile -@@ -62,7 +62,7 @@ ifneq ($(filter $(platform),linux bsd),) - else ifeq ($(hiro),gtk3-se) - flags += -DHiro_SourceEdit - hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell $(pkg_config) --cflags gtk+-3.0 gtksourceview-3.0) -Wno-deprecated-declarations -- hiro.options = -L/usr/local/lib -lX11 $(shell $(pkg_config) --libs gtk+-3.0 gtksourceview-3.0) -+ hiro.options = -lX11 $(shell $(pkg_config) --libs gtk+-3.0 gtksourceview-3.0) - else ifeq ($(hiro),qt4) - moc = /usr/local/lib/qt4/bin/moc - hiro.flags = $(flags.cpp) -DHIRO_QT=4 $(shell $(pkg_config) --cflags QtCore QtGui) diff --git a/emulators/ares/files/pkg-message.in b/emulators/ares/pkg-message similarity index 67% rename from emulators/ares/files/pkg-message.in rename to emulators/ares/pkg-message index 70eef70b8788..839b14b86e30 100644 --- a/emulators/ares/files/pkg-message.in +++ b/emulators/ares/pkg-message @@ -1,49 +1,37 @@ [ { type: install message: <= 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 (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: - - $ su root -c '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 - $ su root -c '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 into the user data directory ${HOME}/.local/share/ares/Shaders/ ares won't process its own installed shaders if it finds any shaders in the user data directory. Delete or rename the local shaders directory in order to make ares use its own shaders again. EOM } ]