From: Hauke Mehrtens Date: Sun, 6 Dec 2015 23:04:02 +0000 (+0100) Subject: qt5base: activate iconv support when libiconv-full is avaliable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f8cd9c3589534a57f265543f9c58e6ad40c1ff32;p=feed%2Fvideo.git qt5base: activate iconv support when libiconv-full is avaliable Signed-off-by: Hauke Mehrtens --- diff --git a/frameworks/qt5base/Makefile b/frameworks/qt5base/Makefile index 810ae54..f77cca2 100644 --- a/frameworks/qt5base/Makefile +++ b/frameworks/qt5base/Makefile @@ -38,7 +38,8 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_qt5base-gui \ CONFIG_PACKAGE_qt5base-plugin-imageformats-gif \ CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \ - CONFIG_PACKAGE_qt5base-plugin-platforms-minimal + CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \ + CONFIG_PACKAGE_libiconv-full define Package/qt5base/Default SECTION:=video-frameworks @@ -65,7 +66,7 @@ endef define Package/qt5base-core $(call Package/qt5base/Default) TITLE+=core - DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt + DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt +PACKAGE_libiconv-full:libiconv-full endef define Package/qt5base-gui @@ -304,7 +305,7 @@ define Build/Configure -widgets \ -no-optimized-qmake \ -no-cups \ - -no-iconv \ + $(if $(CONFIG_PACKAGE_libiconv-full),-iconv,-no-iconv) \ -evdev \ -no-icu \ -fontconfig \ diff --git a/frameworks/qt5base/patches/010-iconv-cast.patch b/frameworks/qt5base/patches/010-iconv-cast.patch new file mode 100644 index 0000000..c44daf1 --- /dev/null +++ b/frameworks/qt5base/patches/010-iconv-cast.patch @@ -0,0 +1,43 @@ +--- a/src/corelib/codecs/qiconvcodec.cpp ++++ b/src/corelib/codecs/qiconvcodec.cpp +@@ -137,7 +137,7 @@ QIconvCodec::IconvState::IconvState(icon + + QIconvCodec::IconvState::~IconvState() + { +- if (cd != reinterpret_cast(-1)) ++ if (cd != (iconv_t)-1) + iconv_close(cd); + if (buffer != array) + delete[] buffer; +@@ -200,7 +200,7 @@ QString QIconvCodec::convertToUnicode(co + if (!*pstate) { + // first time, create the state + iconv_t cd = createIconv_t(UTF16, 0); +- if (cd == reinterpret_cast(-1)) { ++ if (cd == (iconv_t)-1) { + static int reported = 0; + if (!reported++) { + fprintf(stderr, +@@ -345,19 +345,19 @@ QByteArray QIconvCodec::convertFromUnico + IconvState *&state = ts ? ts->localData() : temporaryState; + if (!state) { + iconv_t cd = createIconv_t(0, UTF16); +- if (cd != reinterpret_cast(-1)) { ++ if (cd != (iconv_t)-1) { + if (!setByteOrder(cd)) { + perror("QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed for BOM"); + + iconv_close(cd); +- cd = reinterpret_cast(-1); ++ cd = (iconv_t)-1; + + return QString(uc, len).toLatin1(); + } + } + state = new IconvState(cd); + } +- if (state->cd == reinterpret_cast(-1)) { ++ if (state->cd == (iconv_t)-1) { + static int reported = 0; + if (!reported++) { + fprintf(stderr,