sys-auth/passwdqc: add a compile test for shadow.h #554504
authorMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 03:37:14 +0000 (23:37 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 03:37:14 +0000 (23:37 -0400)
sys-auth/passwdqc/passwdqc-1.3.0.ebuild

index c7c1daee1bca299c9258b3768482c97b77449570..6dc27030a78109853e73c95b1101f598baa0cf2e 100644 (file)
@@ -27,6 +27,11 @@ src_prepare() {
        sed -i \
                -e 's:`uname -s`:Linux:' \
                Makefile || die
+       # See if the system has a shadow.h. #554504
+       echo '#include <shadow.h>' > "${T}"/test.c
+       if ! $(tc-getCPP) ${CPPFLAGS} "${T}"/test.c >& /dev/null ; then
+               sed -i -e 's:-DHAVE_SHADOW::' Makefile || die
+       fi
 }
 
 _emake() {