Patchwork [3/3] qt4-4.7.3: add translations'support

login
register
mail settings
Submitter Eric BENARD
Date May 12, 2011, 9:31 p.m.
Message ID <1305235863-16025-4-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/3903/
State Superseded
Headers show

Comments

Eric BENARD - May 12, 2011, 9:31 p.m.
this patch should bring back translations support in qt4.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
it's currently build tested for qt4-embedded.
---
 recipes/qt4/qt-4.7.3.inc                    |   14 ++++----------
 recipes/qt4/qt-4.7.3/fix-translations.patch |   22 ++++++++++++++++++++++
 recipes/qt4/qt4-embedded.inc                |    2 +-
 recipes/qt4/qt4-x11-free.inc                |    2 +-
 4 files changed, 28 insertions(+), 12 deletions(-)
 create mode 100644 recipes/qt4/qt-4.7.3/fix-translations.patch
Otavio Salvador - May 12, 2011, 9:42 p.m.
On Thu, May 12, 2011 at 18:31, Eric Bénard <eric@eukrea.com> wrote:
> this patch should bring back translations support in qt4.
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Eric BENARD - May 13, 2011, 9 a.m.
Hi,

On 12/05/2011 23:31, Eric Bénard wrote:
> this patch should bring back translations support in qt4.
>
> Signed-off-by: Eric Bénard<eric@eukrea.com>
> ---
> it's currently build tested for qt4-embedded.
> ---

forget this patch it still contains an error.

Eric

Patch

diff --git a/recipes/qt4/qt-4.7.3.inc b/recipes/qt4/qt-4.7.3.inc
index 4e9c96a..4dfebd1 100644
--- a/recipes/qt4/qt-4.7.3.inc
+++ b/recipes/qt4/qt-4.7.3.inc
@@ -10,9 +10,11 @@  SRC_URI = "\
 	file://0006-freetype-host-includes.patch \
 	file://0001-Added-Openembedded-crossarch-option.patch \
 	file://0010-phonon-gstreamer-rgb-endianess.patch \
+	file://fix-translations.patch \
 	file://g++.conf \
 	file://linux.conf \
-           "
+	"
+
 # Set necessary variables in the profile
 SRC_URI += "file://qte.sh"
 
@@ -22,7 +24,7 @@  FILES_${QT_BASE_NAME}-tools                += "${bindir}/qml"
 
 do_configure_prepend() {
     for pro in $(find ${S} -name "*.pro") ; do
-        sed -i 's:$$QT_BUILD_TREE/bin/lrelease:${OE_QMAKE_LRELEASE}:g' $pro
+        sed -i 's:$$LRELEASE:${STAGING_BINDIR_NATIVE}/lrelease4:g' $pro
     done
 
     sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf
@@ -34,10 +36,6 @@  do_configure_prepend() {
     ${S}/configure
 }
 
-do_configure_append() {
-    sed -e '/QMAKE_TARGET /d' -e '/TARGET /d' -i ${S}/translations/Makefile
-}
-
 QT_GLFLAGS ?= ""
 QT_CONFIG_FLAGS += " -javascript-jit -script -scripttools -declarative -xmlpatterns -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}"
 
@@ -48,10 +46,6 @@  do_compile() {
     fi
 
     unset CFLAGS CXXFLAGS
-    install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
-    install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
-    install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
-    install -m 0755 ${STAGING_BINDIR_NATIVE}/lrelease4 ${S}/bin/lrelease
 
     oe_runmake ${EXTRA_ENV}
 }
diff --git a/recipes/qt4/qt-4.7.3/fix-translations.patch b/recipes/qt4/qt-4.7.3/fix-translations.patch
new file mode 100644
index 0000000..5994775
--- /dev/null
+++ b/recipes/qt4/qt-4.7.3/fix-translations.patch
@@ -0,0 +1,22 @@ 
+diff --git a/translations/translations.pro b/translations/translations.pro
+index cdaf04a..24fa668 100644
+--- a/translations/translations.pro
++++ b/translations/translations.pro
+@@ -20,7 +20,7 @@ updateqm.name = LRELEASE ${QMAKE_FILE_IN}
+ updateqm.CONFIG += no_link
+ QMAKE_EXTRA_COMPILERS += updateqm
+ 
+-isEmpty(vcproj) {
++!isEmpty(vcproj) {
+     QMAKE_LINK = @: IGNORE THIS LINE
+     OBJECTS_DIR =
+     win32:CONFIG -= embed_manifest_exe
+@@ -30,7 +30,7 @@ isEmpty(vcproj) {
+     phony_src.input = PHONY_DEPS
+     phony_src.output = phony.c
+     phony_src.variable_out = GENERATED_SOURCES
+-    phony_src.commands = echo int main() { return 0; } > phony.c
++    phony_src.commands = echo "int main() { return 0\; }" > phony.c
+     phony_src.name = CREATE phony.c
+     phony_src.CONFIG += combine
+     QMAKE_EXTRA_COMPILERS += phony_src
diff --git a/recipes/qt4/qt4-embedded.inc b/recipes/qt4/qt4-embedded.inc
index af9d545..79ce005 100644
--- a/recipes/qt4/qt4-embedded.inc
+++ b/recipes/qt4/qt4-embedded.inc
@@ -4,7 +4,7 @@  LICENSE = "GPL QPL"
 PRIORITY = "optional"
 HOMEPAGE = "http://www.trolltech.com"
 DEPENDS += "directfb tslib"
-INC_PR = "r28"
+INC_PR = "r29"
 
 QT_BASE_NAME ?= "qt4-embedded"
 QT_BASE_LIB  ?= "libqt-embedded"
diff --git a/recipes/qt4/qt4-x11-free.inc b/recipes/qt4/qt4-x11-free.inc
index c407422..f63c9d2 100644
--- a/recipes/qt4/qt4-x11-free.inc
+++ b/recipes/qt4/qt4-x11-free.inc
@@ -5,7 +5,7 @@  HOMEPAGE = "http://www.trolltech.com"
 LICENSE = "GPL QPL"
 DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
 
-INC_PR = "r24"
+INC_PR = "r25"
 
 SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
            file://0001-cross-compile.patch \