diff src/qt.mk @ 1015:7997c04d4bef

upgrade package qt to 4.7.0-beta1 (by Mark Brand)
author Volker Grabsch <vog@notjusthosting.com>
date Mon, 31 May 2010 11:04:18 +0000
parents 37e7bea19863
children 0cf0c907b475
line wrap: on
line diff
--- a/src/qt.mk	Mon May 31 09:21:44 2010 +0200
+++ b/src/qt.mk	Mon May 31 11:04:18 2010 +0000
@@ -4,13 +4,13 @@
 # Qt
 PKG             := qt
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 4.6.2
-$(PKG)_CHECKSUM := 977c10b88a2230e96868edc78a9e3789c0fcbf70
+$(PKG)_VERSION  := 4.7.0-beta1
+$(PKG)_CHECKSUM := ccb3126e64ce0a0142970a8898625fe5e84c7361
 $(PKG)_SUBDIR   := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.gz
 $(PKG)_WEBSITE  := http://qt.nokia.com/
 $(PKG)_URL      := http://get.qt.nokia.com/qt/source/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc libodbc++ postgresql freetds openssl libgcrypt zlib libpng jpeg libmng tiff sqlite libiconv
+$(PKG)_DEPS     := gcc libodbc++ postgresql freetds openssl libgcrypt zlib libpng jpeg libmng tiff giflib sqlite libiconv
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://qt.gitorious.org/qt/qt/commits' | \
@@ -20,100 +20,35 @@
 endef
 
 define $(PKG)_BUILD
-
-    # Native, unpatched build of Qt for moc, rcc, uic and qmake
-    cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,qt)
-    mv '$(1)/$(qt_SUBDIR)' '$(1).native'
-
-    $(SED) -i 's,PLATFORM_X11=yes,PLATFORM_X11=no,'           '$(1)'.native/configure
-    $(SED) -i 's,PLATFORM=solaris-cc$$,PLATFORM=solaris-g++,' '$(1)'.native/configure
-    cd '$(1)'.native && ./configure \
-        -opensource \
-        -confirm-license \
-        -prefix '$(PREFIX)/$(TARGET)' \
-        -prefix-install \
-        -fast \
-        -release \
-        -no-exceptions \
-        -nomake demos \
-        -nomake examples \
-        -nomake libs \
-        -nomake tools \
-        -nomake docs \
-        -nomake translations
-
-    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-tools-bootstrap
-    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-moc
-    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-rcc
-    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-uic
-
-    # rebuild qmake to use "-unix" as default and to use the correct "ar" command
-    $(SED) -i 's,\(Option::TARG_MODE Option::target_mode = Option::TARG_\)[A-Z_]*,\1UNIX_MODE,' '$(1)'.native/qmake/option.cpp
-    $(SED) -i 's,"ar -M,"$(TARGET)-ar -M,' '$(1)'.native/qmake/generators/win32/mingw_make.cpp
-    $(MAKE) -C '$(1)'.native/qmake -j '$(JOBS)'
-
-    # install the native tools manually
-    $(INSTALL) -m755 '$(1)'.native/bin/moc   '$(PREFIX)/bin/$(TARGET)-moc'
-    $(INSTALL) -m755 '$(1)'.native/bin/rcc   '$(PREFIX)/bin/$(TARGET)-rcc'
-    $(INSTALL) -m755 '$(1)'.native/bin/uic   '$(PREFIX)/bin/$(TARGET)-uic'
-    $(INSTALL) -m755 '$(1)'.native/bin/qmake '$(PREFIX)/bin/$(TARGET)-qmake'
-
-    # Trick the build system into using native tools
-    ln -s '$(1)'.native/bin/{moc,rcc,uic,qmake} '$(1)'/bin/
-
-    # Make sure we don't build the tools again
-    echo 'qmake:' >'$(1)'/qmake/Makefile.unix
-    for f in `ls -1 '$(1)'/src/tools`; \
-        do echo TEMPLATE = subdirs >'$(1)'/src/tools/"$$f"/"$$f".pro; \
-    done
-
-    # Trick the buildsystem into using win32 feature files:
-    mv '$(1)'/mkspecs/features/unix '$(1)'/mkspecs/features/unix.orig
-    ln -s win32 '$(1)'/mkspecs/features/unix
-
-    # Adjust the mkspec values that contain the TARGET platform prefix.
-    # The patch planted strings HOSTPLATFORMPREFIX and HOSTPLATFORMINCLUDE.
-    $(SED) -i 's,HOSTPLATFORMPREFIX-,$(TARGET)-,g'                  '$(1)'/mkspecs/win32-g++/qmake.conf
-    $(SED) -i 's,HOSTPLATFORMINCLUDE,$(PREFIX)/$(TARGET)/include,g' '$(1)'/mkspecs/win32-g++/qmake.conf
-
-    # Make sure qmake doesn't use compilation paths meant for unix
-    find '$(1)'/src -name '*.pr[oi]' -exec \
-        $(SED) -i 's,\(^\|[^_/]\)unix,\1linux,g' {} \;
-
-    # Make qmake use compilation paths meant for MinGW or Windows in general
-    find '$(1)'/src -name '*.pr[oi]' -exec \
-        $(SED) -i 's,\(^\|[^_/]\)win32-g++\([^-]\|$$\),\1unix\2,g' {} \;
-    find '$(1)'/src -name '*.pr[oi]' -exec \
-        $(SED) -i 's,\(^\|[^_/]\)win32\([^-]\|$$\),\1unix\2,g' {} \;
+    # Adjust the makespec defs that contain the TARGET platform prefix.
+    $(SED) -i 's,/usr/i686-pc-mingw32/,$(PREFIX)/$(TARGET)/,g' '$(1)/mkspecs/win32-g++-cross/qmake.conf'
+    $(SED) -i 's,i686-pc-mingw32-,$(TARGET)-,g'                '$(1)/mkspecs/win32-g++-cross/qmake.conf'
 
     # Use the correct pg_config tool
