qt4: upgrade to 4.1.1 - add patches to make it build
authorMichael Lauer <mickey@vanille-media.de>
Mon, 10 Apr 2006 13:38:46 +0000 (13:38 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 10 Apr 2006 13:38:46 +0000 (13:38 +0000)
packages/qt/qt4-x11-free-4.1.1/.mtn2git_empty [moved from packages/qt/qt-x11-free-4.1.1/.mtn2git_empty with 100% similarity]
packages/qt/qt4-x11-free-4.1.1/configurable-cpu-extensions.patch [new file with mode: 0644]
packages/qt/qt4-x11-free-4.1.1/cross-compile.patch [moved from packages/qt/qt-x11-free-4.1.1/cross-compile.patch with 64% similarity]
packages/qt/qt4-x11-free-4.1.1/fix-resinit-declaration.patch [moved from packages/qt/qt-x11-free-4.1.1/fix-resinit-declaration.patch with 62% similarity]
packages/qt/qt4-x11-free-4.1.1/gcc4_1.patch [new file with mode: 0644]
packages/qt/qt4-x11-free-4.1.1/no-qmake.patch [new file with mode: 0644]
packages/qt/qt4-x11-free-4.1.1/no-tools.patch [moved from packages/qt/qt-x11-free-4.1.1/no-tools.patch with 68% similarity]
packages/qt/qt4-x11-free_4.1.1.bb [moved from packages/qt/qt-x11-free_4.1.1.bb with 76% similarity]

diff --git a/packages/qt/qt4-x11-free-4.1.1/configurable-cpu-extensions.patch b/packages/qt/qt4-x11-free-4.1.1/configurable-cpu-extensions.patch
new file mode 100644 (file)
index 0000000..ab943db
--- /dev/null
@@ -0,0 +1,34 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- qt-x11-opensource-src-4.1.1/configure~configurable-cpu-extensions
++++ qt-x11-opensource-src-4.1.1/configure
+@@ -564,6 +564,12 @@
+             VAL=$1
+         fi
+         ;;
++    -nosse)
++        CFG_SSE="no"
++        ;;
++    -sse)
++        CFG_SSE="yes"
++        ;;
+     -iwmmxt)
+       CFG_IWMMXT="yes"
+       ;;
+@@ -1759,13 +1765,6 @@
+     fi
+ fi
+-# detect sse support
+-if $unixtests/sse.test $XQMAKESPEC $OPT_VERBOSE; then
+-    CFG_HAVE_SSE=no
+-else
+-    CFG_HAVE_SSE=yes
+-fi
+-
+ # check iwmmxt support
+ if [ "$CFG_IWMMXT" = "yes" ]; then
+     if ! $unixtests/iwmmxt.test $XQMAKESPEC $OPT_VERBOSE; then
@@ -3,18 +3,18 @@
 # Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- qt-x11-opensource-src-4.0.1/configure~cross-compile
-+++ qt-x11-opensource-src-4.0.1/configure
-@@ -477,7 +477,7 @@
+--- qt-x11-opensource-src-4.1.1/configure~cross-compile
++++ qt-x11-opensource-src-4.1.1/configure
+@@ -534,7 +534,7 @@
              UNKNOWN_ARG=yes
          fi
          ;;
--    -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey)
-+    -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-crossarch)
+-    -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk)
++    -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-crossarch)
          VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
          shift
          VAL=$1
-@@ -768,6 +768,9 @@
+@@ -845,6 +845,9 @@
      xplatform)
          XPLATFORM="$VAL"
          ;;
@@ -24,7 +24,7 @@
      debug-and-release)
          if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
              CFG_DEBUG_RELEASE="$VAL"
-@@ -1649,100 +1652,7 @@
+@@ -1698,131 +1701,7 @@
      echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
  fi
  
@@ -33,6 +33,9 @@
 -    x86)
 -        ARCH=i386
 -        ;;
+-    x86_64)
+-        ARCH=x86_64
+-        ;;
 -    ipaq|sharp)
 -        ARCH=arm
 -        ;;
 -            echo "    SGI ($ARCH)"
 -        fi
 -        ;;
