as noted by zhuk, this already exists in base ports, with a patch even!