[mingw-qt: 34/65] Use a more proper build method

epienbro epienbro at fedoraproject.org
Tue Mar 6 21:29:36 UTC 2012


commit 85315fd5464551071260a469d06d1581afc52991
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Mon Oct 11 21:02:50 2010 +0200

    Use a more proper build method
    
    - Use a more proper build method than the old hacky one
    - Link against the mingw32 packages mingw32-zlib, mingw32-iconv,
      mingw32-libjpeg, mingw32-libpng, mingw32-libtiff and mingw32-sqlite
      instead of using the bundled libraries
    - Added the QtDeclarative library
    - Bundle the translations
    - Dropped the old obsoletes: mingw32-qt-win
    - Use the name 'win32-g++-fedora-cross' instead of 'win32-fedora-cross' as
      mkspecs platform name. People compiling Qt applications using the
      Fedora MinGW toolchain have to use this new name when invoking qmake

 mingw32-qt.spec                            |  278 ++++++------
 qmake.cache.in                             |   20 -
 qmake.conf                                 |    4 +-
 qt-dbus-dont-link-to-dbus-1d.patch         |   11 +
 qt-examples-compile-fix.patch              |   32 ++
 qt-fix-ws2_32-link.patch                   |   13 +
 qt-libjpeg-7-compatibility.patch           |   20 +
 qt-libpng14-compatibility.patch            |   11 +
 qt-support-win32-fedora-cross-target.patch |  124 +++++
 qt-win-configure.patch                     |  674 ----------------------------
 qt-win-configure.sh                        |   80 ----
 11 files changed, 346 insertions(+), 921 deletions(-)
---
diff --git a/mingw32-qt.spec b/mingw32-qt.spec
index d084be3..c73d6e8 100644
--- a/mingw32-qt.spec
+++ b/mingw32-qt.spec
@@ -7,26 +7,11 @@
 
 #global pre rc1
 
-%global platform win32-fedora-cross
-
-# NOTES, please read these carefully first:
-#
-# . We only build a few libraries at the moment, those listed in
-#   %{subdirs} below.  We could build more without too much effort.
-#
-# . We should build our own qmake instead of relying on the one
-#   from the native Fedora package.  The reason is so that we can
-#   set the default include and library paths correctly.
-
-%global subdirs src/corelib src/network src/xml src/xmlpatterns src/gui src/winmain src/svg src/sql src/qt3support src/opengl src/script src/scripttools src/testlib src/multimedia src/3rdparty/webkit/JavaScriptCore src/3rdparty/webkit/WebCore
-# does not compile:
-# src/plugins
-%global relsubdirs src/activeqt
-#global dbgsubdirs 
+%global platform win32-g++-fedora-cross
 
 Name:           mingw32-qt
 Version:        4.7.0
-Release:        1%{?pre}%{?dist}
+Release:        2%{?pre}%{?dist}
 Summary:        Qt for Windows
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -35,29 +20,24 @@ Group:          Development/Libraries
 URL:            http://www.qtsoftware.com/
 Source0:        http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}.tar.gz
 
-# To make the configure patch - see below.
-Source1:        qt-win-configure.sh
+# Special cross-compilation qmake target.
+Source1:        qmake.conf
+Source2:        qplatformdefs.h
 
-# Override .qmake.cache
-Source2:        qmake.cache.in
+Patch11:        mingw32-qt-4.6.0-no-fpu-functions.patch
 
-# Special cross-compilation qmake target.
-Source3:        qmake.conf
-Source4:        qplatformdefs.h
+# Qt tries to link against libpng using '-lpng'. This doesn't work for libpng 1.4
+Patch12:        qt-libpng14-compatibility.patch
 
-# Qt-win is supplied with a binary configure.exe.  Although we have source
-# for this, (a) it can't be compiled on Linux, and (b) we cannot run
-# the Windows binary during the build.  Instead we run the command by
-# hand and create this diff to record what it did.
-#
-# Generate this patch using "qt-win-configure.sh".
-Patch0:         qt-win-configure.patch
+# Fedora's libjpeg uses the datatype 'jpeg_boolean' instead of 'boolean'
+# to avoid a conflict with the rpcndr.h header
+Patch13:        qt-libjpeg-7-compatibility.patch
 
-Patch11:        mingw32-qt-4.6.0-no-fpu-functions.patch
+# One of the examples tries to link with 'Ws2_32'. As Linux is case sensitive this won't work
+Patch14:        qt-fix-ws2_32-link.patch
 
