Javanaise/mrboom-libretro

Enhancements for Building in Sandboxed Environments and FreeBSD Manpage Path Compatibility

ehaupt opened this issue · 4 comments

ehaupt commented

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.

Hello Emanuel,
Would this work for you master...freebsd ?

ehaupt commented

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.

OK I will merge this: 3bb1ec2 if it's fine, did a renaming so it doesn't confuse the libretro version.

ehaupt commented

Thank you @frranck!