[pkg] fix compile speed up

Thanks to Anthony M. for the review