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: Sun, 31 Dec 2017 02:37:27
Message-Id: 1514687810.f8d88a85978c7a6546971c853c40da02cdcad2f8.grozin@gentoo
1 commit: f8d88a85978c7a6546971c853c40da02cdcad2f8
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 31 02:35:26 2017 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 31 02:36:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8d88a85
7
8 app-text/coolreader: use wxwidgets.eclass
9
10 See https://github.com/gentoo/gentoo/pull/6692
11 Closes: https://bugs.gentoo.org/642638
12 Package-Manager: Portage-2.3.19, Repoman-2.3.6
13
14 app-text/coolreader/coolreader-3.1.2.71-r3.ebuild | 58 +++++++++++++++++++++++
15 app-text/coolreader/metadata.xml | 3 ++
16 2 files changed, 61 insertions(+)
17
18 diff --git a/app-text/coolreader/coolreader-3.1.2.71-r3.ebuild b/app-text/coolreader/coolreader-3.1.2.71-r3.ebuild
19 new file mode 100644
20 index 00000000000..9c7e43e5f3f
21 --- /dev/null
22 +++ b/app-text/coolreader/coolreader-3.1.2.71-r3.ebuild
23 @@ -0,0 +1,58 @@
24 +# Copyright 1999-2017 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +WX_GTK_VER="3.0"
29 +
30 +inherit cmake-utils wxwidgets
31 +
32 +if [ "${PV}" == 9999 ]
33 +then
34 + inherit git-r3
35 + # github mirror has some new commits to fix page margins settings
36 + # sourceforge mirror saved as backup
37 + #EGIT_REPO_URI="git://git.code.sf.net/p/crengine/crengine"
38 + EGIT_REPO_URI="https://github.com/buggins/coolreader.git"
39 + SRC_URI=""
40 +else
41 + # git tag cr3.1.2-71
42 + SRC_URI="https://dev.gentoo.org/~grozin/${P}.tar.bz2"
43 +fi
44 +
45 +DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)"
46 +HOMEPAGE="https://sourceforge.net/projects/crengine/"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE="wxwidgets"
52 +
53 +DEPEND="sys-libs/zlib
54 + media-libs/libpng:0
55 + virtual/jpeg:0
56 + media-libs/freetype
57 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
58 + !wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )"
59 +RDEPEND="${DEPEND}
60 + wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )"
61 +
62 +# 1st patch: To save cr3.ini to ~homedir.
63 +# 2nd patch: To build QT5 and WX GUI version of coolreader3;
64 +# setting correct vesrion number and years of cr3qt/cr3wx;
65 +# internal switching between wxGTK 2.8 or 3.0 version;
66 +# show wxWidgets version in "About" dialog window;
67 +# disabling "iCCP: known incorrect sRGB profile" warning popup window for wxwidgets GUI
68 +
69 +PATCHES=( "${FILESDIR}/cr3ini.diff" "${FILESDIR}/cr3.1.2.71-r1_qt5_wx.diff" )
70 +
71 +src_configure() {
72 + CMAKE_USE_DIR="${S}"
73 + CMAKE_BUILD_TYPE="Release"
74 + if use wxwidgets; then
75 + setup-wxwidgets
76 + local mycmakeargs=(-D GUI=WX)
77 + else
78 + local mycmakeargs=(-D GUI=QT5)
79 + fi
80 + cmake-utils_src_configure
81 +}
82
83 diff --git a/app-text/coolreader/metadata.xml b/app-text/coolreader/metadata.xml
84 index afd1b4bc9da..0bc14087cc2 100644
85 --- a/app-text/coolreader/metadata.xml
86 +++ b/app-text/coolreader/metadata.xml
87 @@ -8,6 +8,9 @@
88 A fast and small cross-platform XML/CSS based eBook reader for desktops and handheld devices.
89 Supported formats: FB2, TXT, RTF, DOC, TCR, HTML, EPUB, CHM, PDB, MOBI.
90 </longdescription>
91 + <use>
92 + <flag name="wxwidgets">Use <pkg>x11-libs/wxGTK</pkg> instead of Qt5</flag>
93 + </use>
94 <upstream>
95 <remote-id type="sourceforge">crengine</remote-id>
96 </upstream>