Newsbeuter: remove transliteration to fix musl (#6392)

This commit is contained in:
Pavel Kiselev 2017-05-17 01:46:16 +03:00 committed by Juan RP
parent 77aaab5aa8
commit 93b4b68bcb
2 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,55 @@
From 12551d798f145d5dc5b4f910914f95f2c0492428 Mon Sep 17 00:00:00 2001
From: "V.Krishn" <vkrishn4@gmail.com>
Date: Fri, 10 Apr 2015 04:00:33 +0530
Subject: [PATCH] Remove iconv translit references
---
src/stflpp.cpp | 4 ++--
src/utils.cpp | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/stflpp.cpp b/src/stflpp.cpp
index fb6dcae..7893679 100644
--- src/stflpp.cpp
+++ src/stflpp.cpp
@@ -16,7 +16,7 @@ namespace newsbeuter {
*/
stfl::form::form(const std::string& text) : f(0) {
- ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET)) + "//TRANSLIT").c_str());
+ ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET))).c_str());
if (!ipool) {
throw exception(errno);
}
@@ -82,7 +82,7 @@ static std::mutex quote_mtx;
std::string stfl::quote(const std::string& text) {
std::lock_guard<std::mutex> lock(quote_mtx);
- stfl_ipool * ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET)) + "//TRANSLIT").c_str());
+ stfl_ipool * ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET))).c_str());
std::string retval = stfl_ipool_fromwc(ipool,stfl_quote(stfl_ipool_towc(ipool,text.c_str())));
stfl_ipool_destroy(ipool);
return retval;
diff --git a/src/utils.cpp b/src/utils.cpp
index ce4b36b..67d780c 100644
--- src/utils.cpp
+++ src/utils.cpp
@@ -262,7 +262,7 @@ std::string utils::convert_text(const std::string& text, const std::string& toco
if (strcasecmp(tocode.c_str(), fromcode.c_str())==0)
return text;
- iconv_t cd = ::iconv_open((tocode + "//TRANSLIT").c_str(), fromcode.c_str());
+ iconv_t cd = ::iconv_open((tocode).c_str(), fromcode.c_str());
if (cd == reinterpret_cast<iconv_t>(-1))
return result;
@@ -498,7 +498,6 @@ std::wstring utils::str2wstr(const std::string& str) {
std::string utils::wstr2str(const std::wstring& wstr) {
std::string codeset = nl_langinfo(CODESET);
- codeset.append("//TRANSLIT");
struct stfl_ipool * ipool = stfl_ipool_create(codeset.c_str());
std::string result = stfl_ipool_fromwc(ipool, wstr.c_str());
stfl_ipool_destroy(ipool);
--
1.7.10.4

View file

@ -1,7 +1,7 @@
# Template file for 'newsbeuter'
pkgname=newsbeuter
version=r2.9
revision=8
revision=9
hostmakedepends="pkg-config perl"
makedepends="stfl-devel json-c-devel libxml2-devel libcurl-devel sqlite-devel libressl-devel"
short_desc="Newsbeuter is the Mutt of RSS feed readers"
@ -19,4 +19,5 @@ do_build() {
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
vlicense LICENSE
}