[vlc-devel] [PATCH 2/2] contrib: qt: Qt 5.2.1

Rafaël Carré funman at videolan.org
Tue Mar 11 20:51:18 CET 2014


---
 contrib/src/qt/Qt5Core.pc.in       | 10 +++++
 contrib/src/qt/Qt5Gui.pc.in        | 10 +++++
 contrib/src/qt/Qt5Widgets.pc.in    | 10 +++++
 contrib/src/qt/SHA512SUMS          |  1 +
 contrib/src/qt/fix_header.sh       |  5 +++
 contrib/src/qt/rules.mak           | 72 ++++++++++++++++++++++++++++++++++++
 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 ------
 16 files changed, 108 insertions(+), 168 deletions(-)
 create mode 100644 contrib/src/qt/Qt5Core.pc.in
 create mode 100644 contrib/src/qt/Qt5Gui.pc.in
 create mode 100644 contrib/src/qt/Qt5Widgets.pc.in
 create mode 100644 contrib/src/qt/SHA512SUMS
 create mode 100755 contrib/src/qt/fix_header.sh
 create mode 100644 contrib/src/qt/rules.mak
 delete mode 100644 contrib/src/qt4/QtCore.pc.in
 delete mode 100644 contrib/src/qt4/QtGui.pc.in
 delete mode 100644 contrib/src/qt4/SHA512SUMS
 delete mode 100644 contrib/src/qt4/chroot.patch
 delete mode 100644 contrib/src/qt4/cross.patch
 delete mode 100755 contrib/src/qt4/fix_header.sh
 delete mode 100644 contrib/src/qt4/imageformats.patch
 delete mode 100644 contrib/src/qt4/rules.mak
 delete mode 100644 contrib/src/qt4/styles.patch
 delete mode 100644 contrib/src/qt4/win64.patch

