diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da6381c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/qtdeclarative-opensource-src-5.6.1.tar.xz diff --git a/.qt5-qtdeclarative.metadata b/.qt5-qtdeclarative.metadata new file mode 100644 index 0000000..d07ca22 --- /dev/null +++ b/.qt5-qtdeclarative.metadata @@ -0,0 +1 @@ +e79365a05d963d92a703f8013fd83608bda832b4 SOURCES/qtdeclarative-opensource-src-5.6.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/Check-for-NULL-from-glGetString.patch b/SOURCES/Check-for-NULL-from-glGetString.patch new file mode 100644 index 0000000..5d8e04e --- /dev/null +++ b/SOURCES/Check-for-NULL-from-glGetString.patch @@ -0,0 +1,116 @@ +From d4efd5ab810e92202efe672be29136324dd2a3f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= +Date: Mon, 28 Dec 2015 05:43:18 +0200 +Subject: [PATCH] Check for NULL from glGetString + +glGetString can return NULL pointer in case of error +so check for it before using. + +Change-Id: Ia07424c8f2b3ce6dce675514900a509e3ef3b739 +--- + src/particles/qquickimageparticle.cpp | 6 ++++-- + src/quick/scenegraph/qsgcontext.cpp | 22 ++++++++++++++++------ + .../qsgdefaultdistancefieldglyphcache.cpp | 8 +++++--- + src/quick/scenegraph/util/qsgatlastexture.cpp | 4 ++-- + 4 files changed, 27 insertions(+), 13 deletions(-) + +diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp +index d78a350..b54861e 100644 +--- a/src/particles/qquickimageparticle.cpp ++++ b/src/particles/qquickimageparticle.cpp +@@ -1276,14 +1276,16 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) + // OS X 10.8.3 introduced a bug in the AMD drivers, for at least the 2011 macbook pros, + // causing point sprites who read gl_PointCoord in the frag shader to come out as + // green-red blobs. +- if (perfLevel < Deformable && strstr((char *) glGetString(GL_VENDOR), "ATI")) { ++ const char *vendor = (const char *) glGetString(GL_VENDOR); ++ if (perfLevel < Deformable && vendor && strstr(vendor, "ATI")) { + perfLevel = Deformable; + } + #endif + + #ifdef Q_OS_LINUX + // Nouveau drivers can potentially freeze a machine entirely when taking the point-sprite path. +- if (perfLevel < Deformable && strstr((const char *) glGetString(GL_VENDOR), "nouveau")) ++ const char *vendor = (const char *) glGetString(GL_VENDOR); ++ if (perfLevel < Deformable && vendor && strstr(vendor, "nouveau")) + perfLevel = Deformable; + #endif + +diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp +index dd6977e..43d549f 100644 +--- a/src/quick/scenegraph/qsgcontext.cpp ++++ b/src/quick/scenegraph/qsgcontext.cpp +@@ -624,14 +624,24 @@ void QSGRenderContext::initialize(QOpenGLContext *context) + m_sg->renderContextInitialized(this); + + #ifdef Q_OS_LINUX ++ while (funcs->glGetError() != GL_NO_ERROR); ++ + const char *vendor = (const char *) funcs->glGetString(GL_VENDOR); +- if (strstr(vendor, "nouveau")) +- m_brokenIBOs = true; + const char *renderer = (const char *) funcs->glGetString(GL_RENDERER); +- if (strstr(renderer, "llvmpipe")) +- m_serializedRender = true; +- if (strstr(vendor, "Hisilicon Technologies") && strstr(renderer, "Immersion.16")) +- m_brokenIBOs = true; ++ ++ if (vendor && renderer) { ++ if (strstr(vendor, "nouveau")) ++ m_brokenIBOs = true; ++ if (strstr(renderer, "llvmpipe")) ++ m_serializedRender = true; ++ if (strstr(vendor, "Hisilicon Technologies") && strstr(renderer, "Immersion.16")) ++ m_brokenIBOs = true; ++ } else { ++ GLenum err; ++ while ((err = funcs->glGetError()) != GL_NO_ERROR) { ++ qWarning("QSGRenderContext::initialize: GL error %x from glGetString", err); ++ } ++ } + #endif + + emit initialized(); +diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp +index dcc485c..43e234b 100644 +--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp ++++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp +@@ -488,9 +488,11 @@ bool QSGDefaultDistanceFieldGlyphCache::useTextureUploadWorkaround() const + static bool set = false; + static bool useWorkaround = false; + if (!set) { +- useWorkaround = qstrcmp(reinterpret_cast(m_funcs->glGetString(GL_RENDERER)), +- "Mali-400 MP") == 0; +- set = true; ++ const char *renderer = reinterpret_cast(m_funcs->glGetString(GL_RENDERER)); ++ if (renderer) { ++ useWorkaround = qstrcmp(renderer, "Mali-400 MP") == 0; ++ set = true; ++ } + } + return useWorkaround; + } +diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp +index 8e8e870..d726907 100644 +--- a/src/quick/scenegraph/util/qsgatlastexture.cpp ++++ b/src/quick/scenegraph/util/qsgatlastexture.cpp +@@ -150,13 +150,13 @@ Atlas::Atlas(const QSize &size) + wrongfullyReportsBgra8888Support = false; + + const char *ext = (const char *) QOpenGLContext::currentContext()->functions()->glGetString(GL_EXTENSIONS); +- if (!wrongfullyReportsBgra8888Support ++ if (!wrongfullyReportsBgra8888Support && ext + && (strstr(ext, "GL_EXT_bgra") + || strstr(ext, "GL_EXT_texture_format_BGRA8888") + || strstr(ext, "GL_IMG_texture_format_BGRA8888"))) { + m_internalFormat = m_externalFormat = GL_BGRA; + #ifdef Q_OS_IOS +- } else if (strstr(ext, "GL_APPLE_texture_format_BGRA8888")) { ++ } else if (ext && strstr(ext, "GL_APPLE_texture_format_BGRA8888")) { + m_internalFormat = GL_RGBA; + m_externalFormat = GL_BGRA; + #endif // IOS +-- +1.9.3 + diff --git a/SOURCES/qt5-qtdeclarative-5.6.1-only-release-types-when-they-are-not-referenced-anymore.patch b/SOURCES/qt5-qtdeclarative-5.6.1-only-release-types-when-they-are-not-referenced-anymore.patch new file mode 100644 index 0000000..885da67 --- /dev/null +++ b/SOURCES/qt5-qtdeclarative-5.6.1-only-release-types-when-they-are-not-referenced-anymore.patch @@ -0,0 +1,41 @@ +diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp +index c684c86..01200fd 100644 +--- a/src/qml/qml/qqmltypeloader.cpp ++++ b/src/qml/qml/qqmltypeloader.cpp +@@ -1961,7 +1961,8 @@ void QQmlTypeLoader::trimCache() + QList unneededTypes; + for (TypeCache::Iterator iter = m_typeCache.begin(), end = m_typeCache.end(); iter != end; ++iter) { + QQmlTypeData *typeData = iter.value(); +- if (typeData->m_compiledData && typeData->m_compiledData->count() == 1) { ++ if (typeData->m_compiledData && typeData->count() == 1 ++ && typeData->m_compiledData->count() == 1) { + // There are no live objects of this type + unneededTypes.append(iter); + } +diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp +index 7045c7c..a1eaa05 100644 +--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp ++++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp +@@ -86,10 +86,19 @@ void tst_QQMLTypeLoader::trimCache() + url.setQuery(QString::number(i)); + + QQmlTypeData *data = loader.getType(url); +- if (i % 5 == 0) // keep references to some of them so that they aren't trimmed +- data->compiledData()->addref(); ++ // Run an event loop to receive the callback that release()es. ++ QTRY_COMPARE(data->count(), 2); + +- data->release(); ++ // keep references to some of them so that they aren't trimmed. References to either the ++ // QQmlTypeData or its compiledData() should prevent the trimming. ++ if (i % 10 == 0) { ++ // keep ref on data, don't add ref on data->compiledData() ++ } else if (i % 5 == 0) { ++ data->compiledData()->addref(); ++ data->release(); ++ } else { ++ data->release(); ++ } + } + + for (int i = 0; i < 256; ++i) { diff --git a/SOURCES/qtdeclarative-QQuickShaderEffectSource_deadlock.patch b/SOURCES/qtdeclarative-QQuickShaderEffectSource_deadlock.patch new file mode 100644 index 0000000..ce3660c --- /dev/null +++ b/SOURCES/qtdeclarative-QQuickShaderEffectSource_deadlock.patch @@ -0,0 +1,15 @@ +--- qtdeclarative-opensource-src-5.4.2/src/quick/items/qquickshadereffectsource.cpp 2015-06-30 07:30:51.938794778 +0200 ++++ qtdeclarative-opensource-src-5.4.2/src/quick/items/qquickshadereffectsource.cpp.orig 2015-06-30 07:29:47.019163937 +0200 +@@ -632,8 +632,12 @@ + + const QSize minTextureSize = d->sceneGraphContext()->minimumFBOSize(); + // Keep power-of-two by doubling the size. ++ if (textureSize.width() < 1) ++ textureSize.rwidth() = 1; + while (textureSize.width() < minTextureSize.width()) + textureSize.rwidth() *= 2; ++ if (textureSize.height() < 1) ++ textureSize.rheight() = 1; + while (textureSize.height() < minTextureSize.height()) + textureSize.rheight() *= 2; + diff --git a/SOURCES/qtdeclarative-kdebug346118.patch b/SOURCES/qtdeclarative-kdebug346118.patch new file mode 100644 index 0000000..b131b10 --- /dev/null +++ b/SOURCES/qtdeclarative-kdebug346118.patch @@ -0,0 +1,19 @@ +--- src/qml/util/qqmladaptormodel.cpp.orig 2016-05-27 17:06:31.192332166 -0300 ++++ src/qml/util/qqmladaptormodel.cpp 2016-05-27 18:37:27.764552053 -0300 +@@ -163,8 +163,14 @@ public: + signalIndexes.append(propertyId + signalOffset); + } + +- for (int i = 0, c = items.count(); i < c; ++i) { +- QQmlDelegateModelItem *item = items.at(i); ++ const QList copy = items; ++ for (int i = 0, c = copy.count(); i < c; ++i) { ++ // Applying the same logic used in QQmlDelegateModel::_q_itemsRemoved(). ++ QQmlDelegateModelItem *item = copy.at(i); ++ if (!items.contains(item)) { ++ continue; ++ } ++ + const int idx = item->modelIndex(); + if (idx >= index && idx < index + count) { + for (int i = 0; i < signalIndexes.count(); ++i) diff --git a/SOURCES/qtdeclarative-opensource-src-5.5.0-no_sse2.patch b/SOURCES/qtdeclarative-opensource-src-5.5.0-no_sse2.patch new file mode 100644 index 0000000..c419395 --- /dev/null +++ b/SOURCES/qtdeclarative-opensource-src-5.5.0-no_sse2.patch @@ -0,0 +1,39 @@ +diff -up qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/jsruntime.pri.no_sse2 qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/jsruntime.pri +--- qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/jsruntime.pri.no_sse2 2015-06-29 15:12:38.000000000 -0500 ++++ qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/jsruntime.pri 2015-07-16 08:49:00.280760307 -0500 +@@ -111,6 +111,11 @@ SOURCES += \ + $$PWD/qv4string.cpp \ + $$PWD/qv4value.cpp + ++linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 { ++ QMAKE_CFLAGS += -msse2 -mfpmath=sse ++ QMAKE_CXXFLAGS += -msse2 -mfpmath=sse ++} ++ + valgrind { + DEFINES += V4_USE_VALGRIND + } +diff -up qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/qv4global_p.h.no_sse2 qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/qv4global_p.h +--- qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/qv4global_p.h.no_sse2 2015-06-29 15:12:38.000000000 -0500 ++++ qtdeclarative-opensource-src-5.5.0/src/qml/jsruntime/qv4global_p.h 2015-07-16 08:49:00.280760307 -0500 +@@ -74,7 +74,7 @@ inline double trunc(double d) { return d + // + // NOTE: This should match the logic in qv4targetplatform_p.h! + +-#if defined(Q_PROCESSOR_X86) && !defined(__ILP32__) \ ++#if defined(Q_PROCESSOR_X86) && !defined(__ILP32__) && defined(__SSE2__) \ + && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD)) + #define V4_ENABLE_JIT + #elif defined(Q_PROCESSOR_X86_64) && !defined(__ILP32__) \ +diff -up qtdeclarative-opensource-src-5.5.0/src/qml/qml/v8/qv8engine.cpp.no_sse2 qtdeclarative-opensource-src-5.5.0/src/qml/qml/v8/qv8engine.cpp +--- qtdeclarative-opensource-src-5.5.0/src/qml/qml/v8/qv8engine.cpp.no_sse2 2015-06-29 15:12:39.000000000 -0500 ++++ qtdeclarative-opensource-src-5.5.0/src/qml/qml/v8/qv8engine.cpp 2015-07-16 08:49:00.280760307 -0500 +@@ -123,7 +123,7 @@ QV8Engine::QV8Engine(QJSEngine* qq) + , m_xmlHttpRequestData(0) + , m_listModelData(0) + { +-#ifdef Q_PROCESSOR_X86_32 ++#if defined(Q_PROCESSOR_X86_32) && defined(__SSE2__) + if (!qCpuHasFeature(SSE2)) { + qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer"); + } diff --git a/SOURCES/qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch b/SOURCES/qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch new file mode 100644 index 0000000..eaf677e --- /dev/null +++ b/SOURCES/qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch @@ -0,0 +1,12 @@ +diff -up qtdeclarative-opensource-src-5.6.0/src/qml/qml.pro.1135 qtdeclarative-opensource-src-5.6.0/src/qml/qml.pro +--- qtdeclarative-opensource-src-5.6.0/src/qml/qml.pro.1135 2016-06-02 08:43:24.509068141 -0500 ++++ qtdeclarative-opensource-src-5.6.0/src/qml/qml.pro 2016-06-02 10:25:28.813766581 -0500 +@@ -21,7 +21,7 @@ exists("qqml_enable_gcov") { + + greaterThan(QT_GCC_MAJOR_VERSION, 5) { + # Our code is bad. Temporary workaround. +- QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks ++ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse + } + + QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf diff --git a/SOURCES/qtdeclarative-system_doubleconv.patch b/SOURCES/qtdeclarative-system_doubleconv.patch new file mode 100644 index 0000000..b68cd57 --- /dev/null +++ b/SOURCES/qtdeclarative-system_doubleconv.patch @@ -0,0 +1,22 @@ +diff -up qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/jsruntime.pri.system_doubleconv qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/jsruntime.pri +--- qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/jsruntime.pri.system_doubleconv 2016-05-20 08:25:07.986878324 -0500 ++++ qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/jsruntime.pri 2016-05-20 11:21:05.059471545 -0500 +@@ -118,4 +118,5 @@ valgrind { + + ios: DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1 + +-include(../../3rdparty/double-conversion/double-conversion.pri) ++INCLUDEPATH += /usr/include/double-conversion ++LIBS += -ldouble-conversion +diff -up qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/qv4runtime.cpp.system_doubleconv qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/qv4runtime.cpp +--- qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/qv4runtime.cpp.system_doubleconv 2016-02-26 03:34:34.000000000 -0600 ++++ qtdeclarative-opensource-src-5.6.0/src/qml/jsruntime/qv4runtime.cpp 2016-05-20 11:22:00.603641534 -0500 +@@ -60,7 +60,7 @@ + + #include + +-#include "../../3rdparty/double-conversion/double-conversion.h" ++#include + + #ifdef QV4_COUNT_RUNTIME_FUNCTIONS + # include diff --git a/SPECS/qt5-qtdeclarative.spec b/SPECS/qt5-qtdeclarative.spec new file mode 100644 index 0000000..ca68ffe --- /dev/null +++ b/SPECS/qt5-qtdeclarative.spec @@ -0,0 +1,483 @@ + +%global qt_module qtdeclarative + +# define to build docs, need to undef this for bootstrapping +# where qt5-qttools builds are not yet available +# only primary archs (for now), allow secondary to bootstrap +# global bootstrap 1 + +%if ! 0%{?bootstrap} +%ifarch %{arm} %{ix86} x86_64 +%global docs 1 +%global tests 1 +%endif +%endif + +%global nosse2_hack 1 + +#define prerelease + +Summary: Qt5 - QtDeclarative component +Name: qt5-%{qt_module} +Version: 5.6.1 +Release: 10%{?prerelease:.%{prerelease}}%{?dist} + +# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details +License: LGPLv2 with exceptions or GPLv3 with exceptions +Url: http://www.qt.io +Source0: http://download.qt.io/snapshots/qt/5.6/%{version}%{?prerelease:-%{prerelease}}/submodules/%{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}.tar.xz + +# support no_sse2 CONFIG (fedora i686 builds cannot assume -march=pentium4 -msse2 -mfpmath=sse flags, or the JIT that needs them) +# https://codereview.qt-project.org/#change,73710 +Patch1: qtdeclarative-opensource-src-5.5.0-no_sse2.patch + +# workaround for possible deadlock condition in QQuickShaderEffectSource +# https://bugzilla.redhat.com/show_bug.cgi?id=1237269 +# https://bugs.kde.org/show_bug.cgi?id=348385 +Patch2: qtdeclarative-QQuickShaderEffectSource_deadlock.patch + +## upstream patches + +# https://bugreports.qt.io/browse/QTBUG-53761 +Patch100: qt5-qtdeclarative-5.6.1-only-release-types-when-they-are-not-referenced-anymore.patch + +## upstreamable patches +# use system double-conversation +%if 0%{?fedora} +%global system_doubleconv 1 +BuildRequires: double-conversion-devel +%endif +Patch200: qtdeclarative-system_doubleconv.patch +# https://bugs.kde.org/show_bug.cgi?id=346118#c108 +Patch201: qtdeclarative-kdebug346118.patch +# additional i686/qml workaround (on top of existing patch135), https://bugzilla.redhat.com/1331593 +Patch235: qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch + +## upstream patches under review +# Check-for-NULL-from-glGetStrin +Patch500: Check-for-NULL-from-glGetString.patch + +Obsoletes: qt5-qtjsbackend < 5.2.0 + +BuildRequires: cmake +BuildRequires: qt5-qtbase-devel >= %{version} +BuildRequires: qt5-qtbase-private-devel +%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} +%if ! 0%{?bootstrap} +BuildRequires: pkgconfig(Qt5XmlPatterns) +%endif +BuildRequires: python + +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: mesa-dri-drivers +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif + +%description +%{summary}. + +%package devel +Summary: Development files for %{name} +Obsoletes: qt5-qtjsbackend-devel < 5.2.0 +Provides: %{name}-private-devel = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: qt5-qtbase-devel%{?_isa} +%description devel +%{summary}. + +%package static +Summary: Static library files for %{name} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +%description static +%{summary}. + +%if 0%{?docs} +%package doc +Summary: API documentation for %{name} +License: GFDL +Requires: %{name} = %{version}-%{release} +BuildRequires: qt5-qdoc +BuildRequires: qt5-qhelpgenerator +BuildArch: noarch +%description doc +%{summary}. +%endif + +%package examples +Summary: Programming examples for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +%description examples +%{summary}. + + +%prep +%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} +%if 0%{?nosse2_hack} +%patch1 -p1 -b .no_sse2 +%endif +%patch2 -p1 -b .QQuickShaderEffectSource_deadlock + +%patch100 -p1 -b .only-release-types-when-they-are-not-referenced-anymore + +%if 0%{?system_doubleconv} +%patch200 -p1 -b .system_doubleconv +rm -rfv src/3rdparty/double-conversion +%endif +%patch201 -p0 -b .kdebug346118 +%patch235 -p1 -b .qml_no-lifetime-dse + +%patch500 -p1 -b .Check-for-NULL-from-glGetString + + +%build +mkdir %{_target_platform} +pushd %{_target_platform} +%{qmake_qt5} .. +popd + +make %{?_smp_mflags} -C %{_target_platform} + +%if 0%{?nosse2_hack} +# build libQt5Qml with no_sse2 +mkdir -p %{_target_platform}-no_sse2 +pushd %{_target_platform}-no_sse2 +%{qmake_qt5} -config no_sse2 .. +make sub-src-clean +make %{?_smp_mflags} -C src/qml +popd +%endif + +%if 0%{?docs} +make %{?_smp_mflags} docs -C %{_target_platform} +%endif + + +%install +make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} + +%if 0%{?nosse2_hack} +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}-no_sse2/src/qml +%endif + +%if 0%{?docs} +make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%endif + +# hardlink files to %{_bindir}, add -qt5 postfix to not conflict +mkdir %{buildroot}%{_bindir} +pushd %{buildroot}%{_qt5_bindir} +for i in * ; do + case "${i}" in + # qt4 conflicts + qmlplugindump|qmlprofiler) + ln -v ${i} %{buildroot}%{_bindir}/${i}-qt5 + ln -sv ${i} ${i}-qt5 + ;; + # qtchooser stuff + qml|qmlbundle|qmlmin|qmlscene) + ln -v ${i} %{buildroot}%{_bindir}/${i} + ln -v ${i} %{buildroot}%{_bindir}/${i}-qt5 + ln -sv ${i} ${i}-qt5 + ;; + *) + ln -v ${i} %{buildroot}%{_bindir}/${i} + ;; + esac +done +popd + +## .prl/.la file love +# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs +pushd %{buildroot}%{_qt5_libdir} +for prl_file in libQt5*.prl ; do + sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} + if [ -f "$(basename ${prl_file} .prl).so" ]; then + rm -fv "$(basename ${prl_file} .prl).la" + sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} + fi +done +popd + +%check +%if 0%{?tests} +export CTEST_OUTPUT_ON_FAILURE=1 +export PATH=%{buildroot}%{_qt5_bindir}:$PATH +export LD_LIBRARY_PATH=%{buildroot}%{_qt5_libdir} +make sub-tests-all %{?_smp_mflags} -C %{_target_platform} +xvfb-run -a \ +dbus-launch --exit-with-session \ +time \ +make check -k -C %{_target_platform}/tests ||: +%endif + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%{!?_licensedir:%global license %%doc} +%license LICENSE.LGPL* LGPL_EXCEPTION.txt +%{_qt5_libdir}/libQt5Qml.so.5* +%if 0%{?nosse2_hack} +%{_qt5_libdir}/sse2/libQt5Qml.so.5* +%endif +%{_qt5_libdir}/libQt5Quick.so.5* +%{_qt5_libdir}/libQt5QuickWidgets.so.5* +%{_qt5_libdir}/libQt5QuickParticles.so.5* +%{_qt5_libdir}/libQt5QuickTest.so.5* +%{_qt5_plugindir}/qmltooling/ +%{_qt5_archdatadir}/qml/ +%dir %{_qt5_libdir}/cmake/Qt5Qml/ +%{_qt5_libdir}/cmake/Qt5Qml/Qt5Qml_*Factory.cmake + +%files devel +%{_bindir}/qml* +%{_qt5_bindir}/qml* +%{_qt5_headerdir}/Qt*/ +%{_qt5_libdir}/libQt5Qml.so +%{_qt5_libdir}/libQt5Qml.prl +%{_qt5_libdir}/libQt5Quick*.so +%{_qt5_libdir}/libQt5Quick*.prl +%dir %{_qt5_libdir}/cmake/Qt5Quick*/ +%{_qt5_libdir}/cmake/Qt5*/Qt5*Config*.cmake +%{_qt5_libdir}/pkgconfig/Qt5*.pc +%{_qt5_archdatadir}/mkspecs/modules/*.pri + +%files static +%{_qt5_libdir}/libQt5QmlDevTools.*a +%{_qt5_libdir}/libQt5QmlDevTools.prl + +%if 0%{?docs} +%files doc +%license LICENSE.FDL +%{_qt5_docdir}/qtqml.qch +%{_qt5_docdir}/qtqml/ +%{_qt5_docdir}/qtquick.qch +%{_qt5_docdir}/qtquick/ +%endif + +%files examples +%{_qt5_examplesdir}/ + + +%changelog +* Tue Aug 30 2016 Jan Grulich - 5.6.1-10 +- Increase build version to have newer version than in EPEL + Resolves: bz#1317400 + +* Wed Jun 22 2016 Jan Grulich - 5.6.1-3 +- QML: Only release types if they aren't referenced anymore + +* Wed Jun 15 2016 Jan Grulich - 5.6.1-2 +- Apply no_sse2 hack to all architecturs to make qt5-qtdeclarative-devel multilib-clean + +* Wed Jun 08 2016 Jan Grulich - 5.6.1-1 +- Update to 5.6.1 + sync with Fedora + Resolves: bz#1317400 + +* Wed Apr 13 2016 Jan Grulich - 5.6.0-6 +- Enable documentation + Resolves: bz#1317400 + +* Thu Apr 07 2016 Jan Grulich - 5.6.0-5 +- Initial version for RHEL + Resolves: bz#1317400 + +* Fri Mar 25 2016 Rex Dieter - 5.6.0-4 +- backport upstream fixes +- drop -fno-delete-null-pointer-checks hack (included in qt5-rpm-macros as needed now) + +* Sat Mar 19 2016 Rex Dieter - 5.6.0-3 +- BR: cmake (cmake autoprovides) + +* Fri Mar 18 2016 Rex Dieter - 5.6.0-2 +- rebuild + +* Mon Mar 14 2016 Helio Chissini de Castro - 5.6.0-1 +- 5.6.0 final release + +* Tue Feb 23 2016 Helio Chissini de Castro - 5.6.0-0.11.rc +- Update to final RC + +* Mon Feb 22 2016 Helio Chissini de Castro - 5.6.0-0.10 +- Update RC tarball from git + +* Mon Feb 15 2016 Helio Chissini de Castro - 5.6.0-0.9 +- Update RC release + +* Tue Feb 02 2016 Rex Dieter 5.6.0-0.8.beta +- build with -fno-delete-null-pointer-checks to workaround gcc6-related runtime crashes (#1303643) + +* Thu Jan 28 2016 Rex Dieter 5.6.0-0.7.beta +- backport fix for older compilers (aka rhel6) + +* Sun Jan 17 2016 Rex Dieter 5.6.0-0.6.beta +- use %%license + +* Mon Dec 21 2015 Rex Dieter 5.6.0-0.5.beta +- fix Source URL, Release: tag + +* Mon Dec 21 2015 Helio Chissini de Castro - 5.6.0-0.4 +- Update to final beta release + +* Thu Dec 10 2015 Helio Chissini de Castro - 5.6.0-0.3 +- Official beta release + +* Sun Dec 06 2015 Rex Dieter 5.6.0-0.2 +- de-bootstrap + +* Tue Nov 03 2015 Helio Chissini de Castro - 5.6.0-0.1 +- Start to implement 5.6.0 beta, bootstrap + +* Sat Oct 24 2015 Rex Dieter 5.5.1-3 +- workaround QQuickShaderEffectSource::updatePaintNode deadlock (#1237269, kde#348385) + +* Thu Oct 15 2015 Helio Chissini de Castro - 5.5.1-2 +- Update to final release 5.5.1 + +* Tue Sep 29 2015 Helio Chissini de Castro - 5.5.1-1 +- Update to Qt 5.5.1 RC1 + +* Wed Jul 29 2015 Rex Dieter 5.5.0-3 +- -docs: BuildRequires: qt5-qhelpgenerator + +* Thu Jul 16 2015 Rex Dieter 5.5.0-2 +- tighten qtbase dep (#1233829), .spec cosmetics + +* Wed Jul 1 2015 Helio Chissini de Castro 5.5.0-1 +- New final upstream release Qt 5.5.0 + +* Mon Jun 29 2015 Helio Chissini de Castro - 5.5.0-0.4.rc +- Second round of builds now with bootstrap enabled due new qttools + +* Sat Jun 27 2015 Helio Chissini de Castro - 5.5.0-0.3.rc +- Disable bootstrap + +* Wed Jun 24 2015 Helio Chissini de Castro - 5.5.0-0.2.rc +- Update for official RC1 released packages + +* Mon Jun 08 2015 Rex Dieter 5.4.2-2 +- restore fix for QTBUG-45753/kde-345544 lost in 5.4.2 rebase + +* Wed Jun 03 2015 Jan Grulich 5.4.2-1 +- 5.4.2 + +* Sat May 02 2015 Rex Dieter 5.4.1-4 +- pull in some upstream fixes, for QTBUG-45753/kde-345544 in particular + +* Wed Apr 22 2015 Kevin Kofler - 5.4.1-3 +- fix non-sse2 support (kde#346244) and optimize sse2 binaries + +* Fri Feb 27 2015 Rex Dieter - 5.4.1-2 +- rebuild (gcc5) + +* Tue Feb 24 2015 Jan Grulich 5.4.1-1 +- 5.4.1 + +* Mon Feb 16 2015 Rex Dieter 5.4.0-3 +- rebuild (gcc) + +* Sat Feb 14 2015 Ville Skyttä - 5.4.0-2 +- Fix cmake dir ownerhips + +* Wed Dec 10 2014 Rex Dieter 5.4.0-1 +- 5.4.0 (final) + +* Fri Nov 28 2014 Rex Dieter 5.4.0-0.3.rc +- 5.4.0-rc + +* Mon Nov 03 2014 Rex Dieter 5.4.0-0.2.beta +- use new %%qmake_qt5 macro + +* Sat Oct 18 2014 Rex Dieter - 5.4.0-0.1.beta +- 5.4.0-beta +- %%ix84: drop sse2-optimized bits, need to rethink if/how to support it now + +* Tue Sep 16 2014 Rex Dieter 5.3.2-1 +- 5.3.2 + +* Tue Sep 16 2014 Rex Dieter 5.3.1-3 +- -qt5 wrappers for qml qmlbundle qmlmin qmlscene + +* Sun Aug 17 2014 Fedora Release Engineering - 5.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jun 17 2014 Jan Grulich - 5.3.1-1 +- 5.3.1 + +* Sun Jun 08 2014 Fedora Release Engineering - 5.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 21 2014 Jan Grulich 5.3.0-1 +- 5.3.0 + +* Wed Feb 05 2014 Rex Dieter 5.2.1-1 +- 5.2.1 + +* Sun Feb 02 2014 Marcin Juszkiewicz 5.2.0-6 +- Add AArch64 support (RHBUG: 1040452, QTBUG-35528) + +* Mon Jan 27 2014 Rex Dieter 5.2.0-5 +- build -examples only if supported + +* Sun Jan 26 2014 Rex Dieter 5.2.0-4 +- -examples subpkg + +* Tue Jan 14 2014 Rex Dieter 5.2.0-3 +- epel7 bootstrapped + +* Mon Jan 06 2014 Rex Dieter 5.2.0-2 +- BR: qt5-qtxmlpatterns-devel (#1048558) + +* Thu Dec 12 2013 Rex Dieter 5.2.0-1 +- 5.2.0 + +* 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. + +* Mon Dec 02 2013 Rex Dieter 5.2.0-0.10.rc1 +- 5.2.0-rc1 + +* Mon Nov 25 2013 Rex Dieter 5.2.0-0.5.beta1 +- enable -doc only on primary archs (allow secondary bootstrap) + +* Sat Nov 09 2013 Rex Dieter 5.2.0-0.4.beta1 +- rebuild (arm/qreal) + +* Thu Oct 24 2013 Rex Dieter 5.2.0-0.3.beta1 +- 5.2.0-beta1 + +* Wed Oct 16 2013 Rex Dieter 5.2.0-0.2.alpha +- bootstrap ppc + +* Tue Oct 01 2013 Rex Dieter 5.2.0-0.1.alpha +- 5.2.0-alpha +- Obsoletes: qt5-qtjsbackend +- -doc subpkg + +* Wed Aug 28 2013 Rex Dieter 5.1.1-1 +- 5.1.1 + +* Tue Aug 20 2013 Rex Dieter 5.0.2-4 +- qt5-qtjsbackend only supports ix86, x86_64 and arm + +* Tue May 14 2013 Rex Dieter 5.0.2-3 +- fix qmlprofiler conflict with qt-creator + +* Fri Apr 12 2013 Rex Dieter 5.0.2-2 +- fix qmlplugindump conflict with qt4-devel +- include license files, dist/changes* + +* Thu Apr 11 2013 Rex Dieter 5.0.2-1 +- 5.0.2 + +* Sat Feb 23 2013 Rex Dieter 5.0.1-1 +- first try +