Skip to contentSkip to conversation

cmake: Add ugly hack from meta-qt5 to prevent cmake trying to detect qt5

PATCH In review Martin Jansa 2 participants 7 messages Apr 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 cmake: Add ugly hack from meta-qt5 to prevent cmake trying to detect qt5

* cmake doesn't have dependency on qt4/qt5, so these tests usually fail but still can cause undeterministic results or build failures (when OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed while running the test in cmake)

---
 meta/recipes-devtools/cmake/cmake.inc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
meta/recipes-devtools/cmake/cmake.inc +22 -0
index 1d5303f..a0fcf49 100644
@@ -21,6 +21,28 @@ SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz
 
 inherit autotools-brokensep
 
+# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
+# and possibly missing qmake binary (qtbase-native can be removed from sysroot
+# e.g. in order to upgrade it, even when there is target qtbase)
+
+# Fixes errors like this in cmake(-native).do_configure:
+#| -- Performing Test run_pic_test - Success
+#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
+#|   The imported target "Qt5::Core" references the file
+#|
+#|      "/qmake"
+#|
+#|   but this file does not exist.  Possible reasons include:
+
+do_configure_prepend() {
+	sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
+	sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutomoc/CMakeLists.txt
+	sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
+	sed -i 's/^  find_package(Qt5Widgets QUIET NO_MODULE)/#  find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
+	sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
+}
+
 do_configure () {
 	./configure --prefix=${prefix}
 }
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/5 ed: remove infodir

* unlike 0.5 version, this doesn't use autotools.bbclass which removes infodir automatically
* fixes QA warning:
ed-1.9: The /usr/share/info/dir file is not meant to be shipped in a particular package.

---
 meta/recipes-extended/ed/ed_1.9.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-extended/ed/ed_1.9.bb +4 -0
index 8ae99cc..d162154 100644
@@ -22,4 +22,8 @@ do_configure() {
 
 do_install() {
 	oe_runmake 'DESTDIR=${D}' install
+	# Info dir listing isn't interesting at this point so remove it if it exists.
+	if [ -e "${D}${infodir}/dir" ]; then
+		rm -f ${D}${infodir}/dir
+	fi
 }
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/5 gcc-target: remove infodir

In reply to Martin Jansa

* it uses autotools but doesn't call autotools_do_install
* fixes QA warning:
gcc-4.8.2: The /usr/share/info/dir file is not meant to be shipped in a particular package.

---
 meta/recipes-devtools/gcc/gcc-target.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/gcc/gcc-target.inc +4 -0
index e1179ac..3412aa8 100644
@@ -104,6 +104,10 @@ FILES_${PN}-doc = "\
 
 do_install () {
 	oe_runmake 'DESTDIR=${D}' install-host
+	# Info dir listing isn't interesting at this point so remove it if it exists.
+	if [ -e "${D}${infodir}/dir" ]; then
+		rm -f ${D}${infodir}/dir
+	fi
 
 	# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
 	rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 3/5] gcc-target: remove infodir

meta/recipes-devtools/gcc/gcc-target.inc FILES_${PN}-doc = "\ · line 110

Quoted 4 lines · Martin Jansa
meta/recipes-devtools/gcc/gcc-target.inc +4 -0
+       # Info dir listing isn't interesting at this point so remove it if it exists.
+       if [ -e "${D}${infodir}/dir" ]; then
+               rm -f ${D}${infodir}/dir
+       fi

why check if it exists when you are already using rm -f ?

#4 lore raw

Re: [PATCH 3/5] gcc-target: remove infodir

Quoted 7 lines · Khem Raj

meta/recipes-devtools/gcc/gcc-target.inc FILES_${PN}-doc = "\ · line 110

Quoted 4 lines · Martin Jansa
meta/recipes-devtools/gcc/gcc-target.inc +4 -0
+       # Info dir listing isn't interesting at this point so remove it if it exists.
+       if [ -e "${D}${infodir}/dir" ]; then
+               rm -f ${D}${infodir}/dir
+       fi

why check if it exists when you are already using rm -f ?

Just because I was copying snippet from autotools.bbclass

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw

PATCH 4/5 Revert "qt-mobility: remove /usr/lib from ld rpath-link option"

In reply to Martin Jansa

* Basically part of the headers/libs are installed in ${D}(${libdir}/${includedir}) instead of ${D}(${libdir}/${includedir})/qt4

* http://lists.openembedded.org/pipermail/openembedded-core/2013-October/085815.html
is related, but doesn't fix the issue completely, so better
revert the commit which introduced this issue

[YOCTO #5414]

This reverts commit f7409a9fe83ba2535a43f39ed57cd78242a88557.

---
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc | 6 ------
 1 file changed, 6 deletions(-)
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +0 -6
index 72d361e..ff63d2b 100644
@@ -91,12 +91,6 @@ EOF
 	echo CONFIG += ${qtm_embedded} >>./config.pri
 }
 
-do_compile_prepend() {
-	for NAME in `find ./ -name Makefile` ; do
-	    sed -e 's:-Wl,-rpath-link,${libdir}::g' -i $NAME 
-	done
-}
-
 do_install() {
 	for NAME in */*.prf
 	do
Signature · 1 line
1.9.1
#6 lore raw

PATCH 5/5 send-error-report: show response

In reply to Martin Jansa

* useful when debuging why it was refused by server

---
 scripts/send-error-report | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/send-error-report +4 -2
index 0d85776..8eea3cf 100755
@@ -53,9 +53,11 @@ def sendData(json_file, server):
             print response.status, response.reason
             res = response.read()
             if response.status == 200:
-                print res
+                print(res)
             else:
-                print("There was a problem submiting your data")
+                print("There was a problem submiting your data, response written in %s.response.html" % json_file)
+                with open("%s.response.html" % json_file, "w") as f:
+                    f.write(res)
             conn.close()
         except:
                 print("Server connection failed")
Signature · 1 line
1.9.1