qt 4.7.3 translation support
Hi,
this patch should bring translation support to the qt 4.7.3 patchset posted yesterday. It's currently only build tested for at4-embedded on armv5 so please test it and report any problem to the list.
Thanks
Eric
PATCH 1/3 qt4-native: also build lrelease
as this is nedded to build translations files
--- recipes/qt4/qt4-native.inc | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
recipes/qt4/qt4-native.inc +2 -1
@@ -6,7 +6,7 @@ PRIORITY = "optional" LICENSE = "GPL" PROVIDES = "qt4-tools-native" -INC_PR = "r0" +INC_PR = "r1" inherit native
@@ -51,6 +51,7 @@ TOBUILD = "\ src/gui \ src/testlib \ src/qt3support \ + tools/linguist/lrelease \ " do_compile() {
Signature · 1 line
1.7.0.4
Re: [PATCH 1/3] qt4-native: also build lrelease
Quoted 3 lines · Eric Bénard
as this is nedded to build translations files
Signed-off-by Eric Bénard <[email protected]>
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH 2/3 qt4.inc: give the right name to variable qmake will use
In reply to Eric Bénardthis should prevent to have to manually copy binaries for the build system built by qt4-native to the source tree when cross compiling qt.
--- recipes/qt4/qt4.inc | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
recipes/qt4/qt4.inc +3 -2
@@ -17,8 +17,9 @@ EXTRA_OEMAKE = "-e" EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \ INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \ QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \ - AR="${TARGET_PREFIX}ar cqs" \ - MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' + AR="${TARGET_PREFIX}ar cqs" QMAKE_LRELEASE="${STAGING_BINDIR_NATIVE}/lrelease4" \ + QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4" QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4" \ + QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' export QT_CONF_PATH="${WORKDIR}/qt.conf"
Signature · 1 line
1.7.0.4
Re: [PATCH 2/3] qt4.inc: give the right name to variable qmake will use
Quoted 2 lines · Eric Bénard
this should prevent to have to manually copy binaries for the build system built by qt4-native to the source tree when cross compiling qt.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH 3/3 qt4-4.7.3: add translations'support
In reply to Eric Bénardthis patch should bring back translations support in qt4.
---
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
recipes/qt4/qt-4.7.3.inc +4 -10
@@ -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} }
recipes/qt4/qt-4.7.3/fix-translations.patch new file +22 -0
@@ -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
recipes/qt4/qt4-embedded.inc +1 -1
@@ -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"
recipes/qt4/qt4-x11-free.inc +1 -1
@@ -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 \
Signature · 1 line
1.7.0.4
Re: [PATCH 3/3] qt4-4.7.3: add translations'support
Quoted 3 lines · Eric Bénard
this patch should bring back translations support in qt4.
Signed-off-by Eric Bénard <[email protected]>
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Re: [PATCH 3/3] qt4-4.7.3: add translations'support
In reply to Eric BénardHi,
Quoted 6 lines · Eric Bénard
this patch should bring back translations support in qt4.
Signed-off-by Eric Bénard<[email protected]>---
it's currently build tested for qt4-embedded.
---
forget this patch it still contains an error.
Eric
PATCH v2 3/3 qt4-4.7.3: add translations'support
In reply to Eric Bénardthis patch should bring back translations support in qt4.
---
v2 : build tested for qt4-embedded and qt4-x11-free
--- 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
recipes/qt4/qt-4.7.3.inc +4 -10
@@ -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} }
recipes/qt4/qt-4.7.3/fix-translations.patch new file +22 -0
@@ -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
recipes/qt4/qt4-embedded.inc +1 -1
@@ -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"
recipes/qt4/qt4-x11-free.inc +1 -1
@@ -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 \
Signature · 1 line
1.7.0.4