Magnetism in Mn-doped chalcopyrites