/[gentoo-x86]/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild
Gentoo

Contents of /app-text/kchmviewer/kchmviewer-6.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Sep 5 09:27:37 2012 UTC (2 years ago) by jlec
Branch: MAIN
Changes since 1.1: +3 -4 lines
Use doicon instead insinto + doins to install icon files

(Portage version: 2.2.0_alpha124/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/kchmviewer/kchmviewer-6.0-r1.ebuild,v 1.1 2012/08/24 00:11:23 johu Exp $
4
5 EAPI=4
6 KDE_REQUIRED="never"
7 KDE_LINGUAS_DIR="po"
8 KDE_LINGUAS="cs fr hu it nl pt_BR ru sv tr zh_CN zh_TW"
9 inherit fdo-mime qt4-r2 kde4-base eutils
10
11 DESCRIPTION="KchmViewer is a feature rich chm file viewer, based on Qt."
12 HOMEPAGE="http://www.kchmviewer.net/"
13 SRC_URI="mirror://sourceforge/kchmviewer/${P}.tar.gz"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86"
18 IUSE="debug kde"
19
20 RDEPEND="
21 dev-libs/chmlib
22 >=x11-libs/qt-dbus-4.5:4
23 >=x11-libs/qt-webkit-4.5:4
24 !kde? ( >=x11-libs/qt-gui-4.5:4 )
25 kde? (
26 $(add_kdebase_dep kdelibs)
27 !kde-base/okular[chm]
28 )
29 "
30 DEPEND="${RDEPEND}"
31
32 pkg_setup() {
33 use kde && kde4-base_pkg_setup
34 }
35
36 src_prepare() {
37 base_src_prepare
38 sed -e "s:KDE4_ICON_INSTALL_DIR:ICON_INSTALL_DIR:" \
39 -e "s:KDE4_XDG_APPS_INSTALL_DIR:XDG_APPS_INSTALL_DIR:" \
40 -i packages/CMakeLists.txt || die
41 sed -e "s:KDE4_BIN_INSTALL_DIR:BIN_INSTALL_DIR:" \
42 -i src/CMakeLists.txt || die
43 echo "CONFIG += ordered" >> kchmviewer.pro # parallel build fix #281954
44
45 sed -e "/Encoding=UTF-8/d" \
46 -i packages/kchmviewer.desktop || die "fixing .desktop file failed"
47
48 local lang
49 for lang in ${KDE_LINGUAS} ; do
50 if ! use linguas_${lang} ; then
51 rm ${KDE_LINGUAS_DIR}/${PN}_${lang}.po
52 fi
53 done
54 }
55
56 src_configure() {
57 if use kde; then
58 kde4-base_src_configure
59 else
60 eqmake4
61 fi
62 }
63
64 src_compile() {
65 if use kde; then
66 kde4-base_src_compile
67 else
68 emake || die
69 fi
70 }
71
72 src_test() {
73 einfo "No tests exist."
74 }
75
76 src_install() {
77 if use kde; then
78 kde4-base_src_install
79 else
80 dobin bin/kchmviewer || die "dobin kchmviewer failed"
81 domenu packages/kchmviewer.desktop || die
82 dodoc ChangeLog README || die
83 fi
84 doicon packages/kchmviewer.png || die
85 dodoc DBUS-bindings FAQ || die
86 }
87
88 pkg_postinst() {
89 use kde && kde4-base_pkg_postinst
90 fdo-mime_desktop_database_update
91 }
92
93 pkg_postrm() {
94 use kde && kde4-base_pkg_postrm
95 fdo-mime_desktop_database_update
96 }

  ViewVC Help
Powered by ViewVC 1.1.20