commit e16eb6c5d220a68dde7856cbe272939a6ba0571a Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:56:05 2019 +0800 Package init diff --git a/qt5-qtdeclarative.spec b/qt5-qtdeclarative.spec new file mode 100644 index 0000000..0ec4a2b --- /dev/null +++ b/qt5-qtdeclarative.spec @@ -0,0 +1,120 @@ +%global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$ + +Name: qt5-qtdeclarative +Version: 5.11.1 +Release: 4 +License: LGPLv2 with exceptions or GPLv3 with exceptions +Summary: Qt5 module for declarative framework +Url: http://www.qt.io +Source0: https://download.qt.io/official_releases/qt/5.11/%{version}/submodules/qtdeclarative-everywhere-src-%{version}.tar.xz +Source1: qv4global_p-multilib.h +Patch0001: qtdeclarative-opensource-src-5.11.0-no_sse2.patch +Obsoletes: qt5-qtjsbackend < 5.2.0 qt5-qtdeclarative-render2d < 5.7.1-10 +BuildRequires: gcc-c++ qt5-rpm-macros >= %{version} qt5-qtbase-devel >= %{version} +BuildRequires: qt5-qtbase-private-devel qt5-qtxmlpatterns-devel >= %{version} python3 +%{?_qt5:Requires: %{_qt5} = %{_qt5_version}} + +%if 0%{?tests} +BuildRequires: dbus-x11 mesa-dri-drivers time xorg-x11-server-Xvfb +%endif + +%description +This package contains base tools, like string, xml, and network handling. + +%package devel +Summary: Library and header files of %{name} +Requires: %{name} = %{version}-%{release} qt5-qtbase-devel +Provides: %{name}-private-devel = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} %{name}-examples = %{version}-%{release} +Obsoletes: qt5-qtjsbackend-devel < 5.2.0 qt5-qtdeclarative-render2d-devel < 5.7.1-10 +Obsoletes: %{name}-static < %{version}-%{release} %{name}-examples < %{version}-%{release} + +%description devel +%{name}-devel provides libraries and header files for %{name}. + +%prep +%setup -q -n qtdeclarative-everywhere-src-%{version} + +%build + +%qmake_qt5 + +%make_build + +%install +%make_install INSTALL_ROOT=%{buildroot} + +%ifarch x86_64 + pushd %{buildroot}%{_qt5_headerdir}/QtQml/%{version}/QtQml/private + mv qv4global_p.h qv4global_p-%{__isa_bits}.h + popd + install -p -m644 -D %{SOURCE1} %{buildroot}%{_qt5_headerdir}/QtQml/%{version}/QtQml/private/qv4global_p.h +%endif + +install -d %{buildroot}%{_bindir} +pushd %{buildroot}%{_qt5_bindir} +for file in * ; do + case "${file}" in + qmlplugindump|qmlprofiler) + ln -v ${file} %{buildroot}%{_bindir}/${file}-qt5 + ln -sv ${file} ${file}-qt5 + ;; + qml|qmlbundle|qmlmin|qmlscene) + ln -v ${file} %{buildroot}%{_bindir}/${file} + ln -v ${file} %{buildroot}%{_bindir}/${file}-qt5 + ln -sv ${file} ${file}-qt5 + ;; + *) + ln -v ${file} %{buildroot}%{_bindir}/${file} + ;; + esac +done +popd + +pushd %{buildroot}%{_qt5_libdir} +for file in libQt5*.prl ; do + sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${file} + rm -fv "$(basename ${file} .prl).la" + sed -i -e "/^QMAKE_PRL_LIBS/d" ${file} +done +popd + + +%check +%if 0%{?tests} +export LD_LIBRARY_PATH=%{buildroot}%{_qt5_libdir} +export CTEST_OUTPUT_ON_FAILURE=1 PATH=%{buildroot}%{_qt5_bindir}:$PATH +make sub-tests-all %{?_smp_mflags} +xvfb-run -a dbus-launch --exit-with-session time \ +make check -k -C tests ||: +%endif + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license LICENSE.LGPL* +%{_qt5_libdir}/libQt5Qml.so.5* +%{_qt5_libdir}/libQt5Quick*.so.5* +%{_qt5_plugindir}/qmltooling/ +%{_qt5_archdatadir}/qml/ + +%files devel +%{_bindir}/qml* +%{_qt5_bindir}/qml* +%{_qt5_headerdir}/Qt*/ +%{_qt5_libdir}/pkgconfig/Qt5*.pc +%{_qt5_libdir}/libQt5Qml*.{a,so,prl} +%{_qt5_libdir}/libQt5Quick*.{so,prl} +%{_qt5_libdir}/cmake/Qt5*/Qt5*Config*.cmake +%{_qt5_libdir}/libQt5PacketProtocol.{a,prl} +%{_qt5_libdir}/cmake/Qt5Qml/Qt5Qml_*Factory.cmake +%{_qt5_archdatadir}/mkspecs/{modules/*.pri,features/*.prf} +%dir %{_qt5_libdir}/cmake/{Qt5Qml/,Qt5Quick*/} +%{_qt5_examplesdir}/ + + +%changelog +* Thu Nov 07 2019 yanzhihua - 5.11.1-4 +- Package init + diff --git a/qtdeclarative-everywhere-src-5.11.1.tar.xz b/qtdeclarative-everywhere-src-5.11.1.tar.xz new file mode 100644 index 0000000..11cfb9b Binary files /dev/null and b/qtdeclarative-everywhere-src-5.11.1.tar.xz differ diff --git a/qtdeclarative-opensource-src-5.11.0-no_sse2.patch b/qtdeclarative-opensource-src-5.11.0-no_sse2.patch new file mode 100644 index 0000000..c050bff --- /dev/null +++ b/qtdeclarative-opensource-src-5.11.0-no_sse2.patch @@ -0,0 +1,39 @@ +diff -up qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/jsruntime.pri.no_sse2 qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/jsruntime.pri +--- qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/jsruntime.pri.no_sse2 2018-04-30 06:54:03.000000000 -0500 ++++ qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/jsruntime.pri 2018-05-24 16:15:51.151738531 -0500 +@@ -115,6 +115,11 @@ SOURCES += \ + $$PWD/qv4value.cpp \ + $$PWD/qv4executableallocator.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-everywhere-src-5.11.0/src/qml/jsruntime/qv4global_p.h.no_sse2 qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/qv4global_p.h +--- qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/qv4global_p.h.no_sse2 2018-04-30 06:54:03.000000000 -0500 ++++ qtdeclarative-everywhere-src-5.11.0/src/qml/jsruntime/qv4global_p.h 2018-05-24 20:23:38.642642420 -0500 +@@ -88,7 +88,7 @@ inline double trunc(double d) { return d + // + // NOTE: This should match the logic in qv4targetplatform_p.h! + +-#if defined(Q_PROCESSOR_X86) && (QT_POINTER_SIZE == 4) \ ++#if defined(Q_PROCESSOR_X86) && (QT_POINTER_SIZE == 4) && 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) && (QT_POINTER_SIZE == 8) \ +diff -up qtdeclarative-everywhere-src-5.11.0/src/qml/qml/v8/qv8engine.cpp.no_sse2 qtdeclarative-everywhere-src-5.11.0/src/qml/qml/v8/qv8engine.cpp +--- qtdeclarative-everywhere-src-5.11.0/src/qml/qml/v8/qv8engine.cpp.no_sse2 2018-05-24 16:15:51.152738550 -0500 ++++ qtdeclarative-everywhere-src-5.11.0/src/qml/qml/v8/qv8engine.cpp 2018-05-24 20:21:01.273574503 -0500 +@@ -131,7 +131,7 @@ QV8Engine::QV8Engine(QJSEngine *qq, QV4: + { + #ifdef Q_PROCESSOR_X86_32 + if (!qCpuHasFeature(SSE2)) { +- qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer"); ++ qDebug("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer, processors missing the extension are NOT supported to run QML2 code!"); + } + #endif + diff --git a/qv4global_p-multilib.h b/qv4global_p-multilib.h new file mode 100644 index 0000000..09d61d6 --- /dev/null +++ b/qv4global_p-multilib.h @@ -0,0 +1,23 @@ +/* qvglobal_p.h */ +/* This file is here to prevent a file conflict on multiarch systems. A + * conflict will occur because qconfig.h has arch-specific definitions. + * + * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ + +#ifndef MULTILIB_QV4GLOBAL_H +#define MULTILIB_QV4GLOBAL_H + +#ifndef __WORDSIZE +#include +#endif + +#if __WORDSIZE == 32 +#include +#elif __WORDSIZE == 64 +#include +#else +#error "unexpected value for __WORDSIZE macro" +#endif + +#endif +