1 |
commit: 68ae56240c49bb10a7a0109adada6611bfe22471 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 13 14:51:37 2021 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 13 14:52:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68ae5624 |
7 |
|
8 |
app-text/coolreader: fix compiling with USE=wxwidgets |
9 |
|
10 |
Also missing dependencies added |
11 |
Closes: https://bugs.gentoo.org/811342 |
12 |
Closes: https://bugs.gentoo.org/812245 |
13 |
Package-Manager: Portage-3.0.23, Repoman-3.0.3 |
14 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
15 |
|
16 |
app-text/coolreader/coolreader-3.2.59-r1.ebuild | 71 +++++++++++++++++++++++++ |
17 |
1 file changed, 71 insertions(+) |
18 |
|
19 |
diff --git a/app-text/coolreader/coolreader-3.2.59-r1.ebuild b/app-text/coolreader/coolreader-3.2.59-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..e8422f1bb4a |
22 |
--- /dev/null |
23 |
+++ b/app-text/coolreader/coolreader-3.2.59-r1.ebuild |
24 |
@@ -0,0 +1,71 @@ |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+WX_GTK_VER="3.0-gtk3" |
30 |
+PLOCALES="bg cs de es hu pl ru uk" |
31 |
+inherit cmake plocale wxwidgets xdg |
32 |
+ |
33 |
+CR_PV=$(ver_rs 3 '-') |
34 |
+SRC_URI="https://github.com/buggins/${PN}/archive/cr${CR_PV}.tar.gz -> ${P}.tar.gz" |
35 |
+S="${WORKDIR}/${PN}-cr${CR_PV}" |
36 |
+ |
37 |
+DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)" |
38 |
+HOMEPAGE="https://github.com/buggins/coolreader/" |
39 |
+ |
40 |
+LICENSE="GPL-2" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
+IUSE="wxwidgets" |
44 |
+ |
45 |
+CDEPEND="sys-libs/zlib |
46 |
+ app-arch/zstd |
47 |
+ media-libs/libpng:0 |
48 |
+ virtual/jpeg:0 |
49 |
+ media-libs/freetype |
50 |
+ dev-libs/fribidi |
51 |
+ media-libs/fontconfig |
52 |
+ media-libs/harfbuzz |
53 |
+ dev-libs/libunibreak |
54 |
+ dev-libs/libutf8proc |
55 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} ) |
56 |
+ !wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )" |
57 |
+BDEPEND="${CDEPEND} |
58 |
+ !wxwidgets? ( dev-qt/linguist-tools:5 )" |
59 |
+RDEPEND="${CDEPEND} |
60 |
+ wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )" |
61 |
+ |
62 |
+PATCHES=( "${FILESDIR}"/${PN}-wxwidgets.patch ) |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ cmake_src_prepare |
66 |
+ xdg_environment_reset |
67 |
+ |
68 |
+ # locales |
69 |
+ plocale_find_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts' |
70 |
+ sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES $(plocale_get_locales))|" \ |
71 |
+ -i "${S}"/cr3qt/CMakeLists.txt \ |
72 |
+ || die "sed CMakeLists.txt failed" |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ CMAKE_USE_DIR="${S}" |
77 |
+ CMAKE_BUILD_TYPE="Release" |
78 |
+ if use wxwidgets; then |
79 |
+ setup-wxwidgets |
80 |
+ local mycmakeargs=(-DGUI=WX) |
81 |
+ else |
82 |
+ local mycmakeargs=(-DGUI=QT5) |
83 |
+ fi |
84 |
+ cmake_src_configure |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ cmake_src_install |
89 |
+ if ! use wxwidgets; then |
90 |
+ mv "${D}"/usr/share/doc/cr3/changelog.gz "${D}"/usr/share/doc/${PF}/ || die "mv changelog.gz failed" |
91 |
+ rmdir "${D}"/usr/share/doc/cr3 || die "rmdir doc/cr3 failed" |
92 |
+ gunzip "${D}"/usr/share/doc/${PF}/changelog.gz || die "gunzip changelog.gz failed" |
93 |
+ gunzip "${D}"/usr/share/man/man1/cr3.1.gz || die "gunzip cr3.1.gz failed" |
94 |
+ fi |
95 |
+} |