From c11676602622fd25323682d41237ddba5433d7d1 Mon Sep 17 00:00:00 2001 From: Andrew Savchenko Date: Mon, 5 Dec 2016 13:58:02 +0300 Subject: app-text/stardict: fix whitespace handling in tabfile tool Patch by Nikolay Korotkiy , git commit adb01aafd94b6bd5b5cc49889f4f09d483ee5ac4 from https://github.com/sikmir/stardict-3.git repository. Package-Manager: portage-2.3.2 Signed-off-by: Andrew Savchenko --- .../files/stardict-4.0.0_pre20160518-tabfile.patch | 38 ++++++++++++++++++++++ .../stardict/stardict-4.0.0_pre20160518.ebuild | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 app-text/stardict/files/stardict-4.0.0_pre20160518-tabfile.patch (limited to 'app-text/stardict') 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 new file mode 100644 index 000000000000..49cb284253af --- /dev/null +++ b/app-text/stardict/files/stardict-4.0.0_pre20160518-tabfile.patch @@ -0,0 +1,38 @@ +From adb01aafd94b6bd5b5cc49889f4f09d483ee5ac4 Mon Sep 17 00:00:00 2001 +From: Nikolay Korotkiy +Date: Thu, 1 Sep 2016 14:11:41 +0300 +Subject: [PATCH] tabfile: incorrectly handles whitespace in file name + +Signed-off-by: Andrew Savchenko +--- + tools/src/libtabfile.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tools/src/libtabfile.cpp b/tools/src/libtabfile.cpp +index dda256a..2ee9dfd 100644 +--- a/tools/src/libtabfile.cpp ++++ b/tools/src/libtabfile.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -228,9 +229,10 @@ static bool write_dictionary(const char *filename, GArray *array) + g_message("%s wordcount: %d.", get_impl(basefilename), array->len); + + #ifndef _WIN32 +- std::string command(std::string("dictzip ") + dicfilename); ++ std::stringstream command; ++ command << "dictzip \"" << dicfilename << "\""; + int result; +- result = system(command.c_str()); ++ result = system(command.str().c_str()); + if (result == -1) { + g_print("system() error!\n"); + } +-- +2.10.2 + diff --git a/app-text/stardict/stardict-4.0.0_pre20160518.ebuild b/app-text/stardict/stardict-4.0.0_pre20160518.ebuild index da192f90a8bc..5a09f9995816 100644 --- a/app-text/stardict/stardict-4.0.0_pre20160518.ebuild +++ b/app-text/stardict/stardict-4.0.0_pre20160518.ebuild @@ -69,6 +69,8 @@ REQUIRED_USE="tools? ( python? ( ${PYTHON_REQUIRED_USE} ) )" # docs are messy, installed manually below DOCS="" +PATCHES=( "${FILESDIR}/${P}-tabfile.patch" ) + src_prepare() { # From Fedora # Remove unneeded sigc++ header files to make it sure -- cgit v1.2.3