1 |
commit: 09803522a2796b647f85a4aaa4e877792fefccf5 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 3 10:42:58 2023 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 3 10:42:58 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09803522 |
7 |
|
8 |
app-text/crengine-ng: compilation fixes |
9 |
|
10 |
Closes: https://bugs.gentoo.org/889078 |
11 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
12 |
|
13 |
app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild | 60 ++++++++++++++++++++++ |
14 |
app-text/crengine-ng/files/crengine-ng-0.9.4.patch | 55 ++++++++++++++++++++ |
15 |
2 files changed, 115 insertions(+) |
16 |
|
17 |
diff --git a/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild b/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 000000000000..75782c9ba4db |
20 |
--- /dev/null |
21 |
+++ b/app-text/crengine-ng/crengine-ng-0.9.4-r1.ebuild |
22 |
@@ -0,0 +1,60 @@ |
23 |
+# Copyright 1999-2023 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=8 |
27 |
+inherit cmake |
28 |
+ |
29 |
+DESCRIPTION="Cross-platform library designed to implement e-book readers" |
30 |
+HOMEPAGE="https://gitlab.com/coolreader-ng/crengine-ng" |
31 |
+SRC_URI="https://gitlab.com/coolreader-ng/${PN}/-/archive/${PV}/${P}.tar.bz2" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="+png +jpeg +gif +svg +chm +harfbuzz +fontconfig +libunibreak +fribidi +zstd +libutf8proc lto static-libs" |
37 |
+ |
38 |
+CDEPEND="sys-libs/zlib |
39 |
+ png? ( media-libs/libpng:0 ) |
40 |
+ jpeg? ( media-libs/libjpeg-turbo ) |
41 |
+ >=media-libs/freetype-2.10.0 |
42 |
+ harfbuzz? ( media-libs/harfbuzz:= ) |
43 |
+ libunibreak? ( dev-libs/libunibreak:= ) |
44 |
+ fribidi? ( dev-libs/fribidi ) |
45 |
+ zstd? ( app-arch/zstd:= ) |
46 |
+ libutf8proc? ( dev-libs/libutf8proc:= ) |
47 |
+ fontconfig? ( media-libs/fontconfig )" |
48 |
+ |
49 |
+RDEPEND="${CDEPEND}" |
50 |
+DEPEND="${RDEPEND}" |
51 |
+BDEPEND="virtual/pkgconfig |
52 |
+ ${CDEPEND}" |
53 |
+ |
54 |
+PATCHES=( "${FILESDIR}"/${P}.patch ) |
55 |
+ |
56 |
+src_configure() { |
57 |
+ CMAKE_USE_DIR="${S}" |
58 |
+ CMAKE_BUILD_TYPE="Release" |
59 |
+ local mycmakeargs=( |
60 |
+ -DCRE_BUILD_SHARED=ON |
61 |
+ -DCRE_BUILD_STATIC=$(usex static-libs) |
62 |
+ -DUSE_COLOR_BACKBUFFER=ON |
63 |
+ -DWITH_LIBPNG=$(usex png) |
64 |
+ -DWITH_LIBJPEG=$(usex jpeg) |
65 |
+ -DWITH_FREETYPE=ON |
66 |
+ -DWITH_HARFBUZZ=$(usex harfbuzz) |
67 |
+ -DWITH_LIBUNIBREAK=$(usex libunibreak) |
68 |
+ -DWITH_FRIBIDI=$(usex fribidi) |
69 |
+ -DWITH_ZSTD=$(usex zstd) |
70 |
+ -DWITH_UTF8PROC=$(usex libutf8proc) |
71 |
+ -DUSE_GIF=$(usex gif) |
72 |
+ -DUSE_NANOSVG=$(usex svg) |
73 |
+ -DUSE_CHM=$(usex chm) |
74 |
+ -DUSE_ANTIWORD=ON |
75 |
+ -DUSE_FONTCONFIG=$(usex fontconfig) |
76 |
+ -DUSE_SHASUM=OFF |
77 |
+ -DBUILD_TOOLS=OFF |
78 |
+ -DENABLE_UNITTESTING=OFF |
79 |
+ -DENABLE_LTO=$(usex lto) |
80 |
+ ) |
81 |
+ cmake_src_configure |
82 |
+} |
83 |
|
84 |
diff --git a/app-text/crengine-ng/files/crengine-ng-0.9.4.patch b/app-text/crengine-ng/files/crengine-ng-0.9.4.patch |
85 |
new file mode 100644 |
86 |
index 000000000000..227071816d5b |
87 |
--- /dev/null |
88 |
+++ b/app-text/crengine-ng/files/crengine-ng-0.9.4.patch |
89 |
@@ -0,0 +1,55 @@ |
90 |
+From 62106833d4e8af5325ed7a55c7a897e43a52bb20 Mon Sep 17 00:00:00 2001 |
91 |
+From: Aleksey Chernov <valexlin@×××××.com> |
92 |
+Date: Sun, 1 Jan 2023 09:55:04 +0400 |
93 |
+Subject: [PATCH] Compile warnings/errors fixed: `strcasecmp` missing |
94 |
+ prototype. |
95 |
+ |
96 |
+--- |
97 |
+ thirdparty/antiword/antiword.h | 3 +++ |
98 |
+ thirdparty/chmlib/src/chm_lib.c | 6 +----- |
99 |
+ 2 files changed, 4 insertions(+), 5 deletions(-) |
100 |
+ |
101 |
+diff --git a/thirdparty/antiword/antiword.h b/thirdparty/antiword/antiword.h |
102 |
+index e6f4d68f..0abce7af 100644 |
103 |
+--- a/thirdparty/antiword/antiword.h |
104 |
++++ b/thirdparty/antiword/antiword.h |
105 |
+@@ -31,6 +31,9 @@ |
106 |
+ #else |
107 |
+ #include <sys/types.h> |
108 |
+ #endif /* __riscos */ |
109 |
++#include <string.h> |
110 |
++#include <strings.h> |
111 |
++ |
112 |
+ #include "wordconst.h" |
113 |
+ #include "wordtypes.h" |
114 |
+ #include "fail.h" |
115 |
+diff --git a/thirdparty/chmlib/src/chm_lib.c b/thirdparty/chmlib/src/chm_lib.c |
116 |
+index 637a32b2..2e26db1e 100644 |
117 |
+--- a/thirdparty/chmlib/src/chm_lib.c |
118 |
++++ b/thirdparty/chmlib/src/chm_lib.c |
119 |
+@@ -59,6 +59,7 @@ |
120 |
+ #include <stdint.h> |
121 |
+ #include <stdlib.h> |
122 |
+ #include <string.h> |
123 |
++#include <strings.h> |
124 |
+ #ifdef CHM_DEBUG |
125 |
+ #include <stdio.h> |
126 |
+ #endif |
127 |
+@@ -70,14 +71,9 @@ |
128 |
+ #ifdef WIN32 |
129 |
+ #include <windows.h> |
130 |
+ #include <malloc.h> |
131 |
+-#ifdef _WIN32_WCE |
132 |
+ #define strcasecmp _stricmp |
133 |
+ #define strncasecmp _strnicmp |
134 |
+ #else |
135 |
+-#define strcasecmp _stricmp |
136 |
+-#define strncasecmp _strnicmp |
137 |
+-#endif |
138 |
+-#else |
139 |
+ /* basic Linux system includes */ |
140 |
+ #define _XOPEN_SOURCE 500 |
141 |
+ #include <unistd.h> |
142 |
+-- |
143 |
+2.37.4 |
144 |
+ |