View | Details | Raw Unified | Return to bug 280958
Collapse All | Expand All

(-)b/emulators/mednafen/Makefile (-67 / +98 lines)
Lines 1-6 Link Here
1
PORTNAME=	mednafen
1
PORTNAME=	mednafen
2
PORTVERSION=	1.26.1
2
DISTVERSION=	1.32.1
3
PORTREVISION=	3
4
PORTEPOCH=	1
3
PORTEPOCH=	1
5
CATEGORIES=	emulators games
4
CATEGORIES=	emulators games
6
MASTER_SITES=	https://mednafen.github.io/releases/files/
5
MASTER_SITES=	https://mednafen.github.io/releases/files/
Lines 12-86 WWW= https://mednafen.github.io Link Here
12
LICENSE=	GPLv2+
11
LICENSE=	GPLv2+
13
LICENSE_FILE=	${WRKSRC}/COPYING
12
LICENSE_FILE=	${WRKSRC}/COPYING
14
13
15
LIB_DEPENDS=	libcdio.so:sysutils/libcdio \
14
LIB_DEPENDS=	libFLAC.so:audio/flac \
16
		libsndfile.so:audio/libsndfile \
15
		liblzo2.so:archivers/lzo2 \
17
		libvorbis.so:audio/libvorbis
16
		libmpcdec.so:audio/musepack \
17
		libtrio.so:devel/trio \
18
		libvorbisfile.so:audio/libvorbis \
19
		libzstd.so:archivers/zstd
20
21
USES=		autoreconf compiler:c++11-lang gl iconv localbase pkgconfig sdl \
22
		tar:xz
23
USE_GL=		egl
24
USE_SDL=	sdl2
25
26
GNU_CONFIGURE=		yes
27
CONFIGURE_ARGS+=	--with-external-libzstd \
28
			--with-external-lzo \
29
			--with-external-mpcdec \
30
			--with-external-tremor \
31
			--with-external-trio
18
32
19
GNU_CONFIGURE=	yes
20
USE_SDL=	sdl2 net2
21
USE_GL=		gl glu
22
CPPFLAGS+=	-I${LOCALBASE}/include
23
LDFLAGS+=	-L${LOCALBASE}/lib
24
WRKSRC=	${WRKDIR}/${PORTNAME}
25
SUB_FILES=	pkg-message
33
SUB_FILES=	pkg-message
26
34
27
CONFIGURE_ARGS+=--disable-alsa --disable-alsatest \
35
WRKSRC=		${WRKDIR}/${PORTNAME}
28
		--with-sdl-prefix=${LOCALBASE}
29
30
USES=		compiler:c++11-lib cpe gl iconv pkgconfig:build sdl tar:xz
31
CPE_VENDOR=	david_shadoff
32
33
OPTIONS_DEFINE=	NLS DOCS JACK
34
OPTIONS_MULTI=	EMU
35
OPTIONS_MULTI_EMU=	GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB
36
OPTIONS_DEFAULT=	GB GBA LINX MD NES NGP PCE PCFX PSX SMS SWAN VB
37
38
GB_DESC=	build with GameBoy emulation
39
GBA_DESC=	build with GameBoy Advance emulation
40
LINX_DESC=	build with Atari Lynx emulation
41
MD_DESC=	build with Sega Genesis/MegaDrive emulation
42
NES_DESC=	build with Nintendo Entertainment System emulation
43
NGP_DESC=	build with Neo Geo Pocket emulation
44
PCE_DESC=	build with PC Engine (TurboGrafx 16) emulation
45
PCFX_DESC=	build with PC-FX emulation
46
PSX_DESC=	build with Playstation emulation
47
SMS_DESC=	build with SMS+GG emulation
48
SWAN_DESC=	build with WonderSWan emulation
49
VB_DESC=	build with Virtual Boy emulation
50
JACK_DESC=	support the JACK audio API
51
52
OPTIONS_SUB=	yes
53
54
NLS_USES=	gettext
55
NLS_CONFIGURE_ENABLE=nls
56
57
JACK_LIB_DEPENDS=libjack.so:audio/jack
58
JACK_CONFIGURE_ENABLE=jack
59
60
GB_CONFIGURE_ENABLE=gb
61
GBA_CONFIGURE_ENABLE=gba
62
LINX_CONFIGURE_ENABLE=lynx
63
MD_CONFIGURE_ENABLE=md
64
NES_CONFIGURE_ENABLE=nes
65
NGP_CONFIGURE_ENABLE=ngp
66
PCE_CONFIGURE_ENABLE=pce
67
PCFX_CONFIGURE_ENABLE=pcfx
68
PSX_CONFIGURE_ENABLE=psx
69
SMS_CONFIGURE_ENABLE=sms
70
SWAN_CONFIGURE_ENABLE=wswan
71
VB_CONFIGURE_ENABLE=vb
72
73
post-patch:
74
	@${REINPLACE_CMD} -e 's|versionsort|alphasort|g' \
75
		${WRKSRC}/src/drivers/Joystick_Linux.cpp
76
36
77
pre-configure:
37
OPTIONS_DEFINE=		DOCS NLS
78
	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
38
OPTIONS_DEFAULT=	ALSA APPLE2 GP GPA JACK LYNX MD NES NGP PCE PCFX PSX \
79
		-e 's|/usr/X11R6|${LOCALBASE}|g' \
39
			SMS SNES SS VB WSWAN
80
		${WRKSRC}/configure
40
OPTIONS_GROUP=		AUDIO
41
OPTIONS_GROUP_AUDIO=	ALSA JACK
42
OPTIONS_MULTI=		EMU
43
OPTIONS_MULTI_EMU=	APPLE2 GP GPA LYNX MD NES NGP PCE PCFX PSX SMS SNES SS \
44
			VB WSWAN
45
OPTIONS_SUB=		yes
46
47
APPLE2_DESC=	Apple II
48
GPA_DESC=	GameBoy Advance
49
GP_DESC=	GameBoy
50
LYNX_DESC=	Atari Lynx
51
MD_DESC=	Sega Genesis/Megadrive
52
NES_DESC=	Nintendo Entertainment System
53
NGP_DESC=	Neo Geo Pocket
54
PCE_DESC=	PC Engine/TurboGrafx 16
55
PCFX_DESC=	PC-FX
56
PSX_DESC=	Sony PlayStation
57
SMS_DESC=	Sega Game Gear + Sega Master System
58
SNES_DESC=	Super Nintendo Entertainment System/Super Famicom
59
SS_DESC=	Sega Saturn
60
VB_DESC=	Virtual Boy
61
WSWAN_DESC=	WonderSwan
62
63
ALSA_LIB_DEPENDS=		libasound.so:audio/alsa-lib
64
ALSA_CONFIGURE_ENABLE=		alsa
65
ALSA_EXTRA_PATCHES=		${PATCHDIR}/extra-patch-src_drivers_main.cpp
66
67
APPLE2_CONFIGURE_ENABLE=	apple2
68
69
GPA_CONFIGURE_ENABLE=		gba
70
71
GP_CONFIGURE_ENABLE=		gb
72
73
JACK_LIB_DEPENDS=		libjack.so:audio/jack
74
JACK_CONFIGURE_ENABLE=		jack
75
76
LYNX_CONFIGURE_ENABLE=		lynx
77
78
MD_CONFIGURE_ENABLE=		md
79
80
NES_CONFIGURE_ENABLE=		nes
81
82
NGP_CONFIGURE_ENABLE=		ngp
81
83
82
post-install:
84
NLS_USES=			gettext
83
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
85
NLS_CONFIGURE_ENABLE=		nls
84
	@${INSTALL_DATA} ${WRKSRC}/Documentation/mednafen.html ${STAGEDIR}${DOCSDIR}
86
87
PCE_CONFIGURE_ENABLE=		pce pce-fast
88
89
PCFX_CONFIGURE_ENABLE=		pcfx
90
91
PSX_CONFIGURE_ENABLE=		psx
92
93
SMS_CONFIGURE_ENABLE=		sms
94
95
SNES_CONFIGURE_ENABLE=		snes snes-faust
96
97
SS_CONFIGURE_ENABLE=		ss
98
99
VB_CONFIGURE_ENABLE=		vb
100
101
WSWAN_CONFIGURE_ENABLE=		wswan
102
103
pre-configure:
104
	${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \
105
		${WRKSRC}/m4/lib-link.m4 \
106
		${WRKSRC}/m4/lib-prefix.m4
107
108
post-install-DOCS-on:
109
	${MKDIR} ${STAGEDIR}${DOCSDIR}
110
	${INSTALL_DATA} ${WRKSRC}/ChangeLog \
111
		${STAGEDIR}${DOCSDIR}
112
	${INSTALL_DATA} ${WRKSRC}/README \
113
		${STAGEDIR}${DOCSDIR}
114
	(cd ${WRKSRC} && \
115
		${COPYTREE_SHARE} Documentation ${STAGEDIR}${DOCSDIR})
85
116
86
.include <bsd.port.mk>
117
.include <bsd.port.mk>
(-)b/emulators/mednafen/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1606839934
1
TIMESTAMP = 1724063426
2
SHA256 (mednafen-1.26.1.tar.xz) = 842907c25c4292c9ba497c9cb9229c7d10e04e22cb4740d154ab690e6587fdf4
2
SHA256 (mednafen-1.32.1.tar.xz) = de7eb94ab66212ae7758376524368a8ab208234b33796625ca630547dbc83832
3
SIZE (mednafen-1.26.1.tar.xz) = 3319756
3
SIZE (mednafen-1.32.1.tar.xz) = 3571236
(-)b/emulators/mednafen/files/extra-patch-src_drivers_main.cpp (+11 lines)
Added Link Here
1
--- src/drivers/main.cpp.orig	2024-08-20 23:31:51 UTC
2
+++ src/drivers/main.cpp
3
@@ -181,7 +181,7 @@ static const MDFNSetting DriverSettings[] =
4
   { "nothrottle", MDFNSF_NOFLAGS, gettext_noop("Disable speed throttling when sound is disabled."), NULL, MDFNST_BOOL, "0"},
5
   { "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"},
6
   { "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 },
7
-  { "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 },
8
+  { "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 },
9
   { "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" },
10
   { "sound", MDFNSF_NOFLAGS, gettext_noop("Enable sound output."), NULL, MDFNST_BOOL, "1" },
11
   { "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" },
(-)b/emulators/mednafen/files/patch-configure.ac (+26 lines)
Added Link Here
1
--- configure.ac.orig	2024-08-19 17:50:17 UTC
2
+++ configure.ac
3
@@ -238,7 +238,6 @@ SS_EXTRA_FLAGS=""
4
 # Begin ss flags
5
 #
6
 SS_EXTRA_FLAGS=""
7
-AX_APPEND_COMPILE_FLAGS([-mtune=haswell], SS_EXTRA_FLAGS)
8
 AC_SUBST(SS_EXTRA_FLAGS)
9
 #
10
 # End ss flags
11
@@ -626,12 +625,12 @@ if test x$with_external_tremor = xyes; then
12
 	[],
13
 	[with_external_tremor=no])
14
 if test x$with_external_tremor = xyes; then
15
-	AC_CHECK_LIB([vorbisidec], [ov_read], [], AC_MSG_ERROR([*** libvorbisidec not found!]))
16
-	AC_CHECK_HEADER([tremor/ivorbisfile.h], [], AC_MSG_ERROR([*** libvorbisidec not found!]))
17
+	AC_CHECK_LIB([vorbisfile], [ov_read], [], AC_MSG_ERROR([*** libvorbisfile not found!]))
18
+	AC_CHECK_HEADER([vorbis/vorbisfile.h], [], AC_MSG_ERROR([*** libvorbisfile not found!]))
19
 
20
 	AC_DEFINE([HAVE_EXTERNAL_TREMOR], [1], [Define if we are compiling and linking with external tremor.])
21
 	AM_CONDITIONAL(HAVE_EXTERNAL_TREMOR, true)
22
-	AC_SUBST([TREMOR_LIBS], ["-lvorbisidec"])
23
+	AC_SUBST([TREMOR_LIBS], ["-lvorbisfile"])
24
 fi
25
 
26
 #
(-)a/emulators/mednafen/files/patch-src-drivers_Joystick.cpp (-20 lines)
Removed Link Here
1
--- src/drivers/Joystick.cpp	2020-11-10 01:04:17.000000000 -0500
2
+++ src/drivers/Joystick.cpp	2020-12-01 11:34:01.154240000 -0500
3
@@ -32,7 +32,7 @@
4
  #include "Joystick_SDL.h"
5
 #endif
6
 
7
-#ifdef HAVE_LINUX_JOYSTICK
8
+#if defined(HAVE_LINUX_JOYSTICK) && !defined(__FreeBSD__)
9
  #include "Joystick_Linux.h"
10
 #endif
11
 
12
@@ -175,7 +175,7 @@
13
 
14
  try
15
  {
16
-  #ifdef HAVE_LINUX_JOYSTICK
17
+  #if defined(HAVE_LINUX_JOYSTICK) && !defined(__FreeBSD__)
18
   main_driver = JoystickDriver_Linux_New();
19
   #elif defined(WIN32)
20
   {
(-)b/emulators/mednafen/files/patch-src_cdrom_CDAFReader__Vorbis.cpp (+20 lines)
Added Link Here
1
--- src/cdrom/CDAFReader_Vorbis.cpp.orig	2024-04-05 02:27:32 UTC
2
+++ src/cdrom/CDAFReader_Vorbis.cpp
3
@@ -24,7 +24,7 @@
4
 #include "CDAFReader_Vorbis.h"
5
 
6
 #ifdef HAVE_EXTERNAL_TREMOR
7
- #include <tremor/ivorbisfile.h>
8
+ #include <vorbis/vorbisfile.h>
9
 #else
10
  #include <mednafen/tremor/ivorbisfile.h>
11
 #endif
12
@@ -143,7 +143,7 @@ uint64 CDAFReader_Vorbis::Read_(int16 *buffer, uint64 
13
 
14
  while(toread > 0)
15
  {
16
-  long didread = ov_read(&ovfile, (char*)tw_buf, toread, &cursection);
17
+  long didread = ov_read(&ovfile, (char*)tw_buf, toread, 0, 2, 1, &cursection);
18
 
19
   if(didread == 0)
20
    break;
(-)a/emulators/mednafen/files/patch-src_sound_OwlResampler__altivec.inc (-7 lines)
Removed Link Here
1
--- src/sound/OwlResampler_altivec.inc.orig	2024-05-08 15:13:14 UTC
2
+++ src/sound/OwlResampler_altivec.inc
3
@@ -1,3 +1,4 @@
4
+#include <altivec.h>
5
 //
6
 //
7
 //
(-)b/emulators/mednafen/files/pkg-message.in (-4 / +10 lines)
Lines 1-13 Link Here
1
[
1
[
2
{ type: install
2
{ type: install
3
  message: <<EOM
3
  message: <<EOM
4
1) Run mednafen [OPTION] [FILE]
4
The complete documentation is available at:
5
5
6
2) See complete documentation at:
6
    %%DOCSDIR%%/Documentation/mednafen.html
7
7
8
   %%DOCSDIR%%/mednafen.html
8
If you experience crackling or choppy audio when using the OSS audio backend,
9
then Mednafen is probably using an unreasonable small period size with the
10
default value 0 of sound.period_time. In this case retry with an explicit value,
11
the documentation itself suggests 2.666ms or 5.333ms, i.e. set
9
12
10
3) Enjoy it ;)
13
    sound.period_time 2666  or
14
    sound.period_time 5333
15
16
Enjoy it ;)
11
EOM
17
EOM
12
}
18
}
13
]
19
]
(-)b/emulators/mednafen/pkg-plist (-2 / +63 lines)
Lines 1-5 Link Here
1
bin/mednafen
1
bin/mednafen
2
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
3
%%PORTDOCS%%%%DOCSDIR%%/Documentation/apple2.html
4
%%PORTDOCS%%%%DOCSDIR%%/Documentation/apple2.php
5
%%PORTDOCS%%%%DOCSDIR%%/Documentation/bwolf0.png
6
%%PORTDOCS%%%%DOCSDIR%%/Documentation/bwolf1.png
7
%%PORTDOCS%%%%DOCSDIR%%/Documentation/cdplay.html
8
%%PORTDOCS%%%%DOCSDIR%%/Documentation/cdplay.php
9
%%PORTDOCS%%%%DOCSDIR%%/Documentation/cheat.html
10
%%PORTDOCS%%%%DOCSDIR%%/Documentation/cheats.txt
11
%%PORTDOCS%%%%DOCSDIR%%/Documentation/debugger.html
12
%%PORTDOCS%%%%DOCSDIR%%/Documentation/docgen.inc
13
%%PORTDOCS%%%%DOCSDIR%%/Documentation/fname_format.txt
14
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gb.html
15
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gb.php
16
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gba.html
17
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gba.php
18
%%PORTDOCS%%%%DOCSDIR%%/Documentation/generate.sh
19
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gg.html
20
%%PORTDOCS%%%%DOCSDIR%%/Documentation/gg.php
21
%%PORTDOCS%%%%DOCSDIR%%/Documentation/headerbg.png
22
%%PORTDOCS%%%%DOCSDIR%%/Documentation/lynx.html
23
%%PORTDOCS%%%%DOCSDIR%%/Documentation/lynx.php
24
%%PORTDOCS%%%%DOCSDIR%%/Documentation/md.html
25
%%PORTDOCS%%%%DOCSDIR%%/Documentation/md.php
26
%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.css
27
%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.html
28
%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.php
29
%%PORTDOCS%%%%DOCSDIR%%/Documentation/mednafen.png
30
%%PORTDOCS%%%%DOCSDIR%%/Documentation/modules.def
31
%%PORTDOCS%%%%DOCSDIR%%/Documentation/nes.html
32
%%PORTDOCS%%%%DOCSDIR%%/Documentation/nes.php
33
%%PORTDOCS%%%%DOCSDIR%%/Documentation/netplay.html
34
%%PORTDOCS%%%%DOCSDIR%%/Documentation/netplay.php
35
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ngp.html
36
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ngp.php
37
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce.html
38
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce.php
39
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce_fast.html
40
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pce_fast.php
41
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pcfx.html
42
%%PORTDOCS%%%%DOCSDIR%%/Documentation/pcfx.php
43
%%PORTDOCS%%%%DOCSDIR%%/Documentation/psx.html
44
%%PORTDOCS%%%%DOCSDIR%%/Documentation/psx.php
45
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sapphire0.png
46
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sapphire1.png
47
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sasplay.html
48
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sasplay.php
49
%%PORTDOCS%%%%DOCSDIR%%/Documentation/settings.def
50
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sms.html
51
%%PORTDOCS%%%%DOCSDIR%%/Documentation/sms.php
52
%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes.html
53
%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes.php
54
%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes_faust.html
55
%%PORTDOCS%%%%DOCSDIR%%/Documentation/snes_faust.php
56
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ss.html
57
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ss.php
58
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ssfplay.html
59
%%PORTDOCS%%%%DOCSDIR%%/Documentation/ssfplay.php
60
%%PORTDOCS%%%%DOCSDIR%%/Documentation/vb.html
61
%%PORTDOCS%%%%DOCSDIR%%/Documentation/vb.php
62
%%PORTDOCS%%%%DOCSDIR%%/Documentation/wswan.html
63
%%PORTDOCS%%%%DOCSDIR%%/Documentation/wswan.php
64
%%PORTDOCS%%%%DOCSDIR%%/README
2
%%NLS%%share/locale/de/LC_MESSAGES/mednafen.mo
65
%%NLS%%share/locale/de/LC_MESSAGES/mednafen.mo
3
%%NLS%%share/locale/es/LC_MESSAGES/mednafen.mo
66
%%NLS%%share/locale/es/LC_MESSAGES/mednafen.mo
4
%%NLS%%share/locale/ru/LC_MESSAGES/mednafen.mo
67
%%NLS%%share/locale/ru/LC_MESSAGES/mednafen.mo
5
%%PORTDOCS%%%%DOCSDIR%%/mednafen.html
6
- 

Return to bug 280958