commit:     1fec602e63cd09995570cc551bb073ffd68252e1
Author:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 10:46:11 2023 +0000
Commit:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 10:46:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fec602e

app-text/crwx-ng: compilation fixes

Closes: https://bugs.gentoo.org/888561
Closes: https://bugs.gentoo.org/888551
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>

 app-text/crwx-ng/crwx-ng-0.2.0-r2.ebuild   | 23 +++++++++++
 app-text/crwx-ng/files/crwx-ng-0.2.0.patch | 62 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/app-text/crwx-ng/crwx-ng-0.2.0-r2.ebuild 
b/app-text/crwx-ng/crwx-ng-0.2.0-r2.ebuild
new file mode 100644
index 000000000000..c362c9d43f6d
--- /dev/null
+++ b/app-text/crwx-ng/crwx-ng-0.2.0-r2.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.0-gtk3"
+inherit cmake wxwidgets
+
+DESCRIPTION="Cross-platform e-book reader"
+HOMEPAGE="https://gitlab.com/coolreader-ng/crwx-ng";
+SRC_URI="https://gitlab.com/coolreader-ng/${PN}/-/archive/${PV}/${P}.tar.bz2";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+gif +svg +chm +harfbuzz +libunibreak +fribidi +zstd +libutf8proc"
+
+CDEPEND=">=app-text/crengine-ng-0.9.3[png,jpeg,fontconfig,gif=,svg=,chm=,harfbuzz=,fribidi=,zstd=,libutf8proc=]
+       x11-libs/wxGTK:${WX_GTK_VER}[X]"
+BDEPEND="${CDEPEND}"
+RDEPEND="${CDEPEND}
+       virtual/ttf-fonts"
+
+PATCHES=( "${FILESDIR}"/${P}.patch )

diff --git a/app-text/crwx-ng/files/crwx-ng-0.2.0.patch 
b/app-text/crwx-ng/files/crwx-ng-0.2.0.patch
new file mode 100644
index 000000000000..f754ceb88d0b
--- /dev/null
+++ b/app-text/crwx-ng/files/crwx-ng-0.2.0.patch
@@ -0,0 +1,62 @@
+From 146f22a7c56a3402c75b4a51b8b1940144dfd9fd Mon Sep 17 00:00:00 2001
+From: Aleksey Chernov <[email protected]>
+Date: Tue, 27 Dec 2022 10:11:16 +0400
+Subject: [PATCH] Compile error/warn fixed.
+
+---
+ src/cr3.cpp | 25 +++++++++++--------------
+ 1 file changed, 11 insertions(+), 14 deletions(-)
+
+diff --git a/src/cr3.cpp b/src/cr3.cpp
+index 19d5c4a..00e733b 100644
+--- a/src/cr3.cpp
++++ b/src/cr3.cpp
+@@ -341,14 +341,17 @@ void testFormatting() {
+         LFormattedText txt;
+         void addLine(const lChar32* str, int flags, LVFontRef font) {
+             lString32 s(str);
+-            txt.AddSourceLine(s.c_str(),       /* pointer to unicode text 
string */
+-                              s.length(),      /* number of chars in text, 0 
for auto(strlen) */
+-                              0x000000,        /* text color */
+-                              0xFFFFFF,        /* background color */
+-                              font.get(),      /* font to draw string */
+-                              NULL, flags, 16, /* interline space, *16 
(16=single, 32=double) */
+-                              30,              /* first line margin */
+-                              NULL, 0);
++            txt.AddSourceLine(s.c_str(),  /* pointer to unicode text string */
++                              s.length(), /* number of chars in text, 0 for 
auto(strlen) */
++                              0x000000,   /* text color */
++                              0xFFFFFF,   /* background color */
++                              font.get(), /* font to draw string */
++                              NULL,       /* pointer to text lang config */
++                              flags,      /* flags */
++                              16,         /* line height in screen pixels; 
*16 (16=single, 32=double) */
++                              0,          /* drift y from baseline */
++                              30,         /* first line margin */
++                              NULL, 0, 0);
+         }
+         void dump() {
+             formatted_text_fragment_t* buf = txt.GetBuffer();
+@@ -1380,9 +1383,6 @@ void cr3Frame::OnFileOpen(wxCommandEvent& 
WXUNUSED(event)) {
+             wxT(""), //const wxString& defaultFile = "",
+             wxT("All supported 
files|*.fb2;*.fbz;*.txt;*.zip;*.rtf;*.epub;*.tcr;*.html;*.htm;*.shtml;*.xhtml|FictionBook
 files (*.fb2)|*.fb2;*.fbz|RTF files (*.rtf)|*.rtf|Text files (*.txt, 
*.tcr)|*.txt;*.tcr|HTML files|*.html;*.htm;*.shtml;*.xhtml|EPUB files 
(*.epub)|*.epub|ZIP archieves (*.zip)|*.zip"), //const wxString& wildcard = 
"*.*",
+             wxFD_OPEN | wxFD_FILE_MUST_EXIST //long style = 
wxFD_DEFAULT_STYLE,
+-            //const wxPoint& pos = wxDefaultPosition,
+-            //const wxSize& sz = wxDefaultSize,
+-            //const wxString& name = "filedlg"
+     );
+ 
+     if (dlg.ShowModal() == wxID_OK) {
+@@ -1410,9 +1410,6 @@ void cr3Frame::OnFileSave(wxCommandEvent& 
WXUNUSED(event)) {
+                      wxT(""),                               //const wxString& 
defaultFile = "",
+                      wxT("Wolf EBook files (*.wol)|*.wol"), //const wxString& 
wildcard = "*.*",
+                      wxFD_SAVE | wxFD_OVERWRITE_PROMPT      //long style = 
wxFD_DEFAULT_STYLE,
+-                     //const wxPoint& pos = wxDefaultPosition,
+-                     //const wxSize& sz = wxDefaultSize,
+-                     //const wxString& name = "filedlg"
+     );
+     WolOptions opts(this);
+     if (dlg.ShowModal() == wxID_OK && opts.ShowModal() == wxID_OK) {
+-- 
+2.38.2
+

Reply via email to