summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2012-08-24 00:11:23 +0000
committerJohannes Huber <johu@gentoo.org>2012-08-24 00:11:23 +0000
commitcfbce84c0a67cb9d363e088b6fa1ea19a1015cb8 (patch)
treeef424afeb532ee8b459dca24a9921c0b807db049 /app-text/kchmviewer
parentwhitespace (diff)
downloadgentoo-2-cfbce84c0a67cb9d363e088b6fa1ea19a1015cb8.tar.gz
gentoo-2-cfbce84c0a67cb9d363e088b6fa1ea19a1015cb8.tar.bz2
gentoo-2-cfbce84c0a67cb9d363e088b6fa1ea19a1015cb8.zip
Bump to EAPI 4. Fix .desktop file to pass validation. Die on sed. Respect LINGUAS.
(Portage version: 2.2.0_alpha122/cvs/Linux x86_64)
Diffstat (limited to 'app-text/kchmviewer')
-rw-r--r--app-text/kchmviewer/ChangeLog9
-rw-r--r--app-text/kchmviewer/kchmviewer-6.0-r1.ebuild97
2 files changed, 104 insertions, 2 deletions
diff --git a/app-text/kchmviewer/ChangeLog b/app-text/kchmviewer/ChangeLog
index 8de64c01f81a..ecc48f232619 100644
--- a/app-text/kchmviewer/ChangeLog
+++ b/app-text/kchmviewer/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/kchmviewer
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/ChangeLog,v 1.47 2012/05/30 06:35:57 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/ChangeLog,v 1.48 2012/08/24 00:11:23 johu Exp $
+
+*kchmviewer-6.0-r1 (24 Aug 2012)
+
+ 24 Aug 2012; Johannes Huber <johu@gentoo.org> +kchmviewer-6.0-r1.ebuild:
+ Bump to EAPI 4. Fix .desktop file to pass validation. Die on sed. Respect
+ LINGUAS.
30 May 2012; Johannes Huber <johu@gentoo.org>
-files/kchmviewer-5.2-kde-build.patch, -kchmviewer-5.2-r1.ebuild,
@@ -367,4 +373,3 @@
06 Jun 2005; Dominik Stadler <centic@gentoo.org> ChangeLog:
New package, fixes Bug 91193
-
diff --git a/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild b/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild
new file mode 100644
index 000000000000..729b8e7dd74f
--- /dev/null
+++ b/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild,v 1.1 2012/08/24 00:11:23 johu Exp $
+
+EAPI=4
+KDE_REQUIRED="never"
+KDE_LINGUAS_DIR="po"
+KDE_LINGUAS="cs fr hu it nl pt_BR ru sv tr zh_CN zh_TW"
+inherit fdo-mime qt4-r2 kde4-base
+
+DESCRIPTION="KchmViewer is a feature rich chm file viewer, based on Qt."
+HOMEPAGE="http://www.kchmviewer.net/"
+SRC_URI="mirror://sourceforge/kchmviewer/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug kde"
+
+RDEPEND="
+ dev-libs/chmlib
+ >=x11-libs/qt-dbus-4.5:4
+ >=x11-libs/qt-webkit-4.5:4
+ !kde? ( >=x11-libs/qt-gui-4.5:4 )
+ kde? (
+ $(add_kdebase_dep kdelibs)
+ !kde-base/okular[chm]
+ )
+"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ use kde && kde4-base_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+ sed -e "s:KDE4_ICON_INSTALL_DIR:ICON_INSTALL_DIR:" \
+ -e "s:KDE4_XDG_APPS_INSTALL_DIR:XDG_APPS_INSTALL_DIR:" \
+ -i packages/CMakeLists.txt || die
+ sed -e "s:KDE4_BIN_INSTALL_DIR:BIN_INSTALL_DIR:" \
+ -i src/CMakeLists.txt || die
+ echo "CONFIG += ordered" >> kchmviewer.pro # parallel build fix #281954
+
+ sed -e "/Encoding=UTF-8/d" \
+ -i packages/kchmviewer.desktop || die "fixing .desktop file failed"
+
+ local lang
+ for lang in ${KDE_LINGUAS} ; do
+ if ! use linguas_${lang} ; then
+ rm ${KDE_LINGUAS_DIR}/${PN}_${lang}.po
+ fi
+ done
+}
+
+src_configure() {
+ if use kde; then
+ kde4-base_src_configure
+ else
+ eqmake4
+ fi
+}
+
+src_compile() {
+ if use kde; then
+ kde4-base_src_compile
+ else
+ emake || die
+ fi
+}
+
+src_test() {
+ einfo "No tests exist."
+}
+
+src_install() {
+ if use kde; then
+ kde4-base_src_install
+ else
+ dobin bin/kchmviewer || die "dobin kchmviewer failed"
+ domenu packages/kchmviewer.desktop || die
+ dodoc ChangeLog README || die
+ fi
+ insinto /usr/share/pixmaps/
+ doins packages/kchmviewer.png || die
+ dodoc DBUS-bindings FAQ || die
+}
+
+pkg_postinst() {
+ use kde && kde4-base_pkg_postinst
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ use kde && kde4-base_pkg_postrm
+ fdo-mime_desktop_database_update
+}