File libqt5-qtdeclarative.spec of Package libqt5-qtdeclarative

# spec file for package libqt5-qtdeclarative
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define qt5_snapshot 0

%define libname libQtQuick5

Name:           libqt5-qtdeclarative
Version:        5.6.1
Release:        10.1
Summary:        Qt 5 Declarative Library
License:        SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group:          Development/Libraries/X11
%define base_name libqt5
%define real_version 5.6.1
%define so_version 5.6.1
%define tar_version qtdeclarative-opensource-src-%{real_version}
Source:         %{tar_version}.tar.xz
Source1:        baselibs.conf
# PATCH-FIX-OPENSUSE overflow.patch -- Statement might be overflowing a buffer
Patch0:         overflow.patch
# PATCH-FIX-UPSTREAM qml_only_release_types_if_they_arent_referenced_anymore.patch
Patch1:         qml_only_release_types_if_they_arent_referenced_anymore.patch
# PATCH-FIX-OPENSUSE: qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch - fix crashes with i586 and Plasma (boo #985768)
Patch2:         qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch
BuildRequires:  fdupes
BuildRequires:  libQt5Core-private-headers-devel >= %{version}
BuildRequires:  libQt5Gui-private-headers-devel >= %{version}
BuildRequires:  libQt5Test-private-headers-devel >= %{version}
BuildRequires:  libQt5Widgets-private-headers-devel >= %{version}
BuildRequires:  python-base
BuildRequires:  libQt5Core-devel >= %{version}
BuildRequires:  libQt5Gui-devel >= %{version}
BuildRequires:  libQt5Network-devel >= %{version}
BuildRequires:  libQt5Sql-devel >= %{version}
BuildRequires:  libQt5Widgets-devel >= %{version}
BuildRequires:  libQt5Xml-devel >= %{version}
BuildRequires:  libqt5-qtxmlpatterns-devel >= %{version}
%if %qt5_snapshot
#to create the forwarding headers
BuildRequires:  perl
BuildRequires:  xz
# NOTE recheck this once/if this package gets further splitted
%requires_ge libQt5Core5
%requires_ge libQt5Gui5
%requires_ge libQt5Network5
%requires_ge libQt5Sql5
%requires_ge libQt5Test5
%requires_ge libQt5Widgets5
%requires_ge libQt5XmlPatterns5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Qt is a set of libraries for developing applications.

This package contains base tools, like string, xml, and network

%setup -q -n qtdeclarative-opensource-src-%{real_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1

%package -n %libname
Summary:        Qt 5 Declarative Library
Group:          Development/Libraries/X11

%description -n %libname
Qt is a set of libraries for developing applications.

This package contains base tools, like string, xml, and network

%package devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
Requires:       %libname = %{version}
Requires:       %{name}-tools = %{version}
Provides:       libQt5Quick-devel = %{version}
Obsoletes:      libQt5Quick-devel < %{version}

%description devel
You need this package, if you want to compile programs with qtdeclarative.

%package tools
Summary:        Qt 5 Declarative Tools
Group:          Development/Tools/Debuggers

%description tools
Qt is a set of libraries for developing applications.

This package contains aditional tools for inspecting, testing, viewing, etc, QML imports and files.

%package private-headers-devel
Summary:        Non-ABI stable experimental API
Group:          Development/Libraries/C and C++
#BuildArch:      noarch
Requires:       %{name}-devel = %{version}
Requires:       libQt5Core-private-headers-devel >= %{version}
Requires:       libQt5Gui-private-headers-devel >= %{version}
Requires:       libQt5Test-private-headers-devel >= %{version}
Requires:       libQt5Widgets-private-headers-devel >= %{version}
Provides:       libQt5Quick-private-headers-devel = %{version}
Obsoletes:      libQt5Quick-private-headers-devel < %{version}

%description private-headers-devel
This package provides private headers of libqt5-qtdeclarative that are normally
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.

%package examples
Summary:        Qt5 quick/qml examples
Group:          Development/Libraries/X11
Recommends:     %{name}-devel
Recommends:     %{name}-tools

%description examples
Examples for libqt5-qtdeclarative (quick/qml) modules.

%post -n %libname -p /sbin/ldconfig

%postun -n %libname -p /sbin/ldconfig

%if %qt5_snapshot
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git

mkdir -p %{_target_platform}
pushd %{_target_platform}
%qmake5 ..

%make_jobs -C %{_target_platform}

pushd %{_target_platform}

find %{buildroot}/%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \;
find %{buildroot}/%{_libdir}/pkgconfig -type f -name '*pc' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \;
# kill .la files
rm -f %{buildroot}%{_libqt5_libdir}/lib*.la

# put all the binaries to %%_bindir, add -qt5 suffix, and symlink them back to %%_qt5_bindir
mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_libqt5_bindir}
for i in * ; do
  case "${i}" in
      mv $i ../../../bin/${i}-qt5
      ln -s ../../../bin/${i}-qt5 .
      ln -s ../../../bin/${i}-qt5 $i
      mv $i ../../../bin/
      ln -s ../../../bin/$i .

