I propose to import realpath(1) from FreeBSD. It is a small program with less than 100 LOC. https://github.com/freebsd/freebsd/tree/master/bin/realpath The FreeBSD version works as-is (after patching __FBSDID and __dead2). realpath(1) is a part of coreutils on Linux and sometimes programs use it unconditionally, especially vlc in build rules. Avoiding coreutils for just a single program is a win.
Attachment:
signature.asc
Description: OpenPGP digital signature