1 |
commit: 28ad49108eb8aa7b5a355b9ec73bfd3691af9957 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 4 08:39:29 2018 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 4 08:39:29 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28ad4910 |
7 |
|
8 |
app-text/coolreader: ebuild improvements |
9 |
|
10 |
(1) install only translations mentioned in the user's L10N |
11 |
(2) update cashes (desktop, mime, icon) |
12 |
Closes: https://bugs.gentoo.org/642212 |
13 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
14 |
|
15 |
app-text/coolreader/coolreader-3.1.2.71-r4.ebuild | 91 +++++++++++++++++++++++ |
16 |
1 file changed, 91 insertions(+) |
17 |
|
18 |
diff --git a/app-text/coolreader/coolreader-3.1.2.71-r4.ebuild b/app-text/coolreader/coolreader-3.1.2.71-r4.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..33c7a7c28be |
21 |
--- /dev/null |
22 |
+++ b/app-text/coolreader/coolreader-3.1.2.71-r4.ebuild |
23 |
@@ -0,0 +1,91 @@ |
24 |
+# Copyright 1999-2018 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 |
+PLOCALES="bg cs de es hu pl ru uk" |
30 |
+inherit cmake-utils wxwidgets l10n xdg-utils gnome2-utils |
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 |
+for lang in ${PLOCALES}; do |
72 |
+ IUSE="${IUSE} l10n_${lang}" |
73 |
+done |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ cmake-utils_src_prepare |
77 |
+ |
78 |
+ # locales |
79 |
+ l10n_find_plocales_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts' |
80 |
+ local lang langs |
81 |
+ langs="" |
82 |
+ for lang in ${PLOCALES}; do |
83 |
+ if use l10n_${lang}; then |
84 |
+ langs="${langs} ${lang}" |
85 |
+ fi |
86 |
+ done |
87 |
+ sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES ${langs})|" \ |
88 |
+ -i "${S}"/cr3qt/CMakeLists.txt \ |
89 |
+ || die "sed CMakeLists.txt failed" |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ CMAKE_USE_DIR="${S}" |
94 |
+ CMAKE_BUILD_TYPE="Release" |
95 |
+ if use wxwidgets; then |
96 |
+ setup-wxwidgets |
97 |
+ local mycmakeargs=(-D GUI=WX) |
98 |
+ else |
99 |
+ local mycmakeargs=(-D GUI=QT5) |
100 |
+ fi |
101 |
+ cmake-utils_src_configure |
102 |
+} |
103 |
+ |
104 |
+pkg_postinst() { |
105 |
+ xdg_desktop_database_update |
106 |
+ xdg_mimeinfo_database_update |
107 |
+ gnome2_icon_cache_update |
108 |
+} |
109 |
+ |
110 |
+pkg_postrm() { |
111 |
+ xdg_desktop_database_update |
112 |
+ xdg_mimeinfo_database_update |
113 |
+ gnome2_icon_cache_update |
114 |
+} |