Created attachment 190059 [details] patch to port to get things to 3.0
chocolate-doom 3.0 now uses sdl2, so just made the updates to the Makefile and the distinfo with the attached patch and things seem to build for me. I did not touch the plist.
Thanks for noticing the update, portscout has failed me this time. Were you able to test fluidsynth/MIDI support? Though chocolate-doom has it's OPL emulation, the former is default dependency for sdl2mixer.
(In reply to jakub_lach from comment #3) Sound is working, I tested Music with "OPL (Adlib/Soundblaster)" and "Native MIDI" and things appear to be working. Let me know how to test this specifically.
It's about soundtrack, Native MIDI depends on Timidity, which is no longer required dependency for a sdl(2)mixer, and I couldn't build sdl2mixer with fluidsynth here. OPL2/3 is emulated and indeed works as before, maybe just a different pkg-message is in order, as we also have a new place for a configuration files.
Any feedback? Not sure how many/if any user values various replay options, making a chocolate-legacy just to support those looks a bit overkill.
I've tested 3.0.0 on my desktop and a netbook. On both machines, OPL music worked fine. On the netbook, Gravis Ultrasound didn't work until I downloaded and installed the GUS patches from https://www.chocolate-doom.org/wiki/index.php/GUS . Native MIDI didn't work. On the desktop, all 3 worked (though GUS didn't sound as good because I hadn't installed the patches). As it turned out, I already had Timidity installed on the desktop, so that appears to be why the GUS and native MIDI worked. So everything seems to be working just fine with 3.0.0. Why not just add an optional runtime dependency in the chocolate-doom-3.0.0 port to depend on either Timidity or Timidity++? That way GUS or native MIDI is ready to go. Problem solved. And if Timidity or Timidity++ is enabled, offer the option to pull in audio/guspats (for Gravis Ultrasound), audio/eawpats, or audio/eawplus (for native MIDI). If you don't want to add a bunch of optional dependencies to the Chocolate Doom port, then at least have it output some informational messages informing the user to install audio/timidity, audio/timidity++, audio/guspats, audio/eawpats, or audio/eawplus for additional music playback options.
I did some more tinkering and want to make a correction. You do NOT need to have Timidity or Timidity++ installed for GUS or native MIDI to work. You only need to have a set of instrument patches (audio/eawpats, audio/eawplus, audio/freepats, audio/guspat) installed, run chocolate-doom-setup, go to the audio settings, select GUS or native MIDI, and enter the path to the patch directory. If GUS or native MIDI is selected but the path to the patch directory is left blank, it will look for /etc/timidity/freepats.cfg by default. So it might not be a bad idea to patch the source for FreeBSD so that it looks for /usr/local/share/freepats/freepats.cfg by default.
Created attachment 193885 [details] new pkg-message to thoroughly explain how to configure music I'm attaching a proposed update to the pkg-message file. This thoroughly explains how Chocolate Doom handles music and how to properly configure it.
Created attachment 193975 [details] chocolate-doom 3.0.0 patch diff to 2.3.0
(In reply to Patrick from comment #9) Thank you for your documented research and persistence! I rewrote the pkg-message a little, and did some testing by myself, attaching the current state. Looks OK to me, ran portlint and routine tests, didn't have time to check all sound options.
Created attachment 193976 [details] chocolate-doom 3.0.0 patch corrected pkg-message
Although not necessary to close out this particular bug, Id like for the port to also include an rc script to run the server. I should be able to write one in my spare time. What would be the proper user:group for the server to run as? Would it be nobody:nobody?
(In reply to Patrick from comment #13) I can try to work this up. It looks like there are no flags specific to running as a separate user, but since the default port is 2342 it should be fine as nobody in an rc script.
This worked for me, and I used daemon because the server does not appear to daemonize. I tested this in my doom jail, restarted and it appears to function. #!/bin/sh # # PROVIDE: chocolate_server # REQUIRE: LOGIN # KEYWORD: shutdown . /etc/rc.subr name="chocolate_server" rcvar=`set_rcvar` load_rc_config $name start_cmd="chocolate_server_start" : ${chocolate_server_program:=/usr/local/bin/chocolate-server} : ${chocolate_server_commandline:="-servername ChocolateDoomServer"} chocolate_server_enable=${chocolate_server_enable="NO"} chocolate_server_start() { daemon -u nobody $chocolate_server_program $chocolate_server_commandline } run_rc_command "$1"
(In reply to Shirkdog from comment #15) Forgot to add -f to daemon. The commandline can be blank, but I normally set the servername. So the following should be good for an rc script. #!/bin/sh # # PROVIDE: chocolate_server # REQUIRE: LOGIN # KEYWORD: shutdown . /etc/rc.subr name="chocolate_server" rcvar=`set_rcvar` load_rc_config $name start_cmd="chocolate_server_start" : ${chocolate_server_program:=/usr/local/bin/chocolate-server} : ${chocolate_server_commandline:=""} chocolate_server_enable=${chocolate_server_enable="NO"} chocolate_server_start() { daemon -f -u nobody $chocolate_server_program $chocolate_server_commandline } run_rc_command "$1"
FWIW, I've accept the previous patch. Regarding the server, I have no way to test it.
A commit references this bug: Author: swills Date: Tue Jan 15 14:22:15 UTC 2019 New revision: 490375 URL: https://svnweb.freebsd.org/changeset/ports/490375 Log: games/chocolate-doom: update to 3.0.0 While here: * add rc script for server [1] * add pkg-message on music configuration [2] PR: 225453 Submitted by: jakub_lach@mailplus.pl (maintainer) Submitted by: Shirkdog <mshirk@daemon-security.com> (update and [1]) Submitted by: Patrick McMunn <doctorwhoguy@gmail.com> [2] Changes: head/games/chocolate-doom/Makefile head/games/chocolate-doom/distinfo head/games/chocolate-doom/files/chocolate-server.in head/games/chocolate-doom/files/patch-src_d__iwad.c head/games/chocolate-doom/pkg-message
Committed all this, with some minor edits. I think the server and rc script may be best to move to a separate package, maybe via a slave port, so that you don't have to install the GUI components if you only want to run a server. But for now, it's a good start. Thanks for the update, sorry it took so long.