Open thorpej opened 4 years ago
Any particular rationale for a relative path? Could it be simply X16_ROM_PATH
?
The original doesn't hard-code the path. If you all prefer a hard-coded path define, it makes no difference to me; I will simply adjust the pkgsrc package for that when I update it.
On Arch Linux, I've been patching main.c directly to refer to /usr/share/x16-rom
instead and it works so far. Would be nice to have a compile-time option for that.
I just added x16-rom and x16-emulator packages to NetBSD's cross-platform "pkgsrc" packaging system (see http://pkgsrc.org/). One of the conventions of that system is that shared data files are not located with binaries, but rather in a separate "share" file hierarchy. As such, I made a small change to allow the default "rom.bin" file to be in a location relative to that of the x16emu binary, rather than in the same directory. This is enabled by setting the 'ROM_RELATIVE_PATH' variable in the gmake environment. In pkgsrc package Makefiles, this is done like so:
MAKE_ENV+= ROM_RELATIVE_PATH=../share/x16/
...which would make the default locations for those files:
/usr/pkg/bin/x16emu /usr/pkg/share/x16/rom.bin
Attached are the two small patches (for Makefile and main.c) that make this work.
Behavior outside of the pkgsrc build system is unchanged. patches.zip