-# The QtWebKit build refers to a MSVC specific tool called ml64 which we don't
-# have on Linux so strip out this reference
-Patch12:        qt-dont-use-ml64-to-compile-webkit.patch
+# The debug build tries to link against libdbus-1d which doesn't exist
+Patch15:        qt-dbus-dont-link-to-dbus-1d.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -68,6 +48,12 @@ BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-gcc-c++
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-openssl
+BuildRequires:  mingw32-zlib
+BuildRequires:  mingw32-iconv
+BuildRequires:  mingw32-libjpeg
+BuildRequires:  mingw32-libpng
+BuildRequires:  mingw32-libtiff
+BuildRequires:  mingw32-sqlite
 
 # This is required because we want qmake
 # temporarily disabled
@@ -80,11 +66,6 @@ BuildRequires:  dos2unix
 # This package contains the cross-compiler setup for qmake
 Requires:       mingw32-qt-qmake = %{version}
 
-# Obsolete qt-win package that was posted to the mingw
-# mailing list / is on annexia.org
-Obsoletes:      mingw32-qt-win <= 4.5.0
-Provides:       mingw32-qt-win = %{version}
-
 
 %description
 This package contains the Qt software toolkit for developing
@@ -100,127 +81,116 @@ Fedora Windows cross-compiler.
 %prep
 %setup -q -n qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}
 
-%patch0 -p1
-
 %patch11 -p1
 %patch12 -p0
-
-# Override the .qmake.cache file.
-rm .qmake.cache
-sed -e s, at builddir@,$(pwd),g < %{SOURCE2} > .qmake.cache
+%patch13 -p0
+%patch14 -p0
+%patch15 -p0
 
 # Cross-compilation qmake target.
 mkdir mkspecs/%{platform}
-cp %{SOURCE3} %{SOURCE4} mkspecs/%{platform}
+cp %{SOURCE1} %{SOURCE2} mkspecs/%{platform}
 
 
 %build
