dev-util/kdbg: QA: Fix broken .png files
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 16 Dec 2018 16:00:31 +0000 (17:00 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 16 Dec 2018 16:00:50 +0000 (17:00 +0100)
Closes: https://bugs.gentoo.org/673236
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-util/kdbg/kdbg-3.0.0.ebuild

index ecb39833107dfce67d2dcf60a38af55b306224d4..d6e46f2cfd5a3011fe38f9958d4eb8ff80e9050a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -14,7 +14,7 @@ LICENSE="GPL-2"
 KEYWORDS=""
 KEYWORDS="~amd64 ~x86"
 
-DEPEND="
+COMMON_DEPEND="
        $(add_frameworks_dep kconfig)
        $(add_frameworks_dep kconfigwidgets)
        $(add_frameworks_dep kcoreaddons)
@@ -26,10 +26,13 @@ DEPEND="
        $(add_qt_dep qtgui)
        $(add_qt_dep qtwidgets)
 "
-RDEPEND="${DEPEND}
+RDEPEND="${COMMON_DEPEND}
        !dev-util/kdbg:4
        sys-devel/gdb
 "
+DEPEND="${COMMON_DEPEND}
+       media-libs/libpng:0
+"
 
 src_prepare() {
        # allow documentation to be handled by eclass
@@ -37,5 +40,12 @@ src_prepare() {
        sed -i -e '/add_subdirectory(doc)/d' kdbg/CMakeLists.txt || die
        echo "add_subdirectory ( doc ) " >> CMakeLists.txt || die
 
+       local png
+       for png in kdbg/pics/*.png; do
+               pngfix -q --out=${png/.png/fixed.png} ${png}
+               [[ $? -gt 15 ]] && die "Failed to fix ${png}"
+               mv -f ${png/.png/fixed.png} ${png} || die
+       done
+
        kde5_src_prepare
 }