x11-misc/qcomicbook: Version bump (bug 607536, thanks consus@gmx.com), update SRC_URI.
[gentoo.git] / x11-misc / qcomicbook / qcomicbook-0.9.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 CMAKE_IN_SOURCE_BUILD=1
8 PLOCALES="cs_CZ de_DE es_ES fi_FI fr_CA fr_FR it_IT ko_KR nl_NL pl_PL pt_BR ru_RU uk_UA zh_CN"
9 inherit cmake-utils flag-o-matic l10n vcs-snapshot
10
11 DESCRIPTION="A viewer for comic book archives containing jpeg/png images"
12 HOMEPAGE="http://qcomicbook.org/"
13 SRC_URI="https://github.com/stolowski/QComicBook/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86"
18 IUSE="debug"
19
20 DEPEND="app-text/poppler[qt5]
21         dev-qt/qtcore:5
22         dev-qt/qtgui:5
23         dev-qt/qtprintsupport:5
24         dev-qt/qtwidgets:5
25         dev-qt/qtx11extras"
26 RDEPEND="${DEPEND}"
27
28 DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
29
30 src_prepare() {
31         rm_loc() {
32                 rm "i18n/${PN}_${1}.ts" || die "removing ${1} locale failed"
33         }
34         rm "i18n/${PN}_en_EN.ts" || die 'removing redundant english locale failed'
35         l10n_find_plocales_changes "i18n" "${PN}_" ".ts"
36         l10n_for_each_disabled_locale_do rm_loc
37
38         # fix desktop file
39         sed -i \
40                 -e '/^Encoding/d' \
41                 -e '/^Icon/s/.png//' \
42                 -e '/^Categories/s/Application;//' \
43                 "data/${PN}.desktop" || die 'sed on desktop file failed'
44
45         cmake-utils_src_prepare
46 }
47
48 src_configure() {
49         use !debug && append-cppflags -DQT_NO_DEBUG_OUTPUT
50         cmake-utils_src_configure
51 }
52
53 pkg_postinst() {
54         elog "For using QComicBook with compressed archives you may want to install:"
55         elog "    app-arch/p7zip"
56         elog "    app-arch/unace"
57         elog "    app-arch/unrar or app-arch/rar"
58         elog "    app-arch/unzip"
59 }