[package] add mgen, patch from Roberto Riggio