app-text/kding: Fix broken png with libpng-1.6
authorJohannes Huber <johu@gentoo.org>
Thu, 26 May 2016 17:18:41 +0000 (19:18 +0200)
committerJohannes Huber <johu@gentoo.org>
Thu, 26 May 2016 17:20:47 +0000 (19:20 +0200)
Gentoo-bug: 510510

Package-Manager: portage-2.3.0_rc1

app-text/kding/files/kding-0.6-cmake.patch [new file with mode: 0644]
app-text/kding/files/kding-0.6-dtd.patch
app-text/kding/kding-0.6-r3.ebuild [new file with mode: 0644]

diff --git a/app-text/kding/files/kding-0.6-cmake.patch b/app-text/kding/files/kding-0.6-cmake.patch
new file mode 100644 (file)
index 0000000..bd6929a
--- /dev/null
@@ -0,0 +1,8 @@
+diff -Naur kding-0.6.orig/CMakeLists.txt kding-0.6/CMakeLists.txt
+--- kding-0.6.orig/CMakeLists.txt      2009-09-20 14:09:48.000000000 +0200
++++ kding-0.6/CMakeLists.txt   2016-05-26 19:03:47.146777630 +0200
+@@ -1,3 +1,4 @@
++cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+ project(kding)
+ 
+ find_package(KDE4 REQUIRED)
index 0f8a4d5b934313fad597052e561b1bffe1fb89d5..f039b40fd344d8be7574d4c8110efea9cf8dbaf3 100644 (file)
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/338466
 
---- doc/de/index.docbook
-+++ doc/de/index.docbook
+--- a/doc/de/index.docbook
++++ b/doc/de/index.docbook
 @@ -1,5 +1,5 @@
  <?xml version="1.0" encoding="UTF-8"?>
 -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
@@ -9,8 +9,8 @@ http://bugs.gentoo.org/338466
      <!ENTITY kding "<application>KDing</application>">
      <!ENTITY kappname "&kding;"><!-- Do *not* replace kappname-->
      <!ENTITY % addindex "IGNORE">
---- doc/en/index.docbook
-+++ doc/en/index.docbook
+--- a/doc/en/index.docbook
++++ b/doc/en/index.docbook
 @@ -1,5 +1,5 @@
  <?xml version="1.0" ?>
 -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
diff --git a/app-text/kding/kding-0.6-r3.ebuild b/app-text/kding/kding-0.6-r3.ebuild
new file mode 100644 (file)
index 0000000..5227bb4
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_LINGUAS="de"
+inherit kde4-base
+
+DESCRIPTION="KDE port of Ding, a dictionary lookup program"
+HOMEPAGE="http://www.rexi.org/software/kding/"
+SRC_URI="http://www.rexi.org/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="media-libs/libpng:0"
+
+PATCHES=(
+       "${FILESDIR}/${P}-dtd.patch"
+       "${FILESDIR}/${P}-cmake.patch"
+)
+
+src_prepare() {
+       sed -e "/Encoding=UTF-8/d" \
+               -i resources/kding.desktop || die "fixing .desktop file failed"
+
+       kde4-base_src_prepare
+}
+
+src_install() {
+       kde4-base_src_install
+
+       # bug 510510
+       pngfix -q --out=out.png "${ED}/usr/share/icons/hicolor/22x22/apps/kding.png"
+       mv -f out.png "${ED}/usr/share/icons/hicolor/22x22/apps/kding.png" \
+       || die "fixing broken png file failed"
+}