Commit 373559 to fix PR 194854 (package build fails if PAM enabled on systems that don't have /usr/local/etc/pam.d directory) has a post-configure patch to ${WRKSRC}/Makedefs that assumes that /usr/local/etc/pam.d does not exist. For systems that do have this directory, the configure script correctly sets PAMDIR to /usr/local/etc/pam.d, but the post-configure patch prepends $LOCALBASE to this with the result that PAMDIR is incorrectly set to /usr/local/usr/local/etc/pam.d, which leads to failure to correctly stage the pam.d/cups.sample file.
Fixed in ports r410825.