--    SunOS:5*:sun4*)
--        if [ "$OPT_VERBOSE" = "yes" ]; then
--            echo "    Sun SPARC (sparc)"
--        fi
--        ARCH=sparc
--        ;;
--    Darwin:*:Power?Macintosh)
--        if [ "$OPT_VERBOSE" = "yes" ]; then
--            echo "    32-bit Apple PowerPC (powerpc)"
--        fi
--        ARCH=powerpc
+-    SunOS:5*:*)
+-        case "$UNAME_MACHINE" in
+-      sun4u)
+-            if [ "$OPT_VERBOSE" = "yes" ]; then
+-                echo "    Sun SPARC (sparc)"
+-            fi
+-            ARCH=sparc
+-            ;;
+-        i86pc)
+-          case "$PLATFORM" in
+-          *-64)
+-                if [ "$OPT_VERBOSE" = "yes" ]; then
+-                  echo "    64-bit AMD 80x86 (x86_64)"
+-                fi
+-                ARCH=x86_64
+-                ;;
+-          *)
+-                if [ "$OPT_VERBOSE" = "yes" ]; then
+-                  echo "    32-bit Intel 80x86 (i386)"
+-                fi
+-                ARCH=i386
+-                ;;
+-            esac
+-        esac
 -        ;;
--    Darwin:*:x86)
--        if [ "$OPT_VERBOSE" = "yes" ]; then
--            echo "    32-bit Apple Intel (x86)"
--        fi
--        ARCH=i386
+-    Darwin:*:*)
+-        case "$UNAME_MACHINE" in
+-            Power?Macintosh)
+-                if [ "$OPT_VERBOSE" = "yes" ]; then
+-                    echo "    32-bit Apple PowerPC (powerpc)"
+-                fi
+-                ;;
+-            x86)
+-                if [ "$OPT_VERBOSE" = "yes" ]; then
+-                    echo "    32-bit Intel 80x86 (i386)"
+-                fi
+-                ;;
+-        esac
+-        ARCH=macosx
 -        ;;
 -    AIX:*:00????????00)
 -        if [ "$OPT_VERBOSE" = "yes" ]; then
 -        fi
 -        ARCH=i386
 -        ;;
--    *:*:x86_64)
+-    *:*:x86_64|*:*:amd64)
 -        if [ "$PLATFORM" = "linux-g++-32" ]; then
 -            if [ "$OPT_VERBOSE" = "yes" ]; then
 -                echo "    32 bit on 64-bit AMD 80x86 (i386)"
 -        fi
 -        ARCH=powerpc
 -        ;;
+-    *:*:s390*)
+-      if [ "$OPT_VERBOSE" = "yes" ]; then
+-          echo "    IBM S/390 (s390)"
+-      fi
+-      ARCH=s390
+-      ;;
 -    *:*:*)
 -        if [ "$OPT_VERBOSE" = "yes" ]; then
 -            echo "    Trying '$UNAME_MACHINE'..."
@@ -3,14 +3,14 @@
 # Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- qt-x11-opensource-src-4.0.1/src/qt3support/network/q3dns.cpp~fix-resinit-declaration
-+++ qt-x11-opensource-src-4.0.1/src/qt3support/network/q3dns.cpp
+--- qt-x11-opensource-src-4.1.1/src/qt3support/network/q3dns.cpp~fix-resinit-declaration
++++ qt-x11-opensource-src-4.1.1/src/qt3support/network/q3dns.cpp
 @@ -30,7 +30,7 @@
  # include <netinet/in.h>
  # include <arpa/nameser.h>
  # include <resolv.h>
 -extern "C" int res_init();
-+extern "C" int res_init() throw ();
++extern "C" int res_init() throw();
  #endif
  
  // POSIX Large File Support redefines open -> open64
