I was exploring the issue regarding some Ports are not using the control scheme (modern/retro) mapping. Upon initial investigation, it seems like some PortMaster applications ignores what is set on the SDL_GAMECONTROLLERCONFIG variable and would keep on using /usr/lib32/gamecontrollerdb.txt.
A quick fix I did that seemed to work was to add the following to the SETUP_SDL_ENVIRONMENT() function in script/var/func.sh script:
for LIB_D in lib lib32; do
BASE="/usr/$LIB_D"
[ -d "$BASE" ] || continue
GCDB_LIB_PATH="$BASE/gamecontrollerdb.txt"
rm -f "$GCDB_LIB_PATH"
ln -s "$SDL_GAMECONTROLLERCONFIG_FILE" "$GCDB_LIB_PATH"
done
Added this after the line:
export SDL_GAMECONTROLLERCONFIG_FILE SDL_GAMECONTROLLERCONFIG
This linking implementation is inspired from script/mux/sdl_map.sh.
See related post below: