app-text/podofo: bug 620934: disable cppunit when possible
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Jun 2017 19:21:59 +0000 (12:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Jun 2017 19:25:33 +0000 (12:25 -0700)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

app-text/podofo/podofo-0.9.6_pre20170508-r1.ebuild

index 9ac790385034e07f335946d84908aacc4376741e..5c12649492941217feac62a73ea68ba6dab453c2 100644 (file)
@@ -38,6 +38,10 @@ src_prepare() {
        # equal to ${PV}.
        sed -e 's|${PODOFO_VERSION_PATCH}|\0_'${PV##*_}'|' -i CMakeLists.txt || die
 
+       # bug 620934 - Disable linking with cppunit when possible, since it
+       # triggers errors with some older compilers.
+       use test || sed -e 's:^FIND_PACKAGE(CppUnit):#\0:' -i CMakeLists.txt || die
+
        # bug 556962
        sed -i -e 's|Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, m_lLen );|Decrypt( pEncryptedBuffer, (pdf_long)nOutputLen, pDecryptedBuffer, (pdf_long\&)m_lLen );|' \
                test/unit/EncryptTest.cpp || die