diff --git a/emulators/ares/Makefile b/emulators/ares/Makefile index d2e59fa9646a..0ce6c3aaf5c9 100644 --- a/emulators/ares/Makefile +++ b/emulators/ares/Makefile @@ -1,178 +1,202 @@ PORTNAME= ares DISTVERSIONPREFIX= v -DISTVERSION= 145 -PORTREVISION= 1 +DISTVERSION= 146 CATEGORIES= emulators MASTER_SITES= https://github.com/${PORTNAME}-emulator/${PORTNAME}/releases/download/${DISTVERSIONFULL}/ DISTNAME= ${PORTNAME}-source +DIST_SUBDIR= ${PORTNAME}-${DISTVERSION} MAINTAINER= bsdcode@disroot.org COMMENT= Multi-system emulator WWW= https://ares-emu.net LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= librashader>0:devel/librashader USES= cmake compiler:c++17-lang gl gnome pkgconfig xorg USE_GL= opengl USE_GNOME= gtk30 USE_XORG= x11 xext xrandr xrender CMAKE_ARGS= -DARES_CORES="${_CORES:S/ /;/gW}" \ -DENABLE_CCACHE=${CCACHE_ENABLED} CMAKE_ON= ARES_BUILD_OFFICIAL \ ARES_SKIP_DEPS \ ARES_UNITY_CORES CMAKE_OFF= ARES_BUILD_LOCAL \ ARES_BUNDLE_SHADERS \ ARES_ENABLE_MINIMUM_CPU -EXTRACT_AFTER_ARGS= --exclude thirdparty/librashader \ +EXTRACT_AFTER_ARGS= --exclude thirdparty/GL \ + --exclude thirdparty/KHR \ + --exclude thirdparty/libchdr \ + --exclude thirdparty/librashader \ + --exclude thirdparty/sse2neon.h \ + --exclude thirdparty/xxhash.h \ --no-same-owner --no-same-permissions -WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} +NO_WRKSUBDIR= yes OPTIONS_DEFINE= CHD SDL TOOLS OPTIONS_DEFAULT= A26 ALSA AO CHD CV FC GB GBA LIBRASHADER \ LIBRETRO LTO MD MS MSX MYVISION N64 NG NGP \ OPENAL OPTIMIZED_CFLAGS OSS PCE PS1 SDL SFC SG \ SPEC UDEV USBHID WS OPTIONS_GROUP= AUDIO CORES INPUT OPTIMIZATION SHADER OPTIONS_GROUP_AUDIO= ALSA AO OPENAL OSS PULSEAUDIO OPTIONS_GROUP_CORES= A26 CV FC GB GBA MD MS MSX MYVISION N64 NG NGP \ PCE PS1 SFC SG SPEC WS OPTIONS_GROUP_INPUT= HOTKEYS UDEV USBHID OPTIONS_GROUP_OPTIMIZATION= ACCURACY LTO OPTIMIZED_CFLAGS OPTIONS_GROUP_SHADER= LIBRASHADER LIBRETRO # linking openal fails on i386, LLD_UNSAFE workaround fails with # /usr/local/bin/i386-unknown-freebsd14.1-ld.bfd: /usr/bin/../lib/LLVMgold.so: # error loading plugin: Cannot open "/usr/bin/../lib/LLVMgold.so" # on tools/sourcery target, so exclude OPENAL on i386 OPTIONS_EXCLUDE_i386= OPENAL OPTIONS_SUB= yes A26_DESC= Atari 2600 ACCURACY_DESC= Emulation accuracy over performance CHD_DESC= CHD format support via libchdr CV_DESC= ColecoVision FC_DESC= NES / Famicom GBA_DESC= Game Boy Advance GB_DESC= Game Boy / Game Boy Color HOTKEYS_DESC= Inofficial hotkeys locking patch LIBRASHADER_DESC= Slang-shader support via librashader LIBRETRO_DESC= Install slang-shaders from libretro (implies ${LIBRETRO_IMPLIES}) MD_DESC= Sega Mega Drive / Genesis MSX_DESC= Microsoft MSX MS_DESC= Sega Master System / Mark III MYVISION_DESC= My Vision N64_DESC= Nintendo 64 NGP_DESC= Neo Geo Pocket / Neo Geo Pocket Color NG_DESC= Neo Geo (AES/MVS) PCE_DESC= PC-Engine / TurboGrafx PS1_DESC= PlayStation SFC_DESC= SNES / Super Famicom SG_DESC= Sega SG-1000 SPEC_DESC= ZX Spectrum TOOLS_DESC= Include supplemental tools and tests UDEV_DESC= Input support via UDEV USBHID_DESC= Input support via USBHID WS_DESC= WonderSwan / WonderSwan Color A26_VARS= _CORES+=a26 ACCURACY_CMAKE_BOOL= ARES_PROFILE_ACCURACY ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CMAKE_BOOL= ARES_ENABLE_ALSA AO_LIB_DEPENDS= libao.so:audio/libao AO_CMAKE_BOOL= ARES_ENABLE_AO -CHD_CMAKE_BOOL= ARES_ENABLE_CHD \ - WITH_SYSTEM_ZLIB +CHD_LIB_DEPENDS= libchdr.so:devel/libchdr +CHD_USES= localbase +CHD_CMAKE_BOOL= ARES_ENABLE_CHD CV_VARS= _CORES+=cv FC_VARS= _CORES+=fc GBA_VARS= _CORES+=gba GB_VARS= _CORES+=gb HOTKEYS_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-desktop-ui_input_hotkeys.cpp LIBRASHADER_LIB_DEPENDS= librashader.so:devel/librashader LIBRASHADER_CMAKE_BOOL= ARES_ENABLE_LIBRASHADER LIBRETRO_IMPLIES= LIBRASHADER _LIBRETRO_BR_DEPENDS= libretro-shaders-slang<0:games/libretro-shaders-slang LIBRETRO_BUILD_DEPENDS= ${_LIBRETRO_BR_DEPENDS} LIBRETRO_RUN_DEPENDS= ${_LIBRETRO_BR_DEPENDS} LTO_CMAKE_BOOL= ENABLE_IPO +MD_BUILD_DEPENDS= xxhash>0:devel/xxhash +MD_USES= localbase MD_VARS= _CORES+=md MSX_VARS= _CORES+=msx MS_VARS= _CORES+=ms MYVISION_VARS= _CORES+=myvision _N64_BR_DEPENDS= vulkan-loader>0:graphics/vulkan-loader -N64_BUILD_DEPENDS= ${_N64_BR_DEPENDS} +_N64_BUILD_DEPENDS_aarch64= sse2neon>0:devel/sse2neon +N64_BUILD_DEPENDS= ${_N64_BR_DEPENDS} \ + ${_N64_BUILD_DEPENDS_${ARCH}} \ + xxhash>0:devel/xxhash N64_RUN_DEPENDS= ${_N64_BR_DEPENDS} +N64_USES= localbase N64_VARS= _CORES+=n64 NGP_VARS= _CORES+=ngp NG_VARS= _CORES+=ng OPENAL_USES= openal OPENAL_CMAKE_BOOL= ARES_ENABLE_OPENAL OPTIMIZED_CFLAGS_CFLAGS= -O3 OSS_CMAKE_BOOL= ARES_ENABLE_OSS PCE_VARS= _CORES+=pce PS1_VARS= _CORES+=ps1 PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio \ libpulse.so:audio/pulseaudio PULSEAUDIO_CMAKE_BOOL= ARES_ENABLE_PULSEAUDIO SDL_USES= sdl SDL_USE= SDL=sdl3 SDL_CMAKE_BOOL= ARES_ENABLE_SDL SFC_VARS= _CORES+=sfc SG_VARS= _CORES+=sg SPEC_VARS= _CORES+=spec -# https://github.com/ares-emulator/ares/issues/2090 -TOOLS_IMPLIES= GBA MD NG SFC TOOLS_CMAKE_BOOL= ARES_BUILD_OPTIONAL_TARGETS UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd UDEV_CMAKE_BOOL= ARES_ENABLE_UDEV USBHID_CMAKE_BOOL= ARES_ENABLE_USBHID WS_VARS= _CORES+=ws +.include + +.if ${PORT_OPTIONS:MTOOLS} && (${PORT_OPTIONS:MGBA} || ${PORT_OPTIONS:MSFC}) +PLIST_SUB+= TOOLSARM7TDMI="" +.else +PLIST_SUB+= TOOLSARM7TDMI="@comment " +.endif + +.if ${PORT_OPTIONS:MTOOLS} && (${PORT_OPTIONS:MMD} || ${PORT_OPTIONS:MNG}) +PLIST_SUB+= TOOLSM68000="" +.else +PLIST_SUB+= TOOLSM68000="@comment " +.endif + post-patch: ${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/cmake/finders/* post-install-LIBRETRO-on: ${LN} -s ${LOCALBASE}/share/libretro/shaders/shaders_slang ${STAGEDIR}${DATADIR}/Shaders .include diff --git a/emulators/ares/distinfo b/emulators/ares/distinfo index 6d6b5f6a7b60..5cdf41f6260d 100644 --- a/emulators/ares/distinfo +++ b/emulators/ares/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1752185303 -SHA256 (ares-source.tar.gz) = 7a76acf87cca2903552683347fdf6f1cd06f436fa4e0c247108688785cbbd14b -SIZE (ares-source.tar.gz) = 8967048 +TIMESTAMP = 1756454355 +SHA256 (ares-146/ares-source.tar.gz) = 0f0b878c19ce09dab57584235e9c639c4c14a0bd1de6cef50238f006bd797bf1 +SIZE (ares-146/ares-source.tar.gz) = 9021617 diff --git a/emulators/ares/files/patch-thirdparty_CMakeLists.txt b/emulators/ares/files/patch-thirdparty_CMakeLists.txt new file mode 100644 index 000000000000..0a9b749623bd --- /dev/null +++ b/emulators/ares/files/patch-thirdparty_CMakeLists.txt @@ -0,0 +1,75 @@ +--- thirdparty/CMakeLists.txt.orig 2025-08-27 21:41:50 UTC ++++ thirdparty/CMakeLists.txt +@@ -7,55 +7,9 @@ if(ARES_ENABLE_CHD) + option(ARES_ENABLE_CHD "Enable CHD format support via libchdr" ON) + + if(ARES_ENABLE_CHD) +- # lzma +- add_subdirectory(libchdr/deps/lzma-24.05 EXCLUDE_FROM_ALL) +- list(APPEND CHDR_LIBS lzma) +- list(APPEND CHDR_INCLUDES lzma) +- +- if(OS_MACOS) +- option(WITH_SYSTEM_ZLIB "Use system zlib" ON) +- endif() +- # zlib +- if(WITH_SYSTEM_ZLIB) +- find_package(ZLIB REQUIRED) +- list(APPEND PLATFORM_LIBS ZLIB::ZLIB) +- else() +- option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF) +- add_subdirectory(libchdr/deps/zlib-1.3.1 EXCLUDE_FROM_ALL) +- set_target_properties( +- zlibstatic +- PROPERTIES POSITION_INDEPENDENT_CODE ON FOLDER thirdparty PREFIX "" +- ) +- list(APPEND CHDR_LIBS zlibstatic) +- endif() +- +- # zstd +- option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF) +- option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" OFF) +- add_subdirectory(libchdr/deps/zstd-1.5.6/build/cmake EXCLUDE_FROM_ALL) +- list(APPEND CHDR_LIBS libzstd_static) +- #-------------------------------------------------- +- # chdr +- #-------------------------------------------------- +- +- set( +- CHDR_SOURCES +- libchdr/src/libchdr_bitstream.c +- libchdr/src/libchdr_cdrom.c +- libchdr/src/libchdr_chd.c +- libchdr/src/libchdr_flac.c +- libchdr/src/libchdr_huffman.c +- ) +- +- list(APPEND CHDR_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/libchdr/include) +- +- add_library(chdr-static STATIC ${CHDR_SOURCES}) +- target_include_directories(chdr-static PUBLIC ${CHDR_INCLUDES} PUBLIC libchdr/include) +- target_link_libraries(chdr-static PRIVATE ${CHDR_LIBS} ${PLATFORM_LIBS}) +- target_compile_options( +- chdr-static +- PRIVATE $<$:-Wno-unreachable-code -Wno-unused-function> +- ) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(libchdr REQUIRED IMPORTED_TARGET GLOBAL libchdr) ++ add_library(chdr-static ALIAS PkgConfig::libchdr) + endif() + + add_library( +@@ -111,12 +65,4 @@ set_target_properties(sljit PROPERTIES FOLDER thirdpar + set_target_properties(ymfm PROPERTIES FOLDER thirdparty PREFIX "") + set_target_properties(tzxfile PROPERTIES FOLDER thirdparty PREFIX "") + set_target_properties(sljit PROPERTIES FOLDER thirdparty PREFIX "") +-if(ARES_ENABLE_CHD) +- set_target_properties(chdr-static PROPERTIES FOLDER thirdparty PREFIX "") +- if(NOT WITH_SYSTEM_ZLIB) +- set_target_properties(zlib PROPERTIES FOLDER thirdparty PREFIX "") +- endif() +- set_target_properties(lzma PROPERTIES FOLDER thirdparty PREFIX "") +- set_target_properties(libzstd_static PROPERTIES FOLDER thirdparty PREFIX "") +-endif() + set_target_properties(qon PROPERTIES FOLDER thirdparty PREFIX "") +\ No newline at end of file diff --git a/emulators/ares/pkg-descr b/emulators/ares/pkg-descr index 1d1df5876394..51eba6b65b62 100644 --- a/emulators/ares/pkg-descr +++ b/emulators/ares/pkg-descr @@ -1,20 +1,21 @@ ares is an open-source multi-system emulator with a focus on accuracy and preservation. It is a descendant of the emulators higan and bsnes. It's source code is structured to be maximally readable and self-documenting. ares supports the following systems: Arcade, WonderSwan, WonderSwan Color, -Pocket Challenge V2, ColecoVision, PC-Engine / TurboGrafx, SuperGrafx, My -Vision, NES / Famicom, Famicom Disk System, SNES / Super Famicom, Satellaview, -Sufami Turbo, Nintendo 64, Nintendo 64DD, Game Boy, Game Boy Color, Game Boy -Advance, SG-1000, Master System / Mark III, Mega Drive / Genesis, Mega CD, 32X, -Game Gear, Neo Geo Pocket, Neo Geo Pocket Color +Pocket Challenge V2, ColecoVision, PC-Engine / TurboGrafx, PC-Engine SuperGrafx, +My Vision, NES / Famicom, Famicom Disk System, Game Boy, SNES / Super Famicom, +Satellaview, Nintendo 64, SuFami Turbo, Game Boy Color, Nintendo 64DD, Game Boy +Advance, SG-1000, Master System / Mark III, Mega Drive / Genesis, Game Gear, +Mega CD, 32X, Neo Geo Pocket, Neo Geo Pocket Color ares has experimental support for the following systems: Atari 2600, MSX, MSX2, -PC-Engine CD / TurboGrafx CD, ZX Spectrum, Neo Geo (AES/MVS), PlayStation +PC-Engine CD / TurboGrafx CD, LaserActive, ZX Spectrum, Neo Geo (AES/MVS), +PlayStation ares has all the features one would expect from a great emulator system: native multi-platform UI, dynamic rate control, save states, run-ahead, rewind and fast-forward, pixel shaders, color correction, input multi-mapping, debugger ares uses librashader for its pixel shader engine. This means it is highly compatible with existing slang shaders, e.g. the slang-shaders from libretro. diff --git a/emulators/ares/pkg-plist b/emulators/ares/pkg-plist index 035623ec753e..476ac9756832 100644 --- a/emulators/ares/pkg-plist +++ b/emulators/ares/pkg-plist @@ -1,20 +1,20 @@ bin/ares -%%TOOLS%%bin/arm7tdmi +%%TOOLSARM7TDMI%%bin/arm7tdmi %%TOOLS%%bin/genius %%TOOLS%%bin/i8080 -%%TOOLS%%bin/m68000 +%%TOOLSM68000%%bin/m68000 %%TOOLS%%bin/mame2bml %%TOOLS%%bin/mia bin/sourcery share/applications/ares.desktop %%DATADIR%%/Database/Arcade.bml %%DATADIR%%/Database/BS Memory.bml %%DATADIR%%/Database/Famicom.bml %%DATADIR%%/Database/MSX.bml %%DATADIR%%/Database/MSX2.bml %%DATADIR%%/Database/Neo Geo.bml %%DATADIR%%/Database/Sufami Turbo.bml %%DATADIR%%/Database/Super Famicom Boards.bml %%DATADIR%%/Database/Super Famicom.bml %%LIBRETRO%%%%DATADIR%%/Shaders share/icons/hicolor/256x256/apps/ares.png