-for d in %{?subdirs} %{?relsubdirs} %{?dbgsubdirs}; do
-  # Precompiled headers from a previous iteration of this loop
-  # cause the compiler deep confusion, so make sure any are removed
-  # _and_ the PCH directories are fresh and empty.
-  rm -rf tmp/obj/release_shared/qt_pch.h.gch
-  mkdir -p tmp/obj/release_shared/qt_pch.h.gch
-  rm -rf tmp/obj/release_shared/qt_gui_pch.h.gch
-  mkdir -p tmp/obj/release_shared/qt_gui_pch.h.gch
-
-  # Now build in this directory.
-  pushd $d
-  qmake-qt4 -win32 *.pro
-#  since we trash the PCH cache, everything is rebuilt again at install time,
-#  so there's no point in building now
-#  make %{?_smp_mflags}
-
-  popd
-
-  # As above ...
-  rm -rf tmp/obj/debug_shared/qt_pch.h.gch
-  mkdir -p tmp/obj/debug_shared/qt_pch.h.gch
-  rm -rf tmp/obj/debug_shared/qt_gui_pch.h.gch
-  mkdir -p tmp/obj/debug_shared/qt_gui_pch.h.gch
-
-  # Now build in this directory.
-  pushd $d
-#  make %{?_smp_mflags} debug
-  popd
-done
+# Force the right pkg-config settings
+# We can't use %%{_mingw32_env} here as that breaks the compilation
+export PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"
+unset PKG_CONFIG_PATH
+
+# Generic configure arguments
+# Phonon is disabled for now because we lack the directx headers
+# The 'javascript-jit' argument causes a compile failure on the mingw32 toolchain
+qt_configure_args="\
+    -prefix %{_mingw32_prefix} \
+    -bindir %{_mingw32_bindir} \
+    -datadir %{_mingw32_datadir}/qt4 \
+    -demosdir %{_mingw32_datadir}/qt4/demos \
+    -docdir %{_mingw32_docdir}/qt4 \
+    -examplesdir %{_mingw32_datadir}/qt4/examples \
+    -headerdir %{_mingw32_includedir} \
+    -libdir %{_mingw32_libdir} \
+    -plugindir %{_mingw32_libdir}/qt4/plugins \
+    -sysconfdir %{_mingw32_sysconfdir} \
+    -translationdir %{_mingw32_datadir}/qt4/translations \
+    -shared \
+    -qt3support \
+    -verbose \
+    -opensource \
+    -exceptions \
+    -fast \
+    -confirm-license \
+    -force-pkg-config \
+    -little-endian \
+    -xplatform %{platform} \
+    -xmlpatterns \
+    -multimedia \
+    -audio-backend \
+    -webkit \
+    -script \
+    -scripttools \
+    -declarative \
+    -no-phonon \
+    -qt-libmng \
+    -system-zlib \
+    -system-libtiff \
+    -system-libpng \
+    -system-libjpeg \
+    -system-sqlite \
+    -openssl \
+    -nomake demos,examples"
+
+# We have to build Qt twice, once for the release build and once for the debug build
+# Unfortunately Qt only supports out-of-source builds which are in ../some_folder
+rm -rf ../build_debug
+mkdir ../build_debug
+pushd ../build_debug
+../qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}/configure \
+    -debug \
+    $qt_configure_args
+make %{?_smp_mflags}
+popd
+
+rm -rf ../build_release
+mkdir ../build_release
+pushd ../build_release
+../qt-everywhere-opensource-src-%{version}%{?pre:-%{pre}}/configure \
+    -release \
+    $qt_configure_args    
+make %{?_smp_mflags}
+popd
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-for d in %{?subdirs} %{?relsubdirs}; do
-  # As above ... WTF is Qt doing confusing make and make install??
-  rm -rf tmp/obj/release_shared/qt_pch.h.gch
-  mkdir -p tmp/obj/release_shared/qt_pch.h.gch
-  rm -rf tmp/obj/release_shared/qt_gui_pch.h.gch
-  mkdir -p tmp/obj/release_shared/qt_gui_pch.h.gch
-
-  pushd $d
-  if [ -d ../../tmp/moc/release_shared ]; then
-    x=`(cd ../../tmp/moc/release_shared; echo $PWD)`
-    make -f Makefile.Release $x/mocinclude.tmp || true
-  fi
-
-  # When using 'make install' for the JavaScriptCore, nothing gets built as the JavaScriptCore
-  # is only a static library used internally by the build system, so perform the build manually
-  if test "$d" = "src/3rdparty/webkit/JavaScriptCore" ; then
-    make %{?_smp_mflags}
-  fi
-
-  make %{?_smp_mflags} INSTALL_ROOT=$RPM_BUILD_ROOT install
-  popd
-done
-
-for d in %{?subdirs} %{?dbgsubdirs}; do
-  # As above ...
-  rm -rf tmp/obj/debug_shared/qt_pch.h.gch
-  mkdir -p tmp/obj/debug_shared/qt_pch.h.gch
-  rm -rf tmp/obj/debug_shared/qt_gui_pch.h.gch
-  mkdir -p tmp/obj/debug_shared/qt_gui_pch.h.gch
-
-  pushd $d
-  if [ -d ../../tmp/moc/debug_shared ]; then
-    x=`(cd ../../tmp/moc/debug_shared; echo $PWD)`
-    make -f Makefile.Debug $x/mocinclude.tmp || true
-  fi
-
-  # When using 'make install' for the JavaScriptCore, nothing gets built as the JavaScriptCore
-  # is only a static library used internally by the build system, so perform the build manually
-  if test "$d" = "src/3rdparty/webkit/JavaScriptCore" ; then
-    make %{?_smp_mflags} debug
-  fi
-
-  make %{?_smp_mflags} INSTALL_ROOT=$RPM_BUILD_ROOT debug-install
-  popd
-done
-
-# Special treatment for activeqt debug
-pushd src/activeqt
-make debug
-popd
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
-install lib/libQAxContainerd.a $RPM_BUILD_ROOT%{_mingw32_libdir}
-install lib/libQAxServerd.a $RPM_BUILD_ROOT%{_mingw32_libdir}
-
-# Qt ignores our carefully configured directories and just
-# puts stuff in default directories.  Move them to the proper
-# places ...
-# (Actually this may be because we are using the native qmake)
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
-mv $RPM_BUILD_ROOT%{_includedir}/* $RPM_BUILD_ROOT%{_mingw32_includedir}
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
-mv $RPM_BUILD_ROOT%{_libdir}/qt4/bin/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
-mv $RPM_BUILD_ROOT/usr/lib*/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
-mv $RPM_BUILD_ROOT/usr/lib*/*.a $RPM_BUILD_ROOT%{_mingw32_libdir}
-rm -rf $RPM_BUILD_ROOT%{_libdir}/qt4/bin
-rm $RPM_BUILD_ROOT%{_libdir}/*.prl
+make install -C ../build_debug INSTALL_ROOT=$RPM_BUILD_ROOT
+make install -C ../build_release INSTALL_ROOT=$RPM_BUILD_ROOT
+
+# The .dll's are installed in both %%{_mingw32_bindir} and %%{_mingw32_libdir}
+# One copy of the .dll's is sufficient
+rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll
 
 # add links with version suffix for convenience
 ln -s libqtmain.a $RPM_BUILD_ROOT%{_mingw32_libdir}/libqtmain4.a
 ln -s libqtmaind.a $RPM_BUILD_ROOT%{_mingw32_libdir}/libqtmaind4.a
 
+# Drop all the prl files, the examples and the mkspecs files which are already part of mingw32-qt-qmake
+rm -f  $RPM_BUILD_ROOT%{_mingw32_libdir}/*.prl
+rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/qt4/demos
+rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/qt4/examples
+rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/qt4/mkspecs
+
+# Drop some tools which we already have in the native Qt package
+rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/lrelease
+rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/moc
+rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/rcc
+rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/uic
+
+# The Qt build system creates a folder called 'imports' but it isn't entirely sure
+# what it's purpose is. Drop it for now
+rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/imports
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -228,12 +198,13 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc configure.output
 %doc LICENSE.GPL3 LICENSE.LGPL LGPL_EXCEPTION.txt README
 %{_mingw32_bindir}/Qt3Support4.dll
 %{_mingw32_bindir}/Qt3Supportd4.dll
 %{_mingw32_bindir}/QtCore4.dll
 %{_mingw32_bindir}/QtCored4.dll
+%{_mingw32_bindir}/QtDeclarative4.dll
+%{_mingw32_bindir}/QtDeclaratived4.dll
 %{_mingw32_bindir}/QtGui4.dll
 %{_mingw32_bindir}/QtGuid4.dll
 %{_mingw32_bindir}/QtNetwork4.dll
@@ -262,6 +233,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_libdir}/libQt3Supportd4.a
 %{_mingw32_libdir}/libQtCore4.a
 %{_mingw32_libdir}/libQtCored4.a
+%{_mingw32_libdir}/libQtDeclarative4.a
+%{_mingw32_libdir}/libQtDeclaratived4.a
 %{_mingw32_libdir}/libQtGui4.a
 %{_mingw32_libdir}/libQtGuid4.a
 %{_mingw32_libdir}/libqtmain.a
@@ -294,9 +267,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_libdir}/libQtTestd4.a
 %{_mingw32_libdir}/libQtWebKit4.a
 %{_mingw32_libdir}/libQtWebKitd4.a
+%{_mingw32_libdir}/qt4/
 %{_mingw32_includedir}/Qt/
 %{_mingw32_includedir}/Qt3Support/
 %{_mingw32_includedir}/QtCore/
+%{_mingw32_includedir}/QtDeclarative/
 %{_mingw32_includedir}/QtGui/
 %{_mingw32_includedir}/QtNetwork/
 %{_mingw32_includedir}/QtOpenGL/
@@ -310,9 +285,24 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_includedir}/ActiveQt/
 %{_mingw32_includedir}/QtMultimedia/
 %{_mingw32_includedir}/QtTest/
+%{_mingw32_datadir}/qt4/
 
 
 %changelog
+* Mon Oct 11 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.7.0-2
+- Use a more proper build method than the old hacky one
+- Link against the mingw32 packages mingw32-zlib, mingw32-iconv, 
+  mingw32-libjpeg, mingw32-libpng, mingw32-libtiff and mingw32-sqlite
+  instead of using the bundled libraries
+- Use the name 'win32-g++-fedora-cross' instead of 'win32-fedora-cross' as
+  mkspecs platform name. People compiling Qt applications using the
+  Fedora MinGW toolchain have to use this new name when invoking qmake
+- Added the QtDeclarative library
+- Bundle the translations
+- Dropped the old obsoletes: mingw32-qt-win
+- Dropped some duplicate declarations from the qmake.conf file
+- Use the correct strip command in the qmake.conf file
+
 * Sat Sep 25 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.7.0-1
 - Update to 4.7.0
 - Fixed a small rpmlint warning
diff --git a/qmake.conf b/qmake.conf
index 652bd34..f2f9589 100644
--- a/qmake.conf
+++ b/qmake.conf
@@ -82,8 +82,6 @@ QMAKE_COPY_DIR        = $(COPY) -a
 QMAKE_MOVE            = mv -f
 QMAKE_DEL_FILE        = rm -f
 QMAKE_DEL_DIR         = rmdir
-QMAKE_STRIP           = strip
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
 QMAKE_INSTALL_FILE    = install -m 644 -p
 QMAKE_INSTALL_PROGRAM = install -m 755 -p
 
@@ -106,6 +104,6 @@ QMAKE_ZIP		= zip -r -9
 
 #QT_LIBINFIX		= 4
 
-QMAKE_STRIP		= strip
+QMAKE_STRIP		= i686-pc-mingw32-strip
 QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
 load(qt_config)
diff --git a/qt-dbus-dont-link-to-dbus-1d.patch b/qt-dbus-dont-link-to-dbus-1d.patch
new file mode 100644
index 0000000..229fe9b
--- /dev/null
+++ b/qt-dbus-dont-link-to-dbus-1d.patch
@@ -0,0 +1,11 @@
+--- src/dbus/dbus.pro.orig	2010-10-09 16:10:00.389119915 +0200
++++ src/dbus/dbus.pro	2010-10-09 16:10:16.260245336 +0200
+@@ -25,7 +25,7 @@
+         -ladvapi32 \
+         -lnetapi32 \
+         -luser32
+-    CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1d
++    CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1
+     else:LIBS_PRIVATE += -ldbus-1
+ }
+ include(../qbase.pri)
diff --git a/qt-examples-compile-fix.patch b/qt-examples-compile-fix.patch
new file mode 100644
index 0000000..f871b42
--- /dev/null
+++ b/qt-examples-compile-fix.patch
@@ -0,0 +1,32 @@
+--- examples/activeqt/webbrowser/webbrowser.pro.orig	2010-10-08 21:32:46.898785106 +0200
++++ examples/activeqt/webbrowser/webbrowser.pro	2010-10-08 21:33:42.641929887 +0200
+@@ -8,7 +8,7 @@
+ SOURCES	 = main.cpp
+ FORMS	 = mainwindow.ui
+ wincewm*: FORMS = mainwindow_windowsmobile.ui
+-
++INCLUDEPATH += .
+ 
+ # install
+ target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
+--- demos/browser/browser.pro.orig	2010-10-08 21:36:59.474565087 +0200
++++ demos/browser/browser.pro	2010-10-08 21:37:13.854634279 +0200
+@@ -94,6 +94,8 @@
+     DEPLOYMENT_PLUGIN += qjpeg qgif
+ }
+ 
++INCLUDEPATH += .
++
+ # install
+ target.path = $$[QT_INSTALL_DEMOS]/browser
+ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls data
+--- examples/painting/svggenerator/svggenerator.pro.orig	2010-10-08 20:57:26.234063572 +0200
++++ examples/painting/svggenerator/svggenerator.pro	2010-10-08 20:57:43.442344056 +0200
+@@ -5,6 +5,7 @@
+ SOURCES   = displaywidget.cpp \
+             main.cpp \
+             window.cpp
++INCLUDEPATH += .
+ 
+ QT += svg
+ 
diff --git a/qt-fix-ws2_32-link.patch b/qt-fix-ws2_32-link.patch
new file mode 100644
index 0000000..6fd92ee
--- /dev/null
+++ b/qt-fix-ws2_32-link.patch
@@ -0,0 +1,13 @@
+--- examples/network/bearermonitor/bearermonitor.pro.orig	2010-10-08 20:46:45.599387874 +0200
++++ examples/network/bearermonitor/bearermonitor.pro	2010-10-08 20:47:01.758590575 +0200
+@@ -17,8 +17,8 @@
+           sessionwidget.ui
+ }
+ 
+-win32:!wince*:LIBS += -lWs2_32
+-wince*:LIBS += -lWs2
++win32:!wince*:LIBS += -lws2_32
++wince*:LIBS += -lws2
+ 
+ CONFIG += console
+ 
diff --git a/qt-libjpeg-7-compatibility.patch b/qt-libjpeg-7-compatibility.patch
new file mode 100644
index 0000000..4e88883
--- /dev/null
+++ b/qt-libjpeg-7-compatibility.patch
@@ -0,0 +1,20 @@
+--- src/gui/image/qjpeghandler.cpp.orig	2010-10-08 20:27:26.265243275 +0200
++++ src/gui/image/qjpeghandler.cpp	2010-10-08 20:28:09.792477659 +0200
+@@ -117,7 +117,7 @@
+ {
+ }
+ 
+-static boolean qt_fill_input_buffer(j_decompress_ptr cinfo)
++static jpeg_boolean qt_fill_input_buffer(j_decompress_ptr cinfo)
+ {
+     my_jpeg_source_mgr* src = (my_jpeg_source_mgr*)cinfo->src;
+     if (src->memDevice) {
+@@ -466,7 +466,7 @@
+ {
+ }
+ 
+-static boolean qt_empty_output_buffer(j_compress_ptr cinfo)
++static jpeg_boolean qt_empty_output_buffer(j_compress_ptr cinfo)
+ {
+     my_jpeg_destination_mgr* dest = (my_jpeg_destination_mgr*)cinfo->dest;
+ 
diff --git a/qt-libpng14-compatibility.patch b/qt-libpng14-compatibility.patch
new file mode 100644
index 0000000..a0c4423
--- /dev/null
+++ b/qt-libpng14-compatibility.patch
@@ -0,0 +1,11 @@
+--- src/gui/image/qpnghandler.pri.orig	2010-10-10 21:19:50.320533856 +0200
++++ src/gui/image/qpnghandler.pri	2010-10-10 21:20:02.070370178 +0200
+@@ -2,7 +2,7 @@
+ HEADERS += $$PWD/qpnghandler_p.h
+ SOURCES += $$PWD/qpnghandler.cpp
+ contains(QT_CONFIG, system-png) {
+-    if(unix|win32-g++*): LIBS_PRIVATE  += -lpng
++    if(unix|win32-g++*): LIBS_PRIVATE  += -lpng14
+     else:win32:          LIBS += libpng.lib
+ 
+ } else {
diff --git a/qt-support-win32-fedora-cross-target.patch b/qt-support-win32-fedora-cross-target.patch
new file mode 100644
index 0000000..54f9538
--- /dev/null
+++ b/qt-support-win32-fedora-cross-target.patch
@@ -0,0 +1,124 @@
+--- configure.orig	2010-10-08 15:53:02.112738241 +0200
++++ configure	2010-10-08 15:53:51.904443659 +0200
+@@ -1447,7 +1447,7 @@
+         ;;
+     xplatform)
+         XPLATFORM="$VAL"
+-        case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
++        case `basename "$XPLATFORM"` in win32-*) XPLATFORM_MINGW=yes;; esac
+         ;;
+     debug-and-release)
+         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+--- configure.orig	2010-10-08 16:23:48.689113255 +0200
++++ configure	2010-10-08 16:24:17.786278087 +0200
+@@ -2667,7 +2667,7 @@
+ 
+ [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
+ 
+-case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
++case `basename "$XPLATFORM"` in win32-*) XPLATFORM_MINGW=yes;; esac
+ 
+ if [ -d "$PLATFORM" ]; then
+   QMAKESPEC="$PLATFORM"
+--- src/3rdparty/zlib_dependency.pri.orig	2010-10-08 18:51:16.798187177 +0200
++++ src/3rdparty/zlib_dependency.pri	2010-10-08 18:51:41.309003932 +0200
+@@ -1,7 +1,7 @@
+ # zlib dependency satisfied by bundled 3rd party zlib or system zlib
+ contains(QT_CONFIG, system-zlib) {
+     symbian:                 LIBS_PRIVATE += -llibz
+-    else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
++    else:if(unix|win32-*):LIBS_PRIVATE += -lz
+     else:                    LIBS += zdll.lib
+ } else {
+     INCLUDEPATH +=  $$PWD/zlib
+--- src/gui/painting/painting.pri.orig	2010-10-08 19:49:02.802203909 +0200
++++ src/gui/painting/painting.pri	2010-10-08 19:49:49.566674014 +0200
+@@ -234,7 +234,7 @@
+         IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp
+     }
+ 
+-    win32-g++*|!win32:!*-icc* {
++    win32-*|!win32:!*-icc* {
+         mmx {
+             mmx_compiler.commands = $$QMAKE_CXX -c -Winline
+ 
+--- src/gui/image/qpnghandler.pri.orig	2010-10-08 20:02:16.252080731 +0200
++++ src/gui/image/qpnghandler.pri	2010-10-08 20:02:38.924763130 +0200
+@@ -2,7 +2,7 @@
+ HEADERS += $$PWD/qpnghandler_p.h
+ SOURCES += $$PWD/qpnghandler.cpp
+ contains(QT_CONFIG, system-png) {
+-    if(unix|win32-g++*): LIBS_PRIVATE  += -lpng
++    if(unix|win32*): LIBS_PRIVATE  += -lpng
+     else:win32:          LIBS += libpng.lib
+ 
+ } else {
+--- src/gui/image/qtiffhandler.pri.orig	2010-10-08 20:32:14.550664392 +0200
++++ src/gui/image/qtiffhandler.pri	2010-10-08 20:32:25.317464396 +0200
+@@ -3,7 +3,7 @@
+ HEADERS += $$PWD/qtiffhandler_p.h
+ SOURCES += $$PWD/qtiffhandler.cpp
+ contains(QT_CONFIG, system-tiff) {
+-        if(unix|win32-g++*):LIBS += -ltiff
++        if(unix|win32*):LIBS += -ltiff
+         else:win32:         LIBS += libtiff.lib
+ } else {
+     include($$PWD/../../3rdparty/libtiff.pri)
+--- src/gui/image/qjpeghandler.pri.orig	2010-10-08 20:42:27.307191472 +0200
++++ src/gui/image/qjpeghandler.pri	2010-10-08 20:42:37.777969376 +0200
+@@ -3,7 +3,7 @@
+ HEADERS += $$PWD/qjpeghandler_p.h
+ SOURCES += $$PWD/qjpeghandler.cpp
+ contains(QT_CONFIG, system-jpeg) {
+-    if(unix|win32-g++*): LIBS += -ljpeg
++    if(unix|win32*): LIBS += -ljpeg
+     else:win32:          LIBS += libjpeg.lib
+ } else {
+     include($$PWD/../../3rdparty/libjpeg.pri)
+--- src/activeqt/container/container.pro.orig	2010-10-08 21:03:03.682171968 +0200
++++ src/activeqt/container/container.pro	2010-10-08 21:03:10.760698484 +0200
+@@ -19,7 +19,7 @@
+ 
+ LIBS    += -lole32 -loleaut32
+ !wince*:LIBS    += -luser32 -lgdi32 -ladvapi32
+-win32-g++*:LIBS += -luuid
++win32-*:LIBS += -luuid
+ 
+ HEADERS =   ../control/qaxaggregated.h \
+             qaxbase.h \
+--- src/activeqt/control/control.pro.orig	2010-10-08 21:09:09.440376385 +0200
++++ src/activeqt/control/control.pro	2010-10-08 21:09:27.799741863 +0200
+@@ -18,11 +18,11 @@
+ QTDIR_build:DESTDIR  = $$QT_BUILD_TREE\\lib
+ 
+ DEFINES	+= QAX_SERVER
+-win32-g++*:DEFINES += QT_NEEDS_QMAIN
++win32-*:DEFINES += QT_NEEDS_QMAIN
+ win32-borland:DEFINES += QT_NEEDS_QMAIN
+ 
+ LIBS    += -luser32 -lole32 -loleaut32 -lgdi32
+-win32-g++*:LIBS += -luuid
++win32-*:LIBS += -luuid
+ 
+ HEADERS =   qaxaggregated.h \
+             qaxbindable.h \
+--- examples/activeqt/activeqt.pro.orig	2010-10-08 21:32:07.001818545 +0200
++++ examples/activeqt/activeqt.pro	2010-10-08 21:32:13.528303815 +0200
+@@ -11,7 +11,7 @@
+ 
+ # For now only the contain examples with mingw, for the others you need
+ # an IDL compiler
+-win32-g++*|wince*:SUBDIRS = webbrowser
++win32-*|wince*:SUBDIRS = webbrowser
+ 
+ # install
+ target.path = $$[QT_INSTALL_EXAMPLES]/activeqt
+--- config.tests/x11/opengl/opengl.pro.orig	2010-10-08 23:23:52.367823753 +0200
++++ config.tests/x11/opengl/opengl.pro	2010-10-08 23:23:59.405346051 +0200
+@@ -7,5 +7,5 @@
+ }
+ 
+ CONFIG -= qt
+-win32-g++*:LIBS += -lopengl32
++win32-*:LIBS += -lopengl32
+ else:LIBS += -lGL -lGLU


More information about the scm-commits mailing list