vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <[email protected]> | Fri Feb 27 15:08:25 2015 +0100| [1349ef2cd6e645e92e10ba32548704135fa25cc8] | committer: Jean-Baptiste Kempf
Contribs: re-add Qt4 for Windows The number of regressions on Qt5 on Windows is too high... > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=1349ef2cd6e645e92e10ba32548704135fa25cc8 --- contrib/src/qt/rules.mak | 2 +- contrib/src/qt4/QtCore.pc.in | 10 +++++ contrib/src/qt4/QtGui.pc.in | 10 +++++ contrib/src/qt4/SHA512SUMS | 1 + contrib/src/qt4/chroot.patch | 13 +++++++ contrib/src/qt4/cross.patch | 18 +++++++++ contrib/src/qt4/fix_header.sh | 5 +++ contrib/src/qt4/imageformats.patch | 14 +++++++ contrib/src/qt4/rules.mak | 75 ++++++++++++++++++++++++++++++++++++ contrib/src/qt4/styles.patch | 11 ++++++ contrib/src/qt4/win64.patch | 11 ++++++ 11 files changed, 169 insertions(+), 1 deletion(-) diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak index 4929d95..bd5ad43 100644 --- a/contrib/src/qt/rules.mak +++ b/contrib/src/qt/rules.mak @@ -7,7 +7,7 @@ ifdef HAVE_MACOSX #PKGS += qt endif ifdef HAVE_WIN32 -PKGS += qt +#PKGS += qt endif ifeq ($(call need_pkg,"QtCore QtGui"),) diff --git a/contrib/src/qt4/QtCore.pc.in b/contrib/src/qt4/QtCore.pc.in new file mode 100644 index 0000000..9b26c30 --- /dev/null +++ b/contrib/src/qt4/QtCore.pc.in @@ -0,0 +1,10 @@ +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 diff --git a/contrib/src/qt4/QtGui.pc.in b/contrib/src/qt4/QtGui.pc.in new file mode 100644 index 0000000..c8740f6 --- /dev/null +++ b/contrib/src/qt4/QtGui.pc.in @@ -0,0 +1,10 @@ +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 diff --git a/contrib/src/qt4/SHA512SUMS b/contrib/src/qt4/SHA512SUMS new file mode 100644 index 0000000..1b8ed83 --- /dev/null +++ b/contrib/src/qt4/SHA512SUMS @@ -0,0 +1 @@ +47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb qt-4.8.5.tar.gz diff --git a/contrib/src/qt4/chroot.patch b/contrib/src/qt4/chroot.patch new file mode 100644 index 0000000..6547ff0 --- /dev/null +++ b/contrib/src/qt4/chroot.patch @@ -0,0 +1,13 @@ +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 diff --git a/contrib/src/qt4/cross.patch b/contrib/src/qt4/cross.patch new file mode 100644 index 0000000..2afe85b --- /dev/null +++ b/contrib/src/qt4/cross.patch @@ -0,0 +1,18 @@ +--- 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" diff --git a/contrib/src/qt4/fix_header.sh b/contrib/src/qt4/fix_header.sh new file mode 100755 index 0000000..79f7dd9 --- /dev/null +++ b/contrib/src/qt4/fix_header.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +mv "$1" "$1.tmp" +sed 's,../../src,../src,' "$1.tmp" > "$1" +rm -f "$1.tmp" diff --git a/contrib/src/qt4/imageformats.patch b/contrib/src/qt4/imageformats.patch new file mode 100644 index 0000000..19e2fc2 --- /dev/null +++ b/contrib/src/qt4/imageformats.patch @@ -0,0 +1,14 @@ +--- 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 diff --git a/contrib/src/qt4/rules.mak b/contrib/src/qt4/rules.mak new file mode 100644 index 0000000..843ed9b --- /dev/null +++ b/contrib/src/qt4/rules.mak @@ -0,0 +1,75 @@ +# 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 $@ diff --git a/contrib/src/qt4/styles.patch b/contrib/src/qt4/styles.patch new file mode 100644 index 0000000..add2b75 --- /dev/null +++ b/contrib/src/qt4/styles.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/contrib/src/qt4/win64.patch b/contrib/src/qt4/win64.patch new file mode 100644 index 0000000..1d6a124 --- /dev/null +++ b/contrib/src/qt4/win64.patch @@ -0,0 +1,11 @@ +--- 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 + _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
