From 4041a1e1054a2468dd2ab87f4d1cd4995bb59c16 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 10 Dec 2013 11:09:23 -0600 Subject: [PATCH] 5.2.0-0.12.rc1 - support out-of-src-tree builds - %ix86: install sse2/jit version to %_qt5_libdir/sse2/ --- qt5-qtdeclarative.spec | 45 +++++++++++++++---- ...ive-opensource-src-5.2.0-NO_I386_JIT.patch | 37 ++++++++------- 2 files changed, 54 insertions(+), 28 deletions(-) rename qtdeclarative-opensource-src-5.2.0-fedora_i686_flags.patch => qtdeclarative-opensource-src-5.2.0-NO_I386_JIT.patch (56%) diff --git a/qt5-qtdeclarative.spec b/qt5-qtdeclarative.spec index 13390a3..f13d8c6 100644 --- a/qt5-qtdeclarative.spec +++ b/qt5-qtdeclarative.spec @@ -12,7 +12,7 @@ Summary: Qt5 - QtDeclarative component Name: qt5-%{qt_module} Version: 5.2.0 -Release: 0.11.%{pre}%{?dist} +Release: 0.12.%{pre}%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -23,8 +23,8 @@ Source0: http://download.qt-project.org/development_releases/qt/5.2/%{version}-% Source0: http://download.qt-project.org/official_releases/qt/5.2/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz %endif -# fedora i686 builds cannot assume -march=pentium4 -msse2 -mfpmath=sse flags, or the JIT that needs them -Patch1: qtdeclarative-opensource-src-5.2.0-fedora_i686_flags.patch +# support NO_I386_JIT CONFIG (fedora i686 builds cannot assume -march=pentium4 -msse2 -mfpmath=sse flags, or the JIT that needs them) +Patch1: qtdeclarative-opensource-src-5.2.0-NO_I386_JIT.patch Obsoletes: qt5-qtjsbackend < 5.2.0 @@ -65,24 +65,44 @@ BuildArch: noarch %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?pre:-%{pre}} -%patch1 -p1 -b .fedora_i686_flags +%patch1 -p1 -b .NO_I386_JIT %build -%{_qt5_qmake} +mkdir -p %{_target_platform} +pushd %{_target_platform} +%{_qt5_qmake} .. +popd -make %{?_smp_mflags} +make %{?_smp_mflags} -C %{_target_platform} + +%ifarch %{ix86} +# build libQt5Qml with NO_I386_JIT +mkdir -p %{_target_platform}-nojit +pushd %{_target_platform}-nojit +%{_qt5_qmake} CONFIG+=NO_I386_JIT .. +popd + +make sub-src-clean -C %{_target_platform}-nojit/ +make %{?_smp_mflags} -C %{_target_platform}-nojit/src/qml +%endif %if 0%{?docs} -make %{?_smp_mflags} docs +make %{?_smp_mflags} docs -C %{_target_platform} %endif %install -make install INSTALL_ROOT=%{buildroot} +make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} + +%ifarch %{ix86} +mkdir -p %{buildroot}%{_qt5_libdir}/sse2 +mv %{buildroot}%{_qt5_libdir}/libQt5Qml.so.5* %{buildroot}%{_qt5_libdir}/sse2/ +make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-nojit/src/qml +%endif %if 0%{?docs} -make install_docs INSTALL_ROOT=%{buildroot} +make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} %endif # hardlink files to %{_bindir}, add -qt5 postfix to not conflict @@ -121,6 +141,9 @@ popd %doc LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt %doc dist/changes* %{_qt5_libdir}/libQt5Qml.so.5* +%ifarch %{ix86} +%{_qt5_libdir}/sse2/libQt5Qml.so.5* +%endif %{_qt5_libdir}/libQt5Quick.so.5* %{_qt5_libdir}/libQt5QuickParticles.so.5* %{_qt5_libdir}/libQt5QuickTest.so.5* @@ -156,6 +179,10 @@ popd %changelog +* Tue Dec 10 2013 Rex Dieter - 5.2.0-0.12.rc1 +- support out-of-src-tree builds +- %%ix86: install sse2/jit version to %%_qt5_libdir/sse2/ + * Thu Dec 05 2013 Rex Dieter 5.2.0-0.11.rc1 - %%ix86: cannot assume sse2 (and related support) or the JIT that requires it... disable. diff --git a/qtdeclarative-opensource-src-5.2.0-fedora_i686_flags.patch b/qtdeclarative-opensource-src-5.2.0-NO_I386_JIT.patch similarity index 56% rename from qtdeclarative-opensource-src-5.2.0-fedora_i686_flags.patch rename to qtdeclarative-opensource-src-5.2.0-NO_I386_JIT.patch index d99cb36..460e903 100644 --- a/qtdeclarative-opensource-src-5.2.0-fedora_i686_flags.patch +++ b/qtdeclarative-opensource-src-5.2.0-NO_I386_JIT.patch @@ -1,30 +1,29 @@ diff -up qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/jsruntime.pri.fedora_i686_flags qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/jsruntime.pri --- qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/jsruntime.pri.fedora_i686_flags 2013-11-26 19:02:16.000000000 -0600 -+++ qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/jsruntime.pri 2013-12-05 21:48:03.545285131 -0600 -@@ -91,10 +91,10 @@ HEADERS += \ - ++++ qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/jsruntime.pri 2013-12-10 10:27:16.082852640 -0600 +@@ -92,9 +92,12 @@ HEADERS += \ # Use SSE2 floating point math on 32 bit instead of the default # 387 to make test results pass on 32 and on 64 bit builds. --linux-g++*:isEqual(QT_ARCH,i386) { -- QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse -- QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse + linux-g++*:isEqual(QT_ARCH,i386) { ++CONFIG(NO_I386_JIT) { ++ DEFINES += NO_I386_JIT ++} else { + QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse + QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse -} -+#linux-g++*:isEqual(QT_ARCH,i386) { -+# QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse -+# QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse -+#} ++}} valgrind { DEFINES += V4_USE_VALGRIND diff -up qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/qv4global_p.h.fedora_i686_flags qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/qv4global_p.h --- qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/qv4global_p.h.fedora_i686_flags 2013-11-26 19:02:16.000000000 -0600 -+++ qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/qv4global_p.h 2013-12-05 21:47:38.745545142 -0600 -@@ -70,7 +70,7 @@ inline double trunc(double d) { return d ++++ qtdeclarative-opensource-src-5.2.0-rc1/src/qml/jsruntime/qv4global_p.h 2013-12-10 10:02:14.360839311 -0600 +@@ -84,7 +84,7 @@ inline double trunc(double d) { return d - // White list architectures - --#if defined(Q_PROCESSOR_X86) -+#if defined(Q_PROCESSOR_X86_NOT_ON_FEDORA) - #define V4_ENABLE_JIT - #elif defined(Q_PROCESSOR_X86_64) - #define V4_ENABLE_JIT + // Black list some platforms + #if defined(V4_ENABLE_JIT) +-#if defined(Q_OS_IOS) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT) ++#if defined(Q_OS_IOS) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT) || defined(NO_I386_JIT) + # undef V4_ENABLE_JIT + #endif + #endif