diff --git a/contrib/src/qt/Qt5Core.pc.in b/contrib/src/qt/Qt5Core.pc.in
new file mode 100644
index 0000000..7143c28
--- /dev/null
+++ b/contrib/src/qt/Qt5Core.pc.in
@@ -0,0 +1,10 @@
+prefix=@@PREFIX@@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/qt5/QtCore
+
+Name: Qt5core
+Description: Qt5core Library
+Version: @@VERSION@@
+Libs: -Wl,--subsystem,windows -mwindows -L${libdir} -lQt5Core -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -ladvapi32 -lgdi32 -limm32 -lwsock32
+Cflags:  -I${prefix}/include/qt5 -I${includedir}
diff --git a/contrib/src/qt/Qt5Gui.pc.in b/contrib/src/qt/Qt5Gui.pc.in
new file mode 100644
index 0000000..f99a69f
--- /dev/null
+++ b/contrib/src/qt/Qt5Gui.pc.in
@@ -0,0 +1,10 @@
+prefix=@@PREFIX@@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/qt5/QtGui
+
+Name: Qt5gui
+Description: Qt5gui Library
+Version: @@VERSION@@
+Libs: -Wl,--subsystem,windows -mwindows -L${libdir} -lQt5Gui -lQt5Core -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lgdi32 -limm32 -lwsock32
+Cflags: -I${prefix}/include/qt5 -I${includedir}
diff --git a/contrib/src/qt/Qt5Widgets.pc.in b/contrib/src/qt/Qt5Widgets.pc.in
new file mode 100644
index 0000000..e8e7896
--- /dev/null
+++ b/contrib/src/qt/Qt5Widgets.pc.in
@@ -0,0 +1,10 @@
+prefix=@@PREFIX@@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/qt5/QtWidgets
+
+Name: Qt5widgets
+Description: Qt5widgets Library
+Version: @@VERSION@@
+Libs: -Wl,--subsystem,windows -mwindows -L${libdir} -lqwindows -lqtaccessiblewidgets -lQt5Widgets -lQt5Gui -lQt5Core -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lgdi32 -limm32 -lwsock32
+Cflags: -I${prefix}/include/qt5 -I${includedir}
diff --git a/contrib/src/qt/SHA512SUMS b/contrib/src/qt/SHA512SUMS
new file mode 100644
index 0000000..127d82f
--- /dev/null
+++ b/contrib/src/qt/SHA512SUMS
@@ -0,0 +1 @@
+72ef00e9828bf19b2a3daca1c0fa6b0f458c4847da79d4066c818526b8dac504fa4c54496b5d6c67dbea4e786bd811ee8f87614146e684a117d9b86df580e07d  qt-5.2.1.tar.xz
diff --git a/contrib/src/qt/fix_header.sh b/contrib/src/qt/fix_header.sh
new file mode 100755
index 0000000..79f7dd9
--- /dev/null
+++ b/contrib/src/qt/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/qt/rules.mak b/contrib/src/qt/rules.mak
new file mode 100644
index 0000000..77e415b
--- /dev/null
+++ b/contrib/src/qt/rules.mak
@@ -0,0 +1,72 @@
+# qt
+
+QT_VERSION = 5.2.1
+QT_URL := http://download.qt-project.org/official_releases/qt/5.2/$(QT_VERSION)/submodules/qtbase-opensource-src-$(QT_VERSION).tar.xz
+
+ifdef HAVE_MACOSX
+#PKGS += qt
+endif
+ifdef HAVE_WIN32
+PKGS += qt
+endif
+
+ifeq ($(call need_pkg,"QtCore QtGui"),)
+ifeq ($(call need_pkg,"Qt5Core Qt5Gui Qt5Widgets"),)
+PKGS_FOUND += qt
+endif
+endif
+
+$(TARBALLS)/qt-$(QT_VERSION).tar.xz:
+	$(call download,$(QT_URL))
+
+.sum-qt: qt-$(QT_VERSION).tar.xz
+
+qt: qt-$(QT_VERSION).tar.xz .sum-qt
+	$(UNPACK)
+	mv qtbase-opensource-src-$(QT_VERSION) qt-$(QT_VERSION)
+	$(MOVE)
+
+ifdef HAVE_MACOSX
+QT_PLATFORM := -platform darwin-g++
+endif
+ifdef HAVE_WIN32
+QT_PLATFORM := -xplatform win32-g++ -device-option CROSS_COMPILE=$(HOST)-
+endif
+
+.qt: qt
+	cd $< && ./configure $(QT_PLATFORM) -static -release -no-sql-sqlite -no-gif -qt-libjpeg -no-openssl -no-opengl -opensource -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; $(MAKE) clean; $(MAKE)); \
+		done
+endif
+	# INSTALLING LIBRARIES
+	for lib in Widgets Gui Core; \
+		do install -D -- $</lib/libQt5$${lib}.a "$(PREFIX)/lib/libQt5$${lib}.a"; \
+	done
+	# INSTALLING PLUGINS
+	install -D -- $</plugins/platforms/libqwindows.a "$(PREFIX)/lib/libqwindows.a"
+	install -D -- $</plugins/accessible/libqtaccessiblewidgets.a "$(PREFIX)/lib/libqtaccessiblewidgets.a"
+	# INSTALLING HEADERS
+	for h in corelib gui widgets; \
+		do (cd $</src/$${h} && find . -type f -name '*.h' -exec install -D -- "{}" "$(PREFIX)/include/qt5/src/$${h}/{}" \;) ; \
+	done
+	for h in Core Gui Widgets; \
+		do (cd $</include/Qt$${h} && find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) -exec install -D -s --strip-program="$(abspath $(SRC)/qt/fix_header.sh)" -- "{}" "$(PREFIX)/include/qt5/Qt$${h}/{}" \;) ; \
+	done
+	mkdir -p "$(PREFIX)/include/qt5/qpa"
+	echo "#include \"../src/gui/kernel/qplatformnativeinterface.h\"" > "$(PREFIX)/include/qt5/qpa/qplatformnativeinterface.h"
+	# INSTALLING PKGCONFIG FILES
+	install -d "$(PREFIX)/lib/pkgconfig"
+	for i in Core Gui Widgets; \
+		do cat $(SRC)/qt/Qt5$${i}.pc.in | sed -e s/@@VERSION@@/$(QT_VERSION)/ | sed -e 's|@@PREFIX@@|$(PREFIX)|' > "$(PREFIX)/lib/pkgconfig/Qt5$${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/QtCore.pc.in b/contrib/src/qt4/QtCore.pc.in
deleted file mode 100644
index 9b26c30..0000000
--- a/contrib/src/qt4/QtCore.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-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
deleted file mode 100644
index c8740f6..0000000
--- a/contrib/src/qt4/QtGui.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-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
deleted file mode 100644
index 1b8ed83..0000000
--- a/contrib/src/qt4/SHA512SUMS
+++ /dev/null
@@ -1 +0,0 @@
-47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb  qt-4.8.5.tar.gz
diff --git a/contrib/src/qt4/chroot.patch b/contrib/src/qt4/chroot.patch
deleted file mode 100644
index 6547ff0..0000000
--- a/contrib/src/qt4/chroot.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 2afe85b..0000000
--- a/contrib/src/qt4/cross.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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
deleted file mode 100755
index 79f7dd9..0000000
--- a/contrib/src/qt4/fix_header.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/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
deleted file mode 100644
index 19e2fc2..0000000
--- a/contrib/src/qt4/imageformats.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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
deleted file mode 100644
index 843ed9b..0000000
--- a/contrib/src/qt4/rules.mak
+++ /dev/null
@@ -1,75 +0,0 @@
-# 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
deleted file mode 100644
index add2b75..0000000
--- a/contrib/src/qt4/styles.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 1d6a124..0000000
--- a/contrib/src/qt4/win64.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
- 
-- 
1.9.0




More information about the vlc-devel mailing list