testing/newsbeuter: Remove iconv translit references

This commit is contained in:
V.Krishn 2015-04-09 23:10:48 +00:00 committed by Natanael Copa
parent 3e44dbc76b
commit 6d6d11d6da
2 changed files with 66 additions and 5 deletions

View File

@ -0,0 +1,56 @@
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
--- a/src/stflpp.cpp
+++ b/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
--- a/src/utils.cpp
+++ b/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 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newsbeuter
pkgver=2.9
pkgrel=0
pkgrel=1
pkgdesc="Configurable text-based feed reader"
url="http://newsbeuter.org/"
arch="all"
@ -12,7 +12,9 @@ makedepends="$depends_dev json-c-dev curl-dev ncurses-dev sqlite-dev
stfl-dev libxml2-dev gettext-dev perl"
install=""
subpackages="$pkgname-doc $pkgname-lang"
source="http://newsbeuter.org/downloads/newsbeuter-$pkgver.tar.gz"
source="http://newsbeuter.org/downloads/newsbeuter-$pkgver.tar.gz
0001-Remove-iconv-translit-references.patch
"
_builddir="$srcdir"/newsbeuter-$pkgver
prepare() {
@ -40,6 +42,9 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
md5sums="9cf332dc7e591023147bda7add430835 newsbeuter-2.9.tar.gz"
sha256sums="74a8bf019b09c3b270ba95adc29f2bbe48ea1f55cc0634276b21fcce1f043dc8 newsbeuter-2.9.tar.gz"
sha512sums="b173008c8c8d3729f8ccef3ce62645a05c1803fb842d5c0afdf9ffd4ed3726030f9c359c20bc817402a6a0ea12af742d0ae7faf9b92d52c11f420f62b430b0aa newsbeuter-2.9.tar.gz"
md5sums="9cf332dc7e591023147bda7add430835 newsbeuter-2.9.tar.gz
2d158695303d3605425d5b30465408b8 0001-Remove-iconv-translit-references.patch"
sha256sums="74a8bf019b09c3b270ba95adc29f2bbe48ea1f55cc0634276b21fcce1f043dc8 newsbeuter-2.9.tar.gz
122613fd512a17f938d98ceb5aa3a1a9ddcff7dc4e7ac640e490637d2f645ba9 0001-Remove-iconv-translit-references.patch"
sha512sums="b173008c8c8d3729f8ccef3ce62645a05c1803fb842d5c0afdf9ffd4ed3726030f9c359c20bc817402a6a0ea12af742d0ae7faf9b92d52c11f420f62b430b0aa newsbeuter-2.9.tar.gz
1cfbe93cd8ca5785b1c26ccfdf1ed467700046c8ca564f33752b0f04f91d37765f83bf82ad593eae41532edf79a8f6992283255f9a2aa8293d14728b175c9dd7 0001-Remove-iconv-translit-references.patch"