diff options
author | Peter Volkov <pva@gentoo.org> | 2009-02-10 21:13:26 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2009-02-10 21:13:26 +0000 |
commit | 921f28dd3e6736ea301047aab80c8f8cd098308a (patch) | |
tree | cd0aa61ceb85d878a86548f90852a786970f5f28 /app-text/kchmviewer | |
parent | Fix block for media-libs/libkipi. (diff) | |
download | gentoo-2-921f28dd3e6736ea301047aab80c8f8cd098308a.tar.gz gentoo-2-921f28dd3e6736ea301047aab80c8f8cd098308a.tar.bz2 gentoo-2-921f28dd3e6736ea301047aab80c8f8cd098308a.zip |
Fixed prefix installation with kde-4.2, thank Tomas Caithaml for report and tests in bug #257616, and scarabeus for fast kde4* eclass polishing.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'app-text/kchmviewer')
-rw-r--r-- | app-text/kchmviewer/ChangeLog | 10 | ||||
-rw-r--r-- | app-text/kchmviewer/kchmviewer-4.0-r1.ebuild | 101 |
2 files changed, 109 insertions, 2 deletions
diff --git a/app-text/kchmviewer/ChangeLog b/app-text/kchmviewer/ChangeLog index 1545776fb724..f5d59f773b6a 100644 --- a/app-text/kchmviewer/ChangeLog +++ b/app-text/kchmviewer/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/kchmviewer -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/ChangeLog,v 1.8 2008/12/02 11:27:47 pva Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/ChangeLog,v 1.9 2009/02/10 21:13:26 pva Exp $ + +*kchmviewer-4.0-r1 (10 Feb 2009) + + 10 Feb 2009; Peter Volkov <pva@gentoo.org> +kchmviewer-4.0-r1.ebuild: + Fixed prefix installation with kde-4.2, thank Tomas Caithaml for report + and tests in bug #257616, and scarabeus for fast kde4* eclass polishing. *kchmviewer-4.0 (02 Dec 2008) diff --git a/app-text/kchmviewer/kchmviewer-4.0-r1.ebuild b/app-text/kchmviewer/kchmviewer-4.0-r1.ebuild new file mode 100644 index 000000000000..76e5c45d86eb --- /dev/null +++ b/app-text/kchmviewer/kchmviewer-4.0-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/kchmviewer-4.0-r1.ebuild,v 1.1 2009/02/10 21:13:26 pva Exp $ + +EAPI="2" +NEED_KDE="none" +inherit fdo-mime qt4 kde4-base + +MY_P="${PN}-${PV/_beta/beta}" + +DESCRIPTION="KchmViewer is a feature rich chm file viewer, based on Qt." +HOMEPAGE="http://www.kchmviewer.net/" +SRC_URI="mirror://sourceforge/kchmviewer/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kde" + +RDEPEND="dev-libs/chmlib + || ( ( x11-libs/qt-dbus:4 + x11-libs/qt-webkit:4 ) + =x11-libs/qt-4.3*:4 ) + !kde? ( || ( x11-libs/qt-gui:4 + =x11-libs/qt-4.3*:4 ) ) + kde? ( >=kde-base/kdelibs-4.1[kdeprefix=] + !kde-base/okular[chm] )" +DEPEND="${RDEPEND} + kde? ( dev-util/cmake )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use kde; then + kde4-base_pkg_setup + fi +} + +src_prepare() { + sed -e "s:KDE4_SERVICES_INSTALL_DIR:SERVICES_INSTALL_DIR:" \ + -i lib/kio-msits/CMakeLists.txt + sed "s:KDE4_ICON_INSTALL_DIR:ICON_INSTALL_DIR:" -i src/kde/CMakeLists.txt + sed -e "s:KDE4_BIN_INSTALL_DIR:BIN_INSTALL_DIR:" \ + -e "s:KDE4_XDG_APPS_INSTALL_DIR:XDG_APPS_INSTALL_DIR:" \ + -i src/CMakeLists.txt +} + +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 + # install icons in hicolor since it's fallback in kde irrespectively of + # ICON_INSTALL_DIR (this is really strange...) + for size in 48 64 128; do + insinto /usr/share/icons/hicolor/${size}x${size}/apps && \ + newins src/kde/cr${size}-app-kchmviewer.png kchmviewer.png || die + done + kde4-base_src_install + else + dobin bin/kchmviewer || die "dobin kchmviewer failed" + newmenu src/kde/kchmviewer.desktop kchmviewer.desktop + for size in 48 64 128; do + insinto /usr/share/icons/hicolor/${size}x${size}/apps && \ + newins src/kde/cr${size}-app-kchmviewer.png kchmviewer.png || die + done + dodoc ChangeLog README || die + fi + dodoc "${S}"/{DBUS-bindings,FAQ} || die +} + +pkg_postinst() { + use kde && kde4-base_pkg_postinst + fdo-mime_desktop_database_update + if use kde && use kdeprefix; then + elog "Note: after each major kde update, which happens with SLOT change," + elog "you need to rebuild kchmviewer." + fi +} + +pkg_postrm() { + use kde && kde4-base_pkg_postrm + fdo-mime_desktop_database_update +} |