packages: mark packages depending on a target as nonshared