Commit 1349ef2c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contribs: re-add Qt4 for Windows

The number of regressions on Qt5 on Windows is too high...
parent d4bb3e3f
......@@ -7,7 +7,7 @@ ifdef HAVE_MACOSX
#PKGS += qt
endif
ifdef HAVE_WIN32
PKGS += qt
#PKGS += qt
endif
ifeq ($(call need_pkg,"QtCore QtGui"),)
......
prefix=@@PREFIX@@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/qt4/QtCore
Name: Qtcore
Description: Qtcore Library
Version: @@VERSION@@
Libs: -Wl,--subsystem,windows -mwindows -L${libdir} -lQtCore -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -ladvapi32 -lgdi32 -limm32 -lwsock32
Cflags: -I${prefix}/include/qt4 -I${includedir} -DQT_NODLL
prefix=@@PREFIX@@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/qt4/QtGui
Name: Qtgui
Description: Qtgui Library
Version: @@VERSION@@
Libs: -Wl,--subsystem,windows -mwindows -L${libdir} -lqjpeg -lqtaccessiblewidgets -lQtGui -lQtCore -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lgdi32 -limm32 -lwsock32
Cflags: -I${prefix}/include/qt4 -I${includedir} -DQT_NODLL
47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb qt-4.8.5.tar.gz
Fix build when using a 32-bit chroot with a x86_64 kernel
Native tools would be built with -m64
--- qt4/configure.orig 2011-11-11 14:48:12.944666802 -0500
+++ qt4/configure 2011-11-11 14:48:55.108875882 -0500
@@ -168,7 +168,7 @@
#-------------------------------------------------------------------------------
# need that throughout the script
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_MACHINE=`(gcc -dumpmachine|cut -d- -f1) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
--- qt4/configure.orig 2011-11-10 18:48:29.351058392 -0500
+++ qt4/configure 2011-11-10 18:50:40.971711056 -0500
@@ -8255,11 +8255,13 @@
fi
# X11/Unix/Mac only configs
+if [ "$XPLATFORM_MINGW" != "yes" ]; then
[ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
[ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
-if [ "$XPLATFORM_SYMBIAN" = "no" ]; then
- # Do not apply following negative X11/Unix/Mac only flags on Symbian, so that
+fi
+if [ "$XPLATFORM_SYMBIAN" = "no" -a "$XPLATFORM_MINGW" != "yes" ]; then
+ # Do not apply following negative X11/Unix/Mac only flags on Symbian or MinGW, so that
# configuration matches with the one generated by configure executable tool
[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
[ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
#!/bin/sh
mv "$1" "$1.tmp"
sed 's,../../src,../src,' "$1.tmp" > "$1"
rm -f "$1.tmp"
--- qt4/src/plugins/imageformats/imageformats.pro.orig 2011-11-10 18:56:04.617315921 -0500
+++ qt4/src/plugins/imageformats/imageformats.pro 2011-11-10 18:56:39.269487754 -0500
@@ -1,8 +1,8 @@
TEMPLATE = subdirs
-!contains(QT_CONFIG, no-jpeg):!contains(QT_CONFIG, jpeg):SUBDIRS += jpeg
+!contains(QT_CONFIG, no-libjpeg):!contains(QT_CONFIG, libjpeg):SUBDIRS += jpeg
!contains(QT_CONFIG, no-gif):!contains(QT_CONFIG, gif):SUBDIRS += gif
-!contains(QT_CONFIG, no-mng):!contains(QT_CONFIG, mng):SUBDIRS += mng
+!contains(QT_CONFIG, no-libmng):!contains(QT_CONFIG, libmng):SUBDIRS += mng
contains(QT_CONFIG, svg):SUBDIRS += svg
-!contains(QT_CONFIG, no-tiff):!contains(QT_CONFIG, tiff):SUBDIRS += tiff
+!contains(QT_CONFIG, no-libtiff):!contains(QT_CONFIG, libtiff):SUBDIRS += tiff
!contains(QT_CONFIG, no-ico):SUBDIRS += ico
# qt4
QT4_VERSION = 4.8.5
QT4_URL := http://download.qt-project.org/official_releases/qt/4.8/$(QT4_VERSION)/qt-everywhere-opensource-src-$(QT4_VERSION).tar.gz
ifdef HAVE_MACOSX
#PKGS += qt4
endif
ifdef HAVE_WIN32
PKGS += qt4
endif
ifeq ($(call need_pkg,"QtCore QtGui"),)
PKGS_FOUND += qt4
endif
$(TARBALLS)/qt-$(QT4_VERSION).tar.gz:
$(call download,$(QT4_URL))
.sum-qt4: qt-$(QT4_VERSION).tar.gz
qt4: qt-$(QT4_VERSION).tar.gz .sum-qt4
$(UNPACK)
mv qt-everywhere-opensource-src-$(QT4_VERSION) qt-$(QT4_VERSION)
$(APPLY) $(SRC)/qt4/cross.patch
$(APPLY) $(SRC)/qt4/styles.patch
$(APPLY) $(SRC)/qt4/chroot.patch
$(APPLY) $(SRC)/qt4/imageformats.patch
$(APPLY) $(SRC)/qt4/win64.patch
$(MOVE)
ifdef HAVE_MACOSX
QT_PLATFORM := -platform darwin-g++
endif
ifdef HAVE_WIN32
QT_PLATFORM := -xplatform win32-g++ -device-option CROSS_COMPILE=$(HOST)-
endif
.qt4: qt4
cd $< && ./configure $(QT_PLATFORM) -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
cd $< && $(MAKE) sub-src
# BUILDING QT BUILD TOOLS
ifdef HAVE_CROSS_COMPILE
cd $</src/tools; $(MAKE) clean; \
for i in bootstrap uic rcc moc; \
do (cd $$i; ../../../bin/qmake); \
done; \
../../../bin/qmake; \
$(MAKE)
endif
# INSTALLING LIBRARIES
for lib in QtGui QtCore QtNetwork QtXml; \
do install -D -- $</lib/lib$${lib}.a "$(PREFIX)/lib/lib$${lib}.a"; \
done
# INSTALLING PLUGINS
install -D -- $</plugins/imageformats/libqjpeg.a "$(PREFIX)/lib/libqjpeg.a"
install -D -- $</plugins/accessible/libqtaccessiblewidgets.a "$(PREFIX)/lib/libqtaccessiblewidgets.a"
# INSTALLING HEADERS
for h in corelib gui xml network; \
do (cd $</src/$${h} && find . -type f -name '*.h' -exec install -D -- "{}" "$(PREFIX)/include/qt4/src/$${h}/{}" \;) ; \
done
for h in Core Gui Xml Network; \
do (cd $</include/Qt$${h} && find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) -exec install -D -s --strip-program="$(abspath $(SRC)/qt4/fix_header.sh)" -- "{}" "$(PREFIX)/include/qt4/Qt$${h}/{}" \;) ; \
done
# INSTALLING PKGCONFIG FILES
install -d "$(PREFIX)/lib/pkgconfig"
for i in Core Gui; \
do cat $(SRC)/qt4/Qt$${i}.pc.in | sed -e s/@@VERSION@@/$(QT4_VERSION)/ | sed -e 's|@@PREFIX@@|$(PREFIX)|' > "$(PREFIX)/lib/pkgconfig/Qt$${i}.pc"; \
done
# INSTALLING QT BUILD TOOLS
install -d "$(PREFIX)/bin/"
for i in rcc moc uic; \
do cp $</bin/$$i* "$(PREFIX)/bin"; \
done
touch $@
--- qt4/configure.orig 2011-11-10 17:44:02.427883340 -0500
+++ qt4/configure 2011-11-10 17:44:13.915940309 -0500
@@ -584,7 +584,7 @@
rm -f "$outpath/config.tests/.qmake.cache"
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
-QMakeVar add styles "cde mac motif plastique cleanlooks windows"
+QMakeVar add styles "mac windows"
QMakeVar add decorations "default windows styled"
QMakeVar add mouse-drivers "pc"
if [ "$UNAME_SYSTEM" = "Linux" ] ; then
--- qt4/src/corelib/tools/qsimd.cpp.orig 2013-08-16 21:25:28.069333245 +0200
+++ qt4/src/corelib/tools/qsimd.cpp 2013-08-16 21:25:35.061332951 +0200
@@ -47,7 +47,7 @@
#include <windows.h>
#endif
-#if defined(Q_OS_WIN64) && !defined(Q_CC_GNU)
+#if defined(Q_OS_WIN64)
#include <intrin.h>
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment