On 2023/05/01 16:57:51 +0300, Anton Konyahin <m...@konyahin.xyz> wrote:
> Hello!
> 
> I made a port for brogue game, roguelike adventure game with (or
> without) X11 support. 
> 
> I played a lot on amd64 and everything working fine.
> 
> But I have a question about game's score. Currently in PLIST I use
> 
> @sample /var/games/brogue/
> 
> and, in runtime, game creates a txt score file inside. When I try to
> uninstall package, I have a message about this directories, it is
> unempty and pkg_delete doesn't remove it. What I should do? Delete
> score file manually, or maybe create it when game installing?
> 
> Thank you for any suggestions and fixes!

I'm not sure it's a good idea to save scores to /var/games/brogue/.
Looking at the code this will fail badly if multiple users are playing
at the same time (they will override each others' scores).  Instead,
I'd follow what upstream suggests and ship a scripts that "cd" into
$XDG_DATA_HOME/Brogue before running the game.

The amount of patches needed to change where the game saves its files
is another hint that it's better to work around the issue in a
different way.  I'm recluntant to patch like this an upstream software
since while for now it could work fine, these kind of changes are very
likely to break in future updates.

I'm attaching a tweaked tarball: I've added a script in files/ and
moved the real game executable to ${PREFIX}/libexec; the script is
modeled after upstream' `linux/brogue-multiuser.sh'.

I'm also adding a patch to drop an hardcoded -O2 and fix a fprintf
call.

I'm sorry for removing most of your patches and void your efforts, but
I think that in the long run it's better to use a wrapper script.


Thanks,

Omar Polo

Attachment: brogue.tar.gz
Description: GNU Zip compressed data

Reply via email to