Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/coolreader/
Date: Wed, 05 Sep 2018 15:40:44
Message-Id: 1536162004.cc8b56efca3751dc3b0756e3dc109657f37ce092.grozin@gentoo
1 commit: cc8b56efca3751dc3b0756e3dc109657f37ce092
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 5 15:39:20 2018 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 5 15:40:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc8b56ef
7
8 app-text/coolreader: move dev-qt/linguist-tools out of RDEPEND
9
10 Bug: https://bugs.gentoo.org/664218
11 Package-Manager: Portage-2.3.41, Repoman-2.3.9
12
13 app-text/coolreader/coolreader-3.2.2.1-r1.ebuild | 87 ++++++++++++++++++++++++
14 1 file changed, 87 insertions(+)
15
16 diff --git a/app-text/coolreader/coolreader-3.2.2.1-r1.ebuild b/app-text/coolreader/coolreader-3.2.2.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..672463952a1
19 --- /dev/null
20 +++ b/app-text/coolreader/coolreader-3.2.2.1-r1.ebuild
21 @@ -0,0 +1,87 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +WX_GTK_VER="3.0"
27 +PLOCALES="bg cs de es hu pl ru uk"
28 +inherit cmake-utils wxwidgets l10n xdg-utils gnome2-utils eapi7-ver
29 +
30 +CR_PV=$(ver_rs 3 '-')
31 +
32 +if [ "${PV}" != 9999 ]
33 +then
34 + # git tag cr3.2.2-1
35 + SRC_URI="https://github.com/buggins/${PN}/archive/cr${CR_PV}.tar.gz -> ${P}.tar.gz"
36 + S="${WORKDIR}/${PN}-cr${CR_PV}"
37 +else
38 + inherit git-r3
39 + # github mirror has some new commits to fix page margins settings
40 + # sourceforge mirror saved as backup
41 + #EGIT_REPO_URI="git://git.code.sf.net/p/crengine/crengine"
42 + EGIT_REPO_URI="https://github.com/buggins/${PN}.git"
43 + SRC_URI=""
44 +fi
45 +
46 +DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)"
47 +HOMEPAGE="https://sourceforge.net/projects/crengine/"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="wxwidgets"
53 +
54 +CDEPEND="sys-libs/zlib
55 + media-libs/libpng:0
56 + virtual/jpeg:0
57 + media-libs/freetype
58 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
59 + !wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )"
60 +DEPEND="${CDEPEND}
61 + !wxwidgets? ( dev-qt/linguist-tools:5 )"
62 +RDEPEND="${CDEPEND}
63 + wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )"
64 +
65 +for lang in ${PLOCALES}; do
66 + IUSE="${IUSE} l10n_${lang}"
67 +done
68 +
69 +src_prepare() {
70 + cmake-utils_src_prepare
71 +
72 + # locales
73 + l10n_find_plocales_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts'
74 + local lang langs
75 + langs=""
76 + for lang in ${PLOCALES}; do
77 + if use l10n_${lang}; then
78 + langs="${langs} ${lang}"
79 + fi
80 + done
81 + sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES ${langs})|" \
82 + -i "${S}"/cr3qt/CMakeLists.txt \
83 + || die "sed CMakeLists.txt failed"
84 +}
85 +
86 +src_configure() {
87 + CMAKE_USE_DIR="${S}"
88 + CMAKE_BUILD_TYPE="Release"
89 + if use wxwidgets; then
90 + setup-wxwidgets
91 + local mycmakeargs=(-D GUI=WX)
92 + else
93 + local mycmakeargs=(-D GUI=QT5)
94 + fi
95 + cmake-utils_src_configure
96 +}
97 +
98 +pkg_postinst() {
99 + xdg_desktop_database_update
100 + xdg_mimeinfo_database_update
101 + gnome2_icon_cache_update
102 +}
103 +
104 +pkg_postrm() {
105 + xdg_desktop_database_update
106 + xdg_mimeinfo_database_update
107 + gnome2_icon_cache_update
108 +}