1 |
commit: c11676602622fd25323682d41237ddba5433d7d1 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 5 10:58:02 2016 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 5 12:06:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1167660 |
7 |
|
8 |
app-text/stardict: fix whitespace handling in tabfile tool |
9 |
|
10 |
Patch by Nikolay Korotkiy <sikmir <AT> gmail.com>, |
11 |
git commit adb01aafd94b6bd5b5cc49889f4f09d483ee5ac4 from |
12 |
https://github.com/sikmir/stardict-3.git repository. |
13 |
|
14 |
Package-Manager: portage-2.3.2 |
15 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
16 |
|
17 |
.../files/stardict-4.0.0_pre20160518-tabfile.patch | 38 ++++++++++++++++++++++ |
18 |
.../stardict/stardict-4.0.0_pre20160518.ebuild | 2 ++ |
19 |
2 files changed, 40 insertions(+) |
20 |
|
21 |
diff --git a/app-text/stardict/files/stardict-4.0.0_pre20160518-tabfile.patch b/app-text/stardict/files/stardict-4.0.0_pre20160518-tabfile.patch |
22 |
new file mode 100644 |
23 |
index 00000000..49cb284 |
24 |
--- /dev/null |
25 |
+++ b/app-text/stardict/files/stardict-4.0.0_pre20160518-tabfile.patch |
26 |
@@ -0,0 +1,38 @@ |
27 |
+From adb01aafd94b6bd5b5cc49889f4f09d483ee5ac4 Mon Sep 17 00:00:00 2001 |
28 |
+From: Nikolay Korotkiy <sikmir@×××××.com> |
29 |
+Date: Thu, 1 Sep 2016 14:11:41 +0300 |
30 |
+Subject: [PATCH] tabfile: incorrectly handles whitespace in file name |
31 |
+ |
32 |
+Signed-off-by: Andrew Savchenko <bircoph@×××××.com> |
33 |
+--- |
34 |
+ tools/src/libtabfile.cpp | 6 ++++-- |
35 |
+ 1 file changed, 4 insertions(+), 2 deletions(-) |
36 |
+ |
37 |
+diff --git a/tools/src/libtabfile.cpp b/tools/src/libtabfile.cpp |
38 |
+index dda256a..2ee9dfd 100644 |
39 |
+--- a/tools/src/libtabfile.cpp |
40 |
++++ b/tools/src/libtabfile.cpp |
41 |
+@@ -22,6 +22,7 @@ |
42 |
+ #include <cstring> |
43 |
+ #include <cstdlib> |
44 |
+ #include <string> |
45 |
++#include <sstream> |
46 |
+ #include <glib/gstdio.h> |
47 |
+ #include <glib.h> |
48 |
+ |
49 |
+@@ -228,9 +229,10 @@ static bool write_dictionary(const char *filename, GArray *array) |
50 |
+ g_message("%s wordcount: %d.", get_impl(basefilename), array->len); |
51 |
+ |
52 |
+ #ifndef _WIN32 |
53 |
+- std::string command(std::string("dictzip ") + dicfilename); |
54 |
++ std::stringstream command; |
55 |
++ command << "dictzip \"" << dicfilename << "\""; |
56 |
+ int result; |
57 |
+- result = system(command.c_str()); |
58 |
++ result = system(command.str().c_str()); |
59 |
+ if (result == -1) { |
60 |
+ g_print("system() error!\n"); |
61 |
+ } |
62 |
+-- |
63 |
+2.10.2 |
64 |
+ |
65 |
|
66 |
diff --git a/app-text/stardict/stardict-4.0.0_pre20160518.ebuild b/app-text/stardict/stardict-4.0.0_pre20160518.ebuild |
67 |
index da192f9..5a09f99 100644 |
68 |
--- a/app-text/stardict/stardict-4.0.0_pre20160518.ebuild |
69 |
+++ b/app-text/stardict/stardict-4.0.0_pre20160518.ebuild |
70 |
@@ -69,6 +69,8 @@ REQUIRED_USE="tools? ( python? ( ${PYTHON_REQUIRED_USE} ) )" |
71 |
# docs are messy, installed manually below |
72 |
DOCS="" |
73 |
|
74 |
+PATCHES=( "${FILESDIR}/${P}-tabfile.patch" ) |
75 |
+ |
76 |
src_prepare() { |
77 |
# From Fedora |
78 |
# Remove unneeded sigc++ header files to make it sure |