diff --git a/packages/qt/qt4-x11-free-4.1.1/gcc4_1.patch b/packages/qt/qt4-x11-free-4.1.1/gcc4_1.patch
new file mode 100644 (file)
index 0000000..392aaf4
--- /dev/null
@@ -0,0 +1,50 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- qt-x11-opensource-src-4.1.1/src/corelib/tools/qchar.h~gcc4_1.patch
++++ qt-x11-opensource-src-4.1.1/src/corelib/tools/qchar.h
+@@ -219,7 +219,7 @@
+     inline const char toLatin1() const;
+     inline const ushort unicode() const { return ucs; }
+ #ifdef Q_NO_PACKED_REFERENCE
+-    inline ushort &unicode() { return *(&ucs); }
++    inline ushort &unicode() { return *((ushort*)&ucs); }
+ #else
+     inline ushort &unicode() { return ucs; }
+ #endif
+--- qt-x11-opensource-src-4.1.1/src/gui/kernel/qapplication_x11.cpp~gcc4_1.patch
++++ qt-x11-opensource-src-4.1.1/src/gui/kernel/qapplication_x11.cpp
+@@ -1193,6 +1193,18 @@
+     }
+ }
++static void getXDefault(const char *group, const char *key, float *val)
++{
++    char *str = XGetDefault(X11->display, group, key);
++    if (str) {
++        char *end = 0;
++        float v = strtod(str, &end);
++        if (str != end)
++            *val = v;
++    }
++}
++
++
+ static void getXDefault(const char *group, const char *key, bool *val)
+ {
+     char *str = XGetDefault(X11->display, group, key);
+--- qt-x11-opensource-src-4.1.1/src/corelib/global/qglobal.h~gcc4_1.patch
++++ qt-x11-opensource-src-4.1.1/src/corelib/global/qglobal.h
+@@ -720,8 +720,8 @@
+ #if defined(QT_COORD_TYPE)
+ typedef QT_COORD_TYPE qreal;
+-#elif defined(__arm__)
+-typedef float qreal;
++//#elif defined(__arm__)
++//typedef float qreal;
+ #else
+ typedef double qreal;
+ #endif
diff --git a/packages/qt/qt4-x11-free-4.1.1/no-qmake.patch b/packages/qt/qt4-x11-free-4.1.1/no-qmake.patch
new file mode 100644 (file)
index 0000000..324f443
--- /dev/null
@@ -0,0 +1,16 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- qt-x11-opensource-src-4.1.1/configure~no-qmake
++++ qt-x11-opensource-src-4.1.1/configure
+@@ -2548,7 +2548,7 @@
+ fi
+ # build qmake
+-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
++if false; then ###[ '!' -f "$outpath/bin/qmake" ];
+     echo "Creating qmake. Please wait..."
+     OLD_QCONFIG_H=
similarity index 68%
rename from packages/qt/qt-x11-free-4.1.1/no-tools.patch
rename to packages/qt/qt4-x11-free-4.1.1/no-tools.patch
index 75a146a..2bda49c 100644 (file)
@@ -3,14 +3,14 @@
 # Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- qt-x11-opensource-src-4.0.1/src/src.pro~no-tools
-+++ qt-x11-opensource-src-4.0.1/src/src.pro
+--- qt-x11-opensource-src-4.1.1/src/src.pro~no-tools
++++ qt-x11-opensource-src-4.1.1/src/src.pro
 @@ -3,7 +3,7 @@
  
  # this order is important
  win32:SUBDIRS += winmain
--SUBDIRS += tools/moc tools/rcc tools/uic corelib xml gui sql network
-+SUBDIRS += corelib xml gui sql network
+-SUBDIRS += tools/moc tools/rcc tools/uic corelib xml gui sql network svg
++SUBDIRS += corelib xml gui sql network svg
  !embedded:contains(QT_CONFIG, opengl): SUBDIRS += opengl
  contains(QT_CONFIG, qt3support): SUBDIRS += qt3support
  !cross_compile {
similarity index 76%
rename from packages/qt/qt-x11-free_4.1.1.bb
rename to packages/qt/qt4-x11-free_4.1.1.bb
index 32ddca6..2b90cb9 100644 (file)
@@ -4,23 +4,20 @@ PRIORITY = "optional"
 HOMEPAGE = "http://www.trolltech.com"
 LICENSE = "GPL QPL"
 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
-DEPENDS = "uicmoc4-native freetype jpeg libx11 xft libxext libxrender libxrandr libxcursor mysql"
+DEPENDS = "uicmoc4-native qmake2-native freetype jpeg libx11 xft libxext libxrender libxrandr libxcursor"
 PROVIDES = "qt4x11"
-# FIXME: Make it use 'our' qmake
-# DEPENDS += "qmake-native-2.00a"
-PR = "r1"
+PR = "r0"
 
 SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
            file://cross-compile.patch;patch=1 \
            file://fix-resinit-declaration.patch;patch=1 \
-           file://no-tools.patch;patch=1"
+           file://no-tools.patch;patch=1 \
+           file://no-qmake.patch;patch=1 \
+           file://gcc4_1.patch;patch=1 \
+           file://configurable-cpu-extensions.patch;patch=1"
 S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
 
-# Not the prime time of Qt4 yet ...
 # TODO: make it not look in /usr and /usr/include for its tests!
-DEFAULT_PREFERENCE = "-1"
-BROKEN             = "1"
-
 PARALLEL_MAKE = ""
 
 inherit qmake-base qt4x11 pkgconfig
@@ -31,12 +28,14 @@ export ARCH = "${TARGET_ARCH}"
 export ARCH_i686 = "x86"
 EXTRA_OEMAKE = "-e"
 
-QT_CONFIG_FLAGS = "-release -shared -qt-zlib -system-libjpeg -no-nas-sound -no-sm -qt-libpng -no-gif -no-xinerama \
-                   -no-tablet -no-xkb -no-nis -no-cups -no-opengl -plugin-sql-mysql -verbose -stl"
-
-# EXTRA_ENV = 'QMAKE="${STAGING_BINDIR}/qmake -after INCPATH+=${STAGING_INCDIR} \
+# FIXME: add missing options
+QT_CONFIG_FLAGS = "-release -shared -qt-zlib -system-libjpeg -no-nas-sound -no-sm -no-libmng -qt-libpng -no-gif -no-xinerama \
+                   -no-tablet -no-xkb -no-nis -no-cups -no-opengl \
+                   -nosse \
+                   -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
+                   -verbose -stl"
 
-EXTRA_ENV = 'QMAKE="${S}/bin/qmake -after DEFINES+=QT_NO_XIM INCPATH+=${STAGING_INCDIR} \
+EXTRA_ENV = 'QMAKE="${STAGING_BINDIR}/qmake2 -after DEFINES+=QT_NO_XIM INCPATH+=${STAGING_INCDIR} \
              INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
              QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
              AR="${TARGET_PREFIX}ar cqs" \
@@ -46,14 +45,15 @@ do_configure() {
        echo "DEFINES -= QT_NO_CAST_TO_ASCII" >>src/qbase.pri
        echo "DEFINES += QT_NO_XIM" >>src/qbase.pri
        unset QMAKESPEC
-       echo yes | ./configure -prefix ${prefix} -crossarch ${ARCH} ${QT_CONFIG_FLAGS} -fast \
+       ln -sf ${STAGING_BINDIR}/qmake2 bin/qmake
+       echo yes | ./configure -v -prefix ${prefix} -crossarch ${ARCH} ${QT_CONFIG_FLAGS} -fast \
                -L${STAGING_LIBDIR} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/mysql
 }
 
 # FIXME: Might want to compile the cross tools for the -dev packages as well...
 
 do_compile() {
-        unset CFLAGS CXXFLAGS
+       unset CFLAGS CXXFLAGS
        install -m 0755 ${STAGING_BINDIR}/rcc4 ${S}/bin/rcc
        install -m 0755 ${STAGING_BINDIR}/moc4 ${S}/bin/moc
        install -m 0755 ${STAGING_BINDIR}/uic4 ${S}/bin/uic
@@ -61,7 +61,7 @@ do_compile() {
        oe_runmake ${EXTRA_ENV}
 }
 
-PARTS = "3Support Core Designer DesignerComponents Gui Network Sql Xml"
+PARTS = "3Support Core Designer DesignerComponents Gui Network Sql Svg Test Xml"
 
 do_stage() {
        install -d ${STAGING_QT_DIR}
@@ -92,15 +92,18 @@ do_install() {
        done
 }
 
-PACKAGES =+ "libqtcore4 libqtxml4 libqtgui4 libqtnetwork4 libqtsql4 libqtdesigner4 libqtdesignercomponents4 \
+PACKAGES =+ "libqtcore4 libqtgui4 libqtnetwork4 libqtsql4 libqtsvg4 libqttest4 libqtxml4 \
+             libqtdesigner4 libqtdesignercomponents4 \
              qt4-assistant qt4-designer qt4-examples qt4-linguist \
              qt4-plugins-accessible qt4-plugins-codecs qt4-plugins-designer qt4-plugins-imageformats qt4-plugins-sqldrivers"
 
 FILES_libqtcore4               = "${libdir}/libQtCore.so*"
 FILES_libqtgui4                = "${libdir}/libQtGui.so*"
 FILES_libqtnetwork4            = "${libdir}/libQtNetwork.so*"
-FILES_libqtxml4                = "${libdir}/libQtXml.so*"
 FILES_libqtsql4                = "${libdir}/libQtSql.so*"
+FILES_libqtsvg4                = "${libdir}/libQtSvg.so*"
+FILES_libqttest4               = "${libdir}/libQtTest.so*"
+FILES_libqtxml4                = "${libdir}/libQtXml.so*"
 FILES_libqtdesigner4           = "${libdir}/libQtDesigner.so*"
 FILES_libqtdesignercomponents4 = "${libdir}/libQtDesignerComponents.so*"