-    $(SED) -i 's,pg_config,$(TARGET)-pg_config,g;' '$(1)'/configure
+    $(SED) -i 's,pg_config,$(TARGET)-pg_config,g;' '$(1)/configure'
 
-    # Configure Qt for MinGW target
     # We prefer static mingw-cross-env system libs for static build:
     # -system-zlib -system-libpng -system-libjpeg -system-libtiff -system-libmng -system-sqlite
     # There is no -system-gif option. NB -system-libmng will not link in shared build.
     # Linking QtNetwork4.dll requires OPENSSL_LIBS as does linking apps with static Qt.
     # Linking qsqlpsql4.dll plugin requires PSQL_LIBS as does linking apps with static Qt.
     # For shared Qt with qt-zlib, add -lQtCore4 to end of OPENSSL_LIBS to satisfy zlib dependency.
+    # -no-largefile does not really disable large file support, it just prevents defining
+    # QT_LARGEFILE_SUPPORT 64 which is not intended for win32.
     cd '$(1)' && \
         OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
-        PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl`" ./configure \
+        PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl`" \
+        ./configure \
         -opensource \
         -confirm-license \
-        -xplatform win32-g++ \
-        -arch windows \
-        -little-endian \
-        -host-arch i386 \
-        -host-little-endian \
-        -no-largefile \
+        -fast \
+        -xplatform win32-g++-cross \
         -force-pkg-config \
         -release \
         -exceptions \
         -static \
         -prefix '$(PREFIX)/$(TARGET)' \
         -prefix-install \
-        -bindir '$(1)'/bindirsink \
         -script \
         -opengl desktop \
         -no-webkit \
@@ -138,15 +73,16 @@
         -system-libtiff \
         -system-libmng \
         -system-sqlite \
-        -qt-gif \
         -openssl-linked \
-        -no-fontconfig \
         -v
 
     $(MAKE) -C '$(1)' -j '$(JOBS)'
-    '$(TARGET)-ranlib' '$(1)'/lib/*.a
     rm -rf '$(PREFIX)/$(TARGET)/mkspecs'
     $(MAKE) -C '$(1)' -j 1 install
+    $(INSTALL) -m755 '$(1)/bin/moc'   '$(PREFIX)/bin/$(TARGET)-moc'
+    $(INSTALL) -m755 '$(1)/bin/rcc'   '$(PREFIX)/bin/$(TARGET)-rcc'
+    $(INSTALL) -m755 '$(1)/bin/uic'   '$(PREFIX)/bin/$(TARGET)-uic'
+    $(INSTALL) -m755 '$(1)/bin/qmake' '$(PREFIX)/bin/$(TARGET)-qmake'
 
     mkdir            '$(1)/test-qt'
     cp '$(2)'*       '$(1)/test-qt/'