qt4: Do not recreate the link if it exists otherwise do_install will fail
authorHolger Hans Peter Freyther <zecke@selfish.org>
Sat, 1 Aug 2009 07:25:31 +0000 (09:25 +0200)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Sat, 1 Aug 2009 11:16:14 +0000 (13:16 +0200)
When running configure more than once the do_install stage
will fail due excessive symlinks... Stop doing that.

recipes/qt4/qt4.inc

index b4f53c1..79240ed 100644 (file)
@@ -122,8 +122,15 @@ FILES_${QT_BASE_NAME}-mkspecs              = "${datadir}/${QT_DIR_NAME}/mkspecs/
 do_configure() {
     unset QMAKESPEC
     unset QTDIR
-    ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
-    ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
+
+    if [! -e bin/qmake]; then
+        ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
+    fi
+
+    if [! -e mkspecs/${TARGET_OS}-oe-g++]; then
+        ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
+    fi
+
     cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf mkspecs/common/
 
     echo "[Paths]"                                 > $QT_CONF_PATH