qt5base: fix nls support
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 10 Dec 2015 21:28:38 +0000 (22:28 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 10 Dec 2015 22:22:42 +0000 (23:22 +0100)
Instead of hard coding the dependency to libiconv-full use the macros
provided by OpenWrt. In the gnu iconv library the second parameter of
iconv(), often called inbuf, is not const, but qt5 assumes that it is
in the gnu version of libiconv. If we make qt5 use the code for the
posix version of libiconv it does not add the -liconv link parameter.
This patch adds the -liconv link parameter.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
frameworks/qt5base/Makefile
frameworks/qt5base/patches/011-use-posix-iconv.patch [new file with mode: 0644]

index 0539480f045017cbe75067b072c2df751eaf46d1..874ea301a74f7e85b028158850f63c1aa5b4d202 100644 (file)
@@ -38,8 +38,7 @@ 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_libiconv-full
+       CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
 
 define Package/qt5base/Default
   SECTION:=video-frameworks
@@ -66,7 +65,7 @@ endef
 define Package/qt5base-core
   $(call Package/qt5base/Default)
   TITLE+=core
-  DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt +PACKAGE_libiconv-full:libiconv-full
+  DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt $(ICONV_DEPENDS)
 endef
 
 define Package/qt5base-gui
@@ -305,7 +304,7 @@ define Build/Configure
                        -widgets \
                        -no-optimized-qmake \
                        -no-cups \
-                       $(if $(CONFIG_PACKAGE_libiconv-full),-iconv,-no-iconv) \
+                       $(if $(CONFIG_BUILD_NLS),-iconv,-no-iconv) \
                        -evdev \
                        -no-icu \
                        -fontconfig \
diff --git a/frameworks/qt5base/patches/011-use-posix-iconv.patch b/frameworks/qt5base/patches/011-use-posix-iconv.patch
new file mode 100644 (file)
index 0000000..23e4f85
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.tests/unix/iconv/iconv.pro
++++ b/config.tests/unix/iconv/iconv.pro
+@@ -1,3 +1,3 @@
+ SOURCES = iconv.cpp
+ CONFIG -= qt dylib
+-mac|mingw|qnx:LIBS += -liconv
++mac|mingw|qnx|linux:LIBS += -liconv
+--- a/src/corelib/codecs/codecs.pri
++++ b/src/corelib/codecs/codecs.pri
+@@ -44,6 +44,7 @@ contains(QT_CONFIG,icu) {
+             contains(QT_CONFIG,iconv) {
+                     HEADERS += codecs/qiconvcodec_p.h
+                     SOURCES += codecs/qiconvcodec.cpp
++                    LIBS_PRIVATE *= -liconv
+             } else:contains(QT_CONFIG,gnu-libiconv) {
+                     HEADERS += codecs/qiconvcodec_p.h
+                     SOURCES += codecs/qiconvcodec.cpp