View | Details | Raw Unified | Return to bug 280527 | Differences between
and this patch

Collapse All | Expand All

(-)b/emulators/Makefile (+1 lines)
Lines 5-10 Link Here
5
    SUBDIR += anese
5
    SUBDIR += anese
6
    SUBDIR += aqemu
6
    SUBDIR += aqemu
7
    SUBDIR += aranym
7
    SUBDIR += aranym
8
    SUBDIR += ares
8
    SUBDIR += atari800
9
    SUBDIR += atari800
9
    SUBDIR += bfe
10
    SUBDIR += bfe
10
    SUBDIR += bochs
11
    SUBDIR += bochs
(-)b/emulators/ares/Makefile (+185 lines)
Added Link Here
1
PORTNAME=	ares
2
DISTVERSION=	139.20240731
3
CATEGORIES=	emulators
4
5
MAINTAINER=	bsdcode@disroot.org
6
COMMENT=	Multi-system emulator
7
WWW=		https://github.com/ares-emulator/ares
8
9
LICENSE=	ISCL
10
LICENSE_FILE=	${WRKSRC}/LICENSE
11
12
LIB_DEPENDS=	librashader.so:devel/librashader
13
14
FLAVORS=	gtk3 qt5
15
FLAVOR?=	${FLAVORS:[1]}
16
17
gtk3_LIB_DEPENDS=	libcanberra-gtk3.so:audio/libcanberra-gtk3
18
19
qt5_PKGNAMESUFFIX=	-qt5
20
21
USES=		compiler:c11 compiler:c++17-lang gmake pkgconfig xorg
22
USE_GITHUB=	yes
23
GH_ACCOUNT=	ares-emulator
24
GH_TAGNAME=	cac454a
25
.if ${FLAVOR:U} == gtk3
26
USES+=		gnome
27
USE_GNOME=	gtksourceview3
28
.elif ${FLAVOR:U} == qt5
29
USES+=		qt:5
30
USE_QT=		core gui widgets buildtools:build
31
.endif
32
USE_XORG=	x11 xext xrandr
33
34
MAKEFILE=	GNUmakefile
35
MAKE_ARGS=	compiler=${CC} \
36
		cores= \
37
		CPUTYPE=${CPUTYPE} \
38
		librashader=true \
39
		local=false \
40
		prefix=${PREFIX} \
41
		ruby=video.none \
42
		sdl2=false \
43
		threaded=true
44
.if ${FLAVOR:U} == gtk3
45
MAKE_ARGS+=	hiro=gtk3-se
46
.elif ${FLAVOR:U} == qt5
47
MAKE_ARGS+=	hiro=qt5
48
.endif
49
50
CONFLICTS_INSTALL=	ares ares-qt5
51
52
OPTIONS_DEFINE=		DEBUG DOCS LTO OPENMP SHADERS
53
OPTIONS_DEFAULT=	A26 ALSA AO CV FC GB GBA GLX LTO MD MS MSX MYVISION N64 \
54
			NG NGP OPENAL OPENMP OSS PCE PERFORMANCE PS1 SDLAUDIO \
55
			SDLINPUT SFC SG SHADERS SPEC UDEV UHID VULKAN WS XLIB \
56
			XVIDEO
57
OPTIONS_GROUP=		AUDIO CORES INPUT VIDEO
58
OPTIONS_GROUP_AUDIO=	ALSA AO OPENAL OSS PULSEAUDIO SDLAUDIO
59
OPTIONS_GROUP_CORES=	A26 CV FC GB GBA MD MS MSX MYVISION N64 NG NGP PCE PS1 \
60
			SFC SG SPEC WS