%fdupes -s %{buildroot}%{_libqt5_includedir}
%fdupes -s %{buildroot}%{_libqt5_examplesdir}

%files -n %libname
%dir %{_libqt5_archdatadir}/qml
%dir %{_libqt5_archdatadir}/qml/Qt
%dir %{_libqt5_archdatadir}/qml/Qt/labs
%dir %{_libqt5_archdatadir}/qml/QtQml

%files private-headers-devel

%files tools

%files devel
%exclude %{_libqt5_includedir}/Qt*/%{so_version}

%files examples

* Tue Jun 21 2016
- Add qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch
  * Fix crash with i586 and QML loaders (boo#985768)
* Thu Jun 16 2016
- Added qml_only_release_types_if_they_arent_referenced_anymore.patch
* Wed Jun  8 2016
- Update to 5.6.1
  * For more details please see:
- Drop upstreamed
* Thu May 26 2016
- Added Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch
  to prevent issues with GCC 6
* Fri Mar 18 2016
- Update to 5.6.0
- Drop support for non-SSE2 machines
- Drop sse2_nojit.patch
- Drop upstreamed patches:
  Refactor-FxViewItem-releasing-code.patch and
- Add overflow.patch to resolve
  "Statement might be overflowing a buffer" post-build-check error
  * For more details please see:
* Sat Feb 13 2016
- Add 0001-scene-graph-fixed-memory-leak-in-qsgbatchrenderer-re.patch
  fixing a memory leak, QTBUG#48799.
* Mon Feb  1 2016
- Added sanitize-visibleItems-list-after-model-insertions.patch
  and Refactor-FxViewItem-releasing-code.patch to help in resolving
  kde#352055 and qtbug#48870
* Fri Oct 16 2015
- Update to 5.5.1 (boo#954149)
  * For more details please see:
* Sun Aug 16 2015
- Update to 5.5.0
  * For more details please see:
- Drop avoid-calling-potentially-pure-virtual-method.patch, merged
* Wed Jun  3 2015
- Update to 5.4.2
  * Bugfix release, for more details please see:
* Mon Apr 27 2015
- Add avoid-calling-potentially-pure-virtual-method.patch, QTBUG#45753
* Sat Apr 25 2015
- Extend sse2_nojit.patch to warn users without SSE2 extension that
  their processor is officially not supported.
  Also pass -msse2 -mfpmath=sse flags when we are building with SSE2
* Thu Apr  9 2015
- Adjust usage of latest %%qmake5_install macro
* Tue Feb 24 2015
- Update to 5.4.1
  * For more details please see:
- Add minimal requires on other Qt5 libs
* Wed Dec 10 2014
- Update to 5.4 Final
  * For more details please see:
* Thu Nov 27 2014
- Update to 5.4 RC
  * For more details please see:
- Drop patches merged upstream:
* Mon Sep 22 2014
- Add sse2_nojit.patch: enable JIT and sse2 only on sse2 case
- Build QtQML module twice on ix86, without and with sse2 (sse2
  library is placed to %%_libdir/sse2/ (bnc#897758)
* Tue Sep 16 2014
- Update to 5.3.2 final
  * No changes since previous snapshot
  * Use official tars
- Added patches from upstream 5.3 branch:
  0001-Fix-crash-with-cleanup-of-animators.patch (QTBUG#37833),
  0004-QML-parse-.js-files-as-JavaScript-not-QML.patch (QTBUG#40143),
  0005-Fix-crash-with-foreach-on-arguments-object.patch (QTBUG#40844)
  and 0006-Move-syncTimer-measurment-to-the-correct-place.patch
* Thu Sep  4 2014
- Update to 5.3.2~git20140904 (rd8bc98b):
  * Tip of the bugfix 5.3.2 branch
  * Contains many bugfixes over 5.3.1 release:
  * Doc: Added a link to the QML advanced tutorial
  * Don't use d->instanceModel after free'ing it
  * Fix crash with early QObject property access
  * Fix typo in DelegateModelGroup documentation
  * Protect some members in QQmlObjectCreator
  * Initialize variable
  * Don't abuse new to do a reinterpret_cast
  * Protect incubation against its creator being deleted.
  * Add 5.3.2 changelog for qtdeclarative
  * Fix crash with recursively loading cached compilation units
  * Fix typo in StateChangeScript documentation.
  * Added the QtSQL dependency info. to the project file
  * tst_dialogs: verify that rootObject is valid
  * tst_dialogs: QTRY_ on the expression
    (spyVisibilityChanged.count) not the variable.
  * The cached objects can be deleted, so keep them in a QPointer
  * Fix potential deadlook in threaded renderloop.
  * Added a signal handler
  * Fix typo in Context2D documentation.
  * Disable threaded FBO canvas drawing when not supported.
  * V4 JIT: fix JS stack frame size calculation.
  * Correct strokeRect documentation.
  * Silence harmless compiler warning.
  * benchmarks: Skip compilation of (and mark with FIXME) a few
    benchmarks that don't build.
  * benchmarks/particles: fix projects to actually build
  * Fix compilation of tst_compilation (:-P) benchmark.
  * Avoid double deletion when deleting an incubating component.
  * Invalidate the scenegraph properly in the rendercontrol
  * Fix crash when loading invalid QML with behavior on
    invalid group property
  * Fix crash when animators are deleted just after being started
  * Don't try to reload QQuick images when changing to
    null screen
  * Clarify Component.onCompleted/onDestruction docs
  * Fix fbo creation and resize logic in QQuickWidget
  * Fix Qt.include with cached compilation units and resources
  * Synchronize PathView gesture grabbing with other items.
  * Fix FBO recreated every time the QSG node is updated under
    some conditions
  * More QQuickCanvas cleanup handling.
  * Make canvas cleanup work propertly...
  * Use the current context to resolve extensions.
  * qmlplugindumper: do not pop up a window if
    an assert is triggered
  * Fix assertion: ASSERT: "hasException" in file
    jsruntime/qv4engine.cpp, line 933
  * Fix QQmlDelegateModel getting out of sync
  * QQuickWindow: add some links to resetOpenGLState
  * Remove metaobject revisioning for QQuickScreenAttached
  * Don't dereference null pointer.
  * Flickable: Cancel interaction on interactive changes
  * Don't try to draw shader effect sources with dims < 0.
  * QQuickMouseArea: Mark override functions with Q_DECL_OVERRIDE
  * Fix interaction of garbage collector with JS objects during
    QML type instantiation
  * Do not use mark() when marking ExecutionContexts
  * Don't recreate header and footer unnecessarily
  * Clear the visibleImgTags list when setting up the text layout
  * Improve programmatic flicking of ListView (and Flickable).
  * V4: work around a bug in libc++'s std::vector<bool>
  * QQmlComponent::create(): visual items must have
    a visual parent
  * Clean up the textures when deleting the content
  * Schedule layout changes to avoid refill() recursion.
  * Add autotest for incorrect steal of flick.
  * Do not crash AtlasTexture if image is null
  * Fix Node object leak in QQuickTextEditPrivate
  * shift and unshift fail for QQmlSequence types
  * Check for window != 0 in QuickTestResult::grabImage().
  * Doc: add documentation for the RSS News example
  * Fix typo in documentation
  * Binding Text width to implicitWidth can result in
    incorrect layout
  * Docs: fix "classname" indentation in the qmldir specs
  * Fix role for generic Accessible items
  * Calqlatr demo: Remove unused files
  * Remove usage of external dependencies from the RSS News demo
  * Fix crash on QQmlEngine destruction.
  * Don't dereference null QQuickWindowPrivate.
  * Add opt-out environment variable for @2x images
  * Doc: correct link/compilation errors in Qt Declarative
  * Fix crash in Flickable with pressDelay.
  * Skip rssnews demo if xmlpatterns is not present
  * Delete objects created by qmlplugindump
  * Avoid double deletion of QQuickWindow
  * Fix QQmlDelegateModel ignoring layoutChange in
    certain situations
  * Fix intermittent crash with older MinGW releases
  * Doc: Add documentation for the Maroon in Trouble example
  * Fix crash when deleting component in Component.onComplete
    through loader
  * Fix memory leak in QQmlComponent::createObject
  * Update QtQuick import value to 2.3
  * Set locked state while locking for grab.
  * QQmlObjectCreator: Clear sharedState componentAttached
    in destruction/clear
  * Initialize velocity
  * Improve RSS News Qt Quick Demo
  * Fix QQmlComponent detailed description.
  * Add a QQuickWidget - QQuickView comparison example
  * Fix crash in QObjectWrapper
- libqt5-fix-crash-with-early-QObject-property-access.patch,
  merged upstream
* Fri Aug 29 2014
- Added upstream patch libqt5-fix-crash-with-early-QObject-property-access.patch
  * Fix crash with early QObject property access, QTBUG-40018
* Tue Aug  5 2014
- Create tools subpackage
* Wed Jun 25 2014
- Update to 5.3.1
  * Bugfix release, for more details please see:
- Added pkgconfig(Qt5Xml) BuildRequires
* Mon Jun  2 2014
- Added baselibs.conf
- Make private headers noarch
* Mon May 19 2014
- Update to 5.3.0 final
  * Minor bugfixes over previous RC
* Thu May  8 2014
- Update to 5.3.0 RC
  * For more details, please see
* Tue May  6 2014
- Explicitly BuildRequire python-base
* Tue Mar 25 2014
- Update to 5.3.0 beta
  * New feature release, please see
- Added libQt5Widgets-private-headers-devel BuildRequires: they are
  now needed for building QQuickWidgets
- Droped aarch64-support.patch, merged upstream
* Fri Mar 21 2014
- Build, and add examples subpackage
* Mon Feb 10 2014
- Add License files to %%doc
* Wed Feb  5 2014
- Update to 5.2.1:
  * For more details please see:
- Remove libtool archives from packages
- Added aarch64-support.patch from upstream (merged for 5.3)
* Mon Dec 16 2013
- Make devel packages naming consistent:
  use libqt5-$upstreammodulename-(devel, private-headers-devel)
* Thu Dec 12 2013
- Update to 5.2.0 final:
  * For more details please see:
* Fri Nov 29 2013
- Update to 5.2 rc1
  * New feature release, please see
* Wed Oct 23 2013
- Update to 5.2 beta1
  * New feature release, please see
* Thu Aug 29 2013
- Update to version 5.1.1:
  * Bugfix release, please see
  and for known issues
- Small spec cleanup
* Sat Aug  3 2013
- Rename packages according to Factory standards
* Sun Jul  7 2013
- update to Qt 5.1 release
* Tue Jun 18 2013
- update to Qt 5.1 RC 1
* Mon May 20 2013
- update to Qt 5.1 Beta 1
* Tue Apr  9 2013
- update to Qt 5.1 Alpha 1
* Wed Jan 30 2013
- update to Qt 5.0.1
* Wed Dec 19 2012
- update to Qt 5.0 release
* Thu Dec 13 2012
- update to Qt 5.0 Release Candidate 2
* Thu Dec  6 2012
- update to Qt 5.0 Release Candidate 1
* Thu Nov 15 2012
- update to Qt 5.0 Beta 2
* Thu Aug 30 2012
- update to Qt 5.0 Beta 1 release
* Thu May 24 2012
- update to newer Alpha snapshot / Beta candidate
* Fri Apr 13 2012
- rework package splitting for Qt 5 modularization
* Thu Apr  5 2012
- Initial packaging (Qt 5.0 Alpha)