Javanaise / mrboom-libretro

Mr.Boom is an 8 player Bomberman clone for RetroArch/Libretro
http://mrboom.mumblecore.org
MIT License
200 stars 59 forks source link

Enhancements for Building in Sandboxed Environments and FreeBSD Manpage Path Compatibility #124

Closed ehaupt closed 7 months ago

ehaupt commented 7 months ago

I'm reaching out as a FreeBSD package maintainer for the mrboom port. I've encountered a couple of issues that I'd like to discuss and hopefully find a solution for, to improve the build process and compatibility, particularly in sandboxed, chrooted build environments and on FreeBSD systems.

1. Build Issue in Sandboxed Environments

The current Makefile uses the following to define GIT_VERSION:

GIT_VERSION := " $(shell git rev-parse --short HEAD)"

This works well in most cases but poses a challenge when building packages in sandboxed or chrooted environments without network access, as the git command fails, leading to build issues.

Suggested Solution:

Would it be possible to introduce an alternative method for defining GIT_VERSION when building in such restricted environments? One approach could be adding a switch like PACKAGE_BUILDING=yes that skips the git invocation, or alternatively, providing special release tarballs on GitHub that do not require git to determine the version.

2. FreeBSD Manpage Installation Path

FreeBSD installs manpages under share/man rather than the man/ directory.

Suggested Solution:

Could the Makefile be adjusted to automatically detect when it's being run on FreeBSD and set MANDIR accordingly, thereby streamlining the build process for FreeBSD users and maintainers? Alternatively, MANDIR could be defined as follows, allowing it to be overridden via an environment variable:

MANDIR ?= man/man6

I have temporarily addressed these issues with a patch. Implementing the suggested changes would allow me to eliminate the need for this patch.

frranck commented 7 months ago

Hello Emanuel, Would this work for you https://github.com/Javanaise/mrboom-libretro/compare/master...freebsd ?

ehaupt commented 7 months ago

Hello @frranck, that would work perfectly!

I am waiting for @AMDmi3 to commit https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276836, as we currently only have SDL 2.28.5 in the ports.

frranck commented 7 months ago

OK I will merge this: https://github.com/Javanaise/mrboom-libretro/commit/3bb1ec2419a87fc541f6d9524e9589e304800bb8 if it's fine, did a renaming so it doesn't confuse the libretro version.

ehaupt commented 7 months ago

Thank you @frranck!