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: Thu, 30 Jan 2020 16:40:24
Message-Id: 1580402387.ea5d7ca55f44683db1b21c1c460f657945f7286f.grozin@gentoo
1 commit: ea5d7ca55f44683db1b21c1c460f657945f7286f
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 30 16:39:47 2020 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 30 16:39:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea5d7ca5
7
8 app-text/coolreader: bump to 3.2.39
9
10 Package-Manager: Portage-2.3.85, Repoman-2.3.20
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 app-text/coolreader/Manifest | 1 +
14 app-text/coolreader/coolreader-3.2.39.ebuild | 97 ++++++++++++++++++++++++++++
15 2 files changed, 98 insertions(+)
16
17 diff --git a/app-text/coolreader/Manifest b/app-text/coolreader/Manifest
18 index 91cca4b0203..5893b27c4ee 100644
19 --- a/app-text/coolreader/Manifest
20 +++ b/app-text/coolreader/Manifest
21 @@ -1 +1,2 @@
22 DIST coolreader-3.2.2.1.tar.gz 12463566 BLAKE2B 208026a87b36a06cd0a2e83b60bb506174b2edec4e3f4d1663c9d630cf316afd54aa0dbd0fdf0d3e44e03277d39692bbada8b03376a22970321928e594632997 SHA512 c2e3ea139ff3969c16985a56a9605a59ae31c59f9dc962abcc4aae5d87b8c48c8d7ed716a7077dd9da93cefc0d9ba0fe8a43c50e33e3d58acbcdfc35b73b3538
23 +DIST coolreader-3.2.39.tar.gz 17679570 BLAKE2B e84fb7d8032ae62fec24a74a9cebab086664a2ed3827f0664e667a4ab3b8d76b722790958f71f5fcd79729238e897c6592059f9b45eb4069c9ad483883bc0600 SHA512 1b92b35750174a8ef4df4b7c4f33bb9fcc94b36008c08a7f9d1f8e85c6b642c5b037e0673a783cde1aa98296887bb286c4a2da186911b26f298f689605e1eb4b
24
25 diff --git a/app-text/coolreader/coolreader-3.2.39.ebuild b/app-text/coolreader/coolreader-3.2.39.ebuild
26 new file mode 100644
27 index 00000000000..50ce82bcf87
28 --- /dev/null
29 +++ b/app-text/coolreader/coolreader-3.2.39.ebuild
30 @@ -0,0 +1,97 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +WX_GTK_VER="3.0"
36 +PLOCALES="bg cs de es hu pl ru uk"
37 +inherit cmake-utils wxwidgets l10n xdg-utils gnome2-utils eapi7-ver
38 +
39 +CR_PV=$(ver_rs 3 '-')
40 +
41 +if [ "${PV}" != 9999 ]
42 +then
43 + # git tag cr3.2.2-1
44 + SRC_URI="https://github.com/buggins/${PN}/archive/cr${CR_PV}.tar.gz -> ${P}.tar.gz"
45 + S="${WORKDIR}/${PN}-cr${CR_PV}"
46 +else
47 + inherit git-r3
48 + # github mirror has some new commits to fix page margins settings
49 + # sourceforge mirror saved as backup
50 + #EGIT_REPO_URI="git://git.code.sf.net/p/crengine/crengine"
51 + EGIT_REPO_URI="https://github.com/buggins/${PN}.git"
52 + SRC_URI=""
53 +fi
54 +
55 +DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)"
56 +HOMEPAGE="https://sourceforge.net/projects/crengine/"
57 +
58 +LICENSE="GPL-2"
59 +SLOT="0"
60 +KEYWORDS="~amd64 ~x86"
61 +IUSE="wxwidgets"
62 +
63 +CDEPEND="sys-libs/zlib
64 + media-libs/libpng:0
65 + virtual/jpeg:0
66 + media-libs/freetype
67 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
68 + !wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )"
69 +DEPEND="${CDEPEND}
70 + !wxwidgets? ( dev-qt/linguist-tools:5 )"
71 +RDEPEND="${CDEPEND}
72 + wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )"
73 +
74 +for lang in ${PLOCALES}; do
75 + IUSE="${IUSE} l10n_${lang}"
76 +done
77 +
78 +src_prepare() {
79 + cmake-utils_src_prepare
80 +
81 + # locales
82 + l10n_find_plocales_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts'
83 + local lang langs
84 + langs=""
85 + for lang in ${PLOCALES}; do
86 + if use l10n_${lang}; then
87 + langs="${langs} ${lang}"
88 + fi
89 + done
90 + sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES ${langs})|" \
91 + -i "${S}"/cr3qt/CMakeLists.txt \
92 + || die "sed CMakeLists.txt failed"
93 +}
94 +
95 +src_configure() {
96 + CMAKE_USE_DIR="${S}"
97 + CMAKE_BUILD_TYPE="Release"
98 + if use wxwidgets; then
99 + setup-wxwidgets
100 + local mycmakeargs=(-D GUI=WX)
101 + else
102 + local mycmakeargs=(-D GUI=QT5)
103 + fi
104 + cmake-utils_src_configure
105 +}
106 +
107 +src_install() {
108 + cmake-utils_src_install
109 + if ! use wxwidgets; then
110 + mv "${D}"usr/share/doc/cr3/changelog.gz "${D}"usr/share/doc/${PF}/ || die "mv changelog.gz failed"
111 + rmdir "${D}"usr/share/doc/cr3 || die "rmdir doc/cr3 failed"
112 + gunzip "${D}"usr/share/doc/${PF}/changelog.gz || die "gunzip changelog.gz failed"
113 + gunzip "${D}"usr/share/man/man1/cr3.1.gz || die "gunzip cr3.1.gz failed"
114 + fi
115 +}
116 +
117 +pkg_postinst() {
118 + xdg_desktop_database_update
119 + xdg_mimeinfo_database_update
120 + gnome2_icon_cache_update
121 +}
122 +
123 +pkg_postrm() {
124 + xdg_desktop_database_update
125 + xdg_mimeinfo_database_update
126 + gnome2_icon_cache_update
127 +}