[MacPorts] #40304: R port bug fix + enhancements