61
OPTIONS_GROUP_INPUT=	SDLINPUT UDEV UHID XLIB
62
OPTIONS_GROUP_VIDEO=	GLX VULKAN XVIDEO
63
OPTIONS_SINGLE=		PROFILE
64
OPTIONS_SINGLE_PROFILE=	ACCURACY PERFORMANCE
65
.if ${FLAVOR:U} == qt5
66
OPTIONS_EXCLUDE=	LTO # https://github.com/ares-emulator/ares/issues/1572
67
.endif
68
69
A26_DESC=		Atari 2600
70
ACCURACY_DESC=		Slower but more accurate
71
CV_DESC=		ColecoVision
72
FC_DESC=		NES / Famicom
73
GBA_DESC=		Game Boy Advance
74
GB_DESC=		Game Boy
75
MD_DESC=		Mega Drive / Genesis
76
MSX_DESC=		MSX
77
MS_DESC=		Master System / Mark III
78
MYVISION_DESC=		My Vision
79
N64_DESC=		Nintendo 64 (implies ${N64_IMPLIES})
80
NGP_DESC=		Neo Geo Pocket
81
NG_DESC=		Neo Geo (AES/MVS)
82
PCE_DESC=		PC-Engine / TurboGrafx
83
PERFORMANCE_DESC=	Faster but less accurate
84
PROFILE_DESC=
85
PS1_DESC=		PlayStation
86
SDLAUDIO_DESC=		${SDL_DESC}
87
SDLINPUT_DESC=		${SDL_DESC}
88
SFC_DESC=		SNES / Super Famicom
89
SG_DESC=		SG-1000
90
SHADERS_DESC=		Build and/or install shaders
91
SPEC_DESC=		ZX Spectrum
92
UDEV_DESC=		UDEV input support
93
UHID_DESC=		UHID input support
94
VIDEO_DESC=
95
VULKAN_DESC=		Vulkan rendering support (used by ${_VULKAN_USED})
96
WS_DESC=		WonderSwan
97
XLIB_DESC=		XLIB input support
98
99
A26_MAKE_ARGS=		cores+=a26
100
ACCURACY_MAKE_ARGS=	profile=accuracy
101
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
102
ALSA_MAKE_ARGS=		ruby+=audio.alsa
103
AO_LIB_DEPENDS=		libao.so:audio/libao
104
AO_MAKE_ARGS=		ruby+=audio.ao
105
CV_MAKE_ARGS=		cores+=cv
106
DEBUG_MAKE_ARGS=	build=debug
107
DEBUG_MAKE_ARGS_OFF=	build=optimized
108
FC_MAKE_ARGS=		cores+=fc
109
GBA_MAKE_ARGS=		cores+=gba
110
GB_MAKE_ARGS=		cores+=gb
111
GLX_USES=		gl
112
GLX_USE=		GL=egl
113
GLX_MAKE_ARGS=		ruby+=video.glx
114
LTO_MAKE_ARGS=		lto=true
115
LTO_MAKE_ARGS_OFF=	lto=false
116
MD_MAKE_ARGS=		cores+=md
117
MSX_MAKE_ARGS=		cores+=msx
118
MS_MAKE_ARGS=		cores+=ms
119
MYVISION_MAKE_ARGS=	cores+=myvision
120
N64_IMPLIES=		VULKAN
121
N64_MAKE_ARGS=		cores+=n64
122
N64_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-ares_n64_vulkan_parallel-rdp_util_timer.cpp
123
NGP_MAKE_ARGS=		cores+=ngp
124
NG_MAKE_ARGS=		cores+=ng
125
OPENAL_USES=		openal
126
OPENAL_MAKE_ARGS=	ruby+=audio.openal
127
OPENMP_MAKE_ARGS=	openmp=true
128
OPENMP_MAKE_ARGS_OFF=	openmp=false
129
OSS_MAKE_ARGS=		ruby+=audio.oss
130
PCE_MAKE_ARGS=		cores+=pce
131
PERFORMANCE_MAKE_ARGS=	profile=performance
132
PS1_MAKE_ARGS=		cores+=ps1
133
PULSEAUDIO_LIB_DEPENDS=	libpulse-simple.so:audio/pulseaudio \
134
			libpulse.so:audio/pulseaudio
135
PULSEAUDIO_MAKE_ARGS=	ruby+=audio.pulseaudio \
136
			ruby+=audio.pulseaudiosimple
137
SDLAUDIO_USES=		sdl
138
SDLAUDIO_USE=		SDL=sdl2
139
SDLAUDIO_MAKE_ARGS=	ruby+=audio.sdl \
140
			sdl2=true
141
SDLINPUT_USES=		sdl
142
SDLINPUT_USE=		SDL=sdl2
143
SDLINPUT_MAKE_ARGS=	ruby+=input.sdl \
144
			sdl2=true
145
SFC_MAKE_ARGS=		cores+=sfc
146
SG_MAKE_ARGS=		cores+=sg
147
SHADERS_RUN_DEPENDS=	${LOCALBASE}/${_SHADERS_DIR}/bilinear.slangp:games/libretro-shaders-slang
148
SHADERS_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-desktop-ui_desktop-ui.cpp
149
SPEC_MAKE_ARGS=		cores+=spec
150
UDEV_LIB_DEPENDS=	libudev.so:devel/libudev-devd
151
UDEV_MAKE_ARGS=		ruby+=input.udev
152
UHID_MAKE_ARGS=		ruby+=input.uhid
153
VULKAN_RUN_DEPENDS=	${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader
154
VULKAN_MAKE_ARGS=	vulkan=true
155
VULKAN_MAKE_ARGS_OFF=	vulkan=false
156
WS_MAKE_ARGS=		cores+=ws
157
XLIB_MAKE_ARGS=		ruby+=input.xlib
158
XVIDEO_USE=		XORG=xv
159
XVIDEO_MAKE_ARGS=	ruby+=video.xvideo
160
161
_SHADERS_DIR=	share/libretro/shaders/shaders_slang
162
_VULKAN_USED=	N64
163
164
post-patch-SHADERS-on:
165
	${REINPLACE_CMD} -e 's|@@SHADERS@@|${PREFIX}/${_SHADERS_DIR}/|g' \
166
		${WRKSRC}/desktop-ui/desktop-ui.cpp
167
168
do-install:
169
	${INSTALL_PROGRAM} ${WRKSRC}/desktop-ui/out/ares \
170
		${STAGEDIR}${PREFIX}/bin
171
	${INSTALL_DATA} ${WRKSRC}/desktop-ui/resource/ares.desktop \
172
		${STAGEDIR}${PREFIX}/share/applications
173
	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps
174
	${INSTALL_DATA} ${WRKSRC}/desktop-ui/resource/ares.png \
175
		${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps
176
	${MKDIR} ${STAGEDIR}${DATADIR}/Database
177
	cd ${WRKSRC}/mia/Database && \
178
		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/Database
179
180
post-install-DOCS-on:
181
	${MKDIR} ${STAGEDIR}${DOCSDIR}
182
	${INSTALL_DATA} ${WRKSRC}/README.md \
183
		${STAGEDIR}${DOCSDIR}
184
185
.include <bsd.port.mk>
(-)b/emulators/ares/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1722435662
2
SHA256 (ares-emulator-ares-139.20240731-cac454a_GH0.tar.gz) = d638bd8d9b6f7de8d53a7438b6a375379237a3b7a80fe61be52ba66c002b76c5
3
SIZE (ares-emulator-ares-139.20240731-cac454a_GH0.tar.gz) = 50953186
(-)b/emulators/ares/files/extra-patch-ares_n64_vulkan_parallel-rdp_util_timer.cpp (+13 lines)
Added Link Here
1
https://github.com/Themaister/Granite/pull/135
2
3
--- ares/n64/vulkan/parallel-rdp/util/timer.cpp.orig	2024-07-28 10:49:58 UTC
4
+++ ares/n64/vulkan/parallel-rdp/util/timer.cpp
5
@@ -107,7 +107,7 @@ int64_t get_current_time_nsecs()
6
 	return int64_t(double(li.QuadPart) * static_qpc_freq.inv_freq);
7
 #else
8
 	struct timespec ts = {};
9
-#ifdef ANDROID
10
+#if defined(ANDROID) || defined(__FreeBSD__)
11
 	constexpr auto timebase = CLOCK_MONOTONIC;
12
 #else
13
 	constexpr auto timebase = CLOCK_MONOTONIC_RAW;
(-)b/emulators/ares/files/extra-patch-desktop-ui_desktop-ui.cpp (+15 lines)
Added Link Here
1
--- desktop-ui/desktop-ui.cpp.orig	2024-07-28 14:18:09 UTC
2
+++ desktop-ui/desktop-ui.cpp
3
@@ -22,6 +22,12 @@ auto locate(const string& name) -> string {
4
   location = {Path::sharedData(), "ares/", name};
5
   if(inode::exists(location)) return location;
6
 
7
+  // 3a. The thirdparty shaders directory
8
+  if(name == "Shaders/") {
9
+    location = "@@SHADERS@@";
10
+    if(inode::exists(location)) return location;
11
+  }
12
+
13
   // 4. The application bundle resource directory (macOS only)
14
 #if defined(PLATFORM_MACOS)
15
   location = {Path::resources(), name};
(-)b/emulators/ares/files/patch-desktop-ui_GNUmakefile (+22 lines)
Added Link Here
1
--- desktop-ui/GNUmakefile.orig	2024-07-30 10:16:19 UTC
2
+++ desktop-ui/GNUmakefile
3
@@ -7,7 +7,8 @@ librashader	:= true
4
 local := true
5
 lto := true
6
 librashader	:= true
7
-flags += -I. -I.. -I../ares -I../thirdparty -I../thirdparty/librashader/include -DMIA_LIBRARY
8
+flags += -I. -I.. -I../ares -I../thirdparty -DLIBRA_RUNTIME_OPENGL -DMIA_LIBRARY
9
+flags += ${CFLAGS}
10
 
11
 nall.path := ../nall
12
 include $(nall.path)/GNUmakefile
13
@@ -16,9 +17,6 @@ ifneq ($(filter $(arch),x86 amd64),)
14
   ifeq ($(filter cl,$(compiler)),)
15
     ifeq ($(local),true)
16
       flags += -march=native
17
-    else
18
-      # For official builds, default to x86-64-v2 (Intel Nehalem, AMD Bulldozer) which supports up to SSE 4.2.
19
-      flags += -march=x86-64-v2
20
     endif
21
   endif
22
 endif
(-)b/emulators/ares/files/patch-nall_GNUmakefile (+11 lines)
Added Link Here
1
--- nall/GNUmakefile.orig	2024-07-30 14:21:23 UTC
2
+++ nall/GNUmakefile
3
@@ -182,8 +182,6 @@ else ifeq ($(build),optimized)
4
 else ifeq ($(build),optimized)
5
   ifeq ($(cl),true)
6
     flags += -O2
7
-  else
8
-    flags += -O3
9
   endif
10
   flags += -DBUILD_OPTIMIZED
11
 else
(-)b/emulators/ares/files/patch-ruby_video_opengl_opengl.hpp (+11 lines)
Added Link Here
1
--- ruby/video/opengl/opengl.hpp.orig	2024-07-28 21:40:16 UTC
2
+++ ruby/video/opengl/opengl.hpp
3
@@ -18,7 +18,7 @@
4
 
5
 #include "bind.hpp"
6
 #include "utility.hpp"
7
-#include "librashader_ld.h"
8
+#include <librashader/librashader_ld.h>
9
 
10
 struct OpenGL;
11
 
(-)b/emulators/ares/pkg-descr (+20 lines)
Added Link Here
1
ares is an open-source multi-system emulator with a focus on accuracy and
2
preservation. It is a descendant of the emulators higan and bsnes. It's source
3
code is structured to be maximally readable and self-documenting.
4
5
ares supports the following systems: Arcade, WonderSwan, WonderSwan Color,
6
Pocket Challenge V2, ColecoVision, PC-Engine / TurboGrafx, SuperGrafx, My
7
Vision, NES / Famicom, Famicom Disk System, SNES / Super Famicom, Satellaview,
8
Sufami Turbo, Nintendo 64, Nintendo 64DD, Game Boy, Game Boy Color, Game Boy
9
Advance, SG-1000, Master System / Mark III, Mega Drive / Genesis, Mega CD, 32X,
10
Game Gear, Neo Geo Pocket, Neo Geo Pocket Color
11
12
ares has experimental support for the following systems: Atari 2600, MSX, MSX2,
13
PC-Engine CD / TurboGrafx CD, ZX Spectrum, Neo Geo (AES/MVS), PlayStation
14
15
ares has all the features one would expect from a great emulator system: native
16
multi-platform UI, dynamic rate control, save states, run-ahead, rewind and
17
fast-forward, pixel shaders, color correction, input multi-mapping, debugger
18
19
ares uses librashader for it's pixel shader engine. This means it is highly
20
compatible with existing slang shaders, e.g. the slang-shaders from libretro.
(-)b/emulators/ares/pkg-message (+39 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
Users are encouraged to compile the port on their systems with
5
6
    CFLAGS  ?= -O3
7
    CPUTYPE ?= native
8
9
This can improve the performance of demanding cores like the N64.
10
11
Because of an unsolved problem the QT5 flavor of the port currently disables
12
Link-Time Optimization (LTO), see
13
14
    https://github.com/ares-emulator/ares/issues/1572
15
16
Users can switch to the GTK3 flavor, which has LTO enabled by default, if they
17
need the performance boost.
18
19
Users with the proprietary x11/nvidia-driver for their NVIDIA GPUs could
20
experience crashes or freezes while using the N64 core, see
21
22
    https://github.com/ares-emulator/ares/issues/1547
23
24
Disable the NVIDIA shader disk cache as a workaround:
25
26
    $ __GL_SHADER_DISK_CACHE=0 ares
27
28
The port uses the shaders from games/libretro-shaders-slang by default. Users
29
can curate and utilize their own provided collection of shaders by putting them
30
into the user data directory
31
32
    ${HOME}/.local/share/ares/Shaders/
33
34
ares won't process its own installed shaders if it finds any shaders in the user
35
data directory. Delete or rename the local shaders directory in order to make
36
ares use its own shaders again.
37
EOM
38
}
39
]
(-)b/emulators/ares/pkg-plist (-1 / +13 lines)
Added Link Here
0
- 
1
bin/ares
2
share/applications/ares.desktop
3
%%DATADIR%%/Database/Arcade.bml
4
%%DATADIR%%/Database/BS Memory.bml
5
%%DATADIR%%/Database/Famicom.bml
6
%%DATADIR%%/Database/MSX.bml
7
%%DATADIR%%/Database/MSX2.bml
8
%%DATADIR%%/Database/Neo Geo.bml
9
%%DATADIR%%/Database/Sufami Turbo.bml
10
%%DATADIR%%/Database/Super Famicom Boards.bml
11
%%DATADIR%%/Database/Super Famicom.bml
12
%%PORTDOCS%%%%DOCSDIR%%/README.md
13
share/icons/hicolor/256x256/apps/ares.png

Return to bug 280527