dev-qt/qt-docs: Fix broken png file
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 30 Apr 2020 10:02:07 +0000 (12:02 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 30 Apr 2020 10:14:17 +0000 (12:14 +0200)
Closes: https://bugs.gentoo.org/679146
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-qt/qt-docs/qt-docs-5.14.2_p202003291239.ebuild

index 8beec6556c99be76d6c3f71a7800e62349639844..466a8de3c9dca3e394b5dc713399c4157e70b44d 100644 (file)
@@ -77,10 +77,23 @@ for DOCUSE in ${!QT5_DOCS[@]}; do
 done
 unset DOCTAR DOCUSE
 
-BDEPEND="app-arch/p7zip"
+BDEPEND="
+       app-arch/p7zip
+       media-libs/libpng:0
+"
 
 S=${WORKDIR}/Docs/Qt-${PV%_p*}
 
+src_prepare() {
+       default
+
+       # Fix broken png file, bug 679146
+       local png=qtdoc/images/used-in-examples/demos/tweetsearch/content/resources/anonymous.png
+       pngfix -q --out=${png/.png/fixed.png} ${png} # see pngfix help for exit codes
+       [[ $? -gt 15 ]] && die "Failed to fix ${png}"
+       mv -f ${png/.png/fixed.png} ${png} || die
+}
+
 src_install() {
        # must be the same as QT5_DOCDIR
        insinto /usr/share/qt5-doc