2020-03-18 14:15:04 +08:00
|
|
|
%undefine _annotated_build
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
%global qt_module qtwebkit
|
|
|
|
|
|
|
|
|
|
%global _hardened_build 1
|
|
|
|
|
|
|
|
|
|
%global prerel alpha4
|
|
|
|
|
%global prerel_tag -%{prerel}
|
|
|
|
|
|
|
|
|
|
## NOTE: Lots of files in various subdirectories have the same name (such as
|
|
|
|
|
## "LICENSE") so this short macro allows us to distinguish them by using their
|
|
|
|
|
## directory names (from the source tree) as prefixes for the files.
|
|
|
|
|
%global add_to_license_files() \
|
|
|
|
|
mkdir -p _license_files ; \
|
|
|
|
|
cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
|
|
|
|
|
|
|
|
|
|
Name: qt5-%{qt_module}
|
2020-03-06 17:07:54 +08:00
|
|
|
Version: 5.212.0
|
2023-09-21 19:53:14 +08:00
|
|
|
Release: 10
|
2020-11-13 09:50:54 +08:00
|
|
|
Summary: Qt5 - QtWebKit components
|
|
|
|
|
|
2022-05-10 12:06:28 +00:00
|
|
|
License: LGPL-2.0-or-later and BSD-2-Clause
|
2020-11-13 09:50:54 +08:00
|
|
|
URL: https://github.com/qtwebkit/qtwebkit
|
|
|
|
|
Source0: https://github.com/qtwebkit/qtwebkit/releases/download/%{qt_module}-%{version}%{?prerel_tag}/%{qt_module}-%{version}%{?prerel_tag}.tar.xz
|
|
|
|
|
|
|
|
|
|
# Patch for new CMake policy CMP0071 to explicitly use old behaviour.
|
|
|
|
|
Patch2: qtwebkit-5.212.0_cmake_cmp0071.patch
|
|
|
|
|
Patch3: fix_build_with_bison.patch
|
2021-07-26 11:07:21 +08:00
|
|
|
Patch4: fix_build_with_glib2_68.patch
|
2022-01-13 15:38:18 +08:00
|
|
|
Patch5: 0001-fix-TRUE-and-FALSE-was-not-declared.patch
|
2022-12-13 09:42:05 +08:00
|
|
|
Patch6: 0001-add-loongarch-support-for-qtwebkit.patch
|
2020-11-13 09:50:54 +08:00
|
|
|
|
2023-08-02 13:55:32 +08:00
|
|
|
# From https://github.com/WebKit/WebKit/commit/c7d19a492d97f9282a546831beb918e03315f6ef
|
|
|
|
|
# Ruby 3.2 removes Object#=~ completely
|
|
|
|
|
Patch7: webkit-offlineasm-warnings-ruby27.patch
|
|
|
|
|
Patch8: qtwebkit-cstdint.patch
|
2023-09-21 19:53:14 +08:00
|
|
|
|
|
|
|
|
Patch9: 0001-add-riscv64-support.patch
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
BuildRequires: bison
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: flex
|
|
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
|
|
|
BuildRequires: pkgconfig(libwoff2dec)
|
|
|
|
|
BuildRequires: pkgconfig(gio-2.0)
|
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
|
BuildRequires: gperf
|
|
|
|
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
|
|
|
|
BuildRequires: pkgconfig(gstreamer-app-1.0)
|
|
|
|
|
BuildRequires: hyphen-devel
|
|
|
|
|
BuildRequires: pkgconfig(icu-i18n) pkgconfig(icu-uc)
|
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
|
BuildRequires: pkgconfig(libpng)
|
|
|
|
|
BuildRequires: pkgconfig(libwebp)
|
|
|
|
|
BuildRequires: pkgconfig(xcomposite)
|
|
|
|
|
BuildRequires: pkgconfig(xrender)
|
|
|
|
|
BuildRequires: pkgconfig(libxslt)
|
|
|
|
|
BuildRequires: pkgconfig(gl)
|
|
|
|
|
BuildRequires: pkgconfig(gstreamer-gl-1.0)
|
|
|
|
|
BuildRequires: pkgconfig(gstreamer-mpegts-1.0)
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl(File::Copy)
|
|
|
|
|
BuildRequires: python3
|
|
|
|
|
BuildRequires: qt5-qtbase-devel
|
|
|
|
|
BuildRequires: qt5-qtdeclarative-devel
|
2020-03-18 14:15:04 +08:00
|
|
|
%if ! 0%{?bootstrap}
|
2020-11-13 09:50:54 +08:00
|
|
|
BuildRequires: qt5-qtlocation-devel
|
|
|
|
|
BuildRequires: qt5-qtsensors-devel
|
|
|
|
|
BuildRequires: qt5-qtwebchannel-devel
|
2020-03-18 14:15:04 +08:00
|
|
|
%endif
|
2020-11-13 09:50:54 +08:00
|
|
|
BuildRequires: pkgconfig(ruby)
|
|
|
|
|
BuildRequires: rubygems
|
|
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
|
# workaround bad embedded png files, https://bugzilla.redhat.com/1639422
|
|
|
|
|
BuildRequires: findutils
|
|
|
|
|
BuildRequires: pngcrush
|
|
|
|
|
|
|
|
|
|
BuildRequires: qt5-qtbase-private-devel
|
|
|
|
|
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
|
|
|
|
|
BuildRequires: qt5-qtdeclarative-private-devel
|
|
|
|
|
%{?_qt5:Requires: qt5-qtdeclarative%{?_isa} = %{_qt5_version}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# filter qml provides
|
|
|
|
|
%global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$
|
|
|
|
|
|
|
|
|
|
# We're supposed to specify versions here, but these crap Google libs don't do
|
|
|
|
|
# normal releases. Accordingly, they're not suitable to be system libs.
|
|
|
|
|
Provides: bundled(angle)
|
|
|
|
|
Provides: bundled(brotli)
|
|
|
|
|
Provides: bundled(woff2)
|
2020-03-06 17:07:54 +08:00
|
|
|
|
|
|
|
|
%description
|
2020-11-13 09:50:54 +08:00
|
|
|
%{summary}
|
2020-03-06 17:07:54 +08:00
|
|
|
|
|
|
|
|
%package devel
|
2020-11-13 09:50:54 +08:00
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: qt5-qtbase-devel%{?_isa}
|
|
|
|
|
Requires: qt5-qtdeclarative-devel%{?_isa}
|
2020-03-06 17:07:54 +08:00
|
|
|
|
|
|
|
|
%description devel
|
2020-11-13 09:50:54 +08:00
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
%if 0%{?docs}
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: API documentation for %{name}
|
|
|
|
|
BuildRequires: qt5-qdoc
|
|
|
|
|
BuildRequires: qt5-qhelpgenerator
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
%{summary}.
|
|
|
|
|
%endif
|
|
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
|
|
|
|
|
%prep
|
2020-11-13 09:50:54 +08:00
|
|
|
%autosetup -p1 -n %{qt_module}-%{version}%{?prerel_tag}
|
2022-01-13 15:38:18 +08:00
|
|
|
sed -i 's/json.load(bytecodeFile, encoding = "utf-8")/json.load(bytecodeFile)/g' ./Source/JavaScriptCore/generate-bytecode-files
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
# find/fix pngs with "libpng warning: iCCP: known incorrect sRGB profile"
|
|
|
|
|
find -name \*.png | xargs -n1 pngcrush -ow -fix
|
|
|
|
|
|
|
|
|
|
# ppc64le failed once with
|
|
|
|
|
# make[2]: *** No rule to make target 'Source/WebCore/Resources/textAreaResizeCorner.png', needed by 'Source/WebKit/qrc_WebCore.cpp'. Stop.
|
2020-03-18 14:15:04 +08:00
|
|
|
test -f Source/WebCore/Resources/textAreaResizeCorner.png
|
2020-03-06 17:07:54 +08:00
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
%build
|
2020-11-13 09:50:54 +08:00
|
|
|
# The following changes of optflags ietc. are adapted from webkitgtk4 package, which
|
|
|
|
|
# is mostly similar to this one...
|
|
|
|
|
#
|
|
|
|
|
# Increase the DIE limit so our debuginfo packages could be size optimized.
|
|
|
|
|
# Decreases the size for x86_64 from ~5G to ~1.1G.
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1456261
|
2020-03-18 14:15:04 +08:00
|
|
|
%global _dwz_max_die_limit 250000000
|
2020-03-06 17:07:54 +08:00
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
# Decrease debuginfo even on ix86 because of:
|
|
|
|
|
# https://bugs.webkit.org/show_bug.cgi?id=140176
|
|
|
|
|
%ifarch s390 s390x %{arm} %{ix86} ppc %{power64} %{mips}
|
|
|
|
|
# Decrease debuginfo verbosity to reduce memory consumption even more
|
|
|
|
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch ppc
|
|
|
|
|
# Use linker flag -relax to get WebKit build under ppc(32) with JIT disabled
|
|
|
|
|
%global optflags %{optflags} -Wl,-relax
|
|
|
|
|
%endif
|
|
|
|
|
|
2020-03-18 14:15:04 +08:00
|
|
|
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
|
|
|
|
|
CXXFLAGS="${CXXFLAGS:-%optflags} -fpermissive" ; export CXXFLAGS ;
|
|
|
|
|
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
2020-11-13 09:50:54 +08:00
|
|
|
# We cannot use default cmake macro here as it overwrites some settings queried
|
|
|
|
|
# by qtwebkit cmake from qmake
|
|
|
|
|
cmake . \
|
|
|
|
|
-DPORT=Qt \
|
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
|
-DENABLE_TOOLS=OFF \
|
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
|
|
|
|
|
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
|
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
2023-09-21 19:53:14 +08:00
|
|
|
%ifarch s390 s390x ppc %{power64} loongarch64 riscv64
|
2020-11-13 09:50:54 +08:00
|
|
|
-DENABLE_JIT=OFF \
|
|
|
|
|
%endif
|
2023-09-21 19:53:14 +08:00
|
|
|
%ifarch s390 s390x ppc %{power64} loongarch64 riscv64
|
2020-11-13 09:50:54 +08:00
|
|
|
-DUSE_SYSTEM_MALLOC=ON \
|
|
|
|
|
%endif
|
|
|
|
|
%{?docs:-DGENERATE_DOCUMENTATION=ON} \
|
|
|
|
|
-DPYTHON_EXECUTABLE:PATH="%{__python3}"
|
|
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
%make_build
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
%if 0%{?docs}
|
|
|
|
|
%make_build docs
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
%install
|
|
|
|
|
%make_install
|
2020-11-13 09:50:54 +08:00
|
|
|
|
2020-03-18 14:15:04 +08:00
|
|
|
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
# fix pkgconfig files
|
|
|
|
|
#sed -i '/Name/a Description: Qt5 WebKit module' %{buildroot}%{_libdir}/pkgconfig/Qt5WebKit.pc
|
|
|
|
|
#sed -i "s,Cflags: -I%{_qt5_libdir}/qt5/../../include/qt5/Qt5WebKit,Cflags: -I%{_qt5_headerdir}/QtWebKit,g" %{buildroot}%{_libdir}/pkgconfig/Qt5WebKit.pc
|
|
|
|
|
# strictly speaking, this isn't *wrong*, but can made more readable, so let's do that
|
2020-03-06 17:07:54 +08:00
|
|
|
sed -i "s,Libs: -L%{_qt5_libdir}/qt5/../ -lQt5WebKit,Libs: -L%{_qt5_libdir} -lQt5WebKit ,g" %{buildroot}%{_libdir}/pkgconfig/Qt5WebKit.pc
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
#sed -i '/Name/a Description: Qt5 WebKitWidgets module' %{buildroot}%{_libdir}/pkgconfig/Qt5WebKitWidgets.pc
|
|
|
|
|
#sed -i "s,Cflags: -I%{_qt5_libdir}/qt5/../../include/qt5/Qt5WebKitWidgets,Cflags: -I%{_qt5_headerdir}/QtWebKitWidgets,g" %{buildroot}%{_libdir}/pkgconfig/Qt5WebKitWidgets.pc
|
2020-03-06 17:07:54 +08:00
|
|
|
sed -i "s,Libs: -L%{_qt5_libdir}/qt5/../ -lQt5WebKitWidgets,Libs: -L%{_qt5_libdir} -lQt5WebKitWidgets ,g" %{buildroot}%{_libdir}/pkgconfig/Qt5WebKitWidgets.pc
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
# Finally, copy over and rename various files for %%license inclusion
|
2020-03-18 14:15:04 +08:00
|
|
|
%add_to_license_files Source/JavaScriptCore/COPYING.LIB
|
|
|
|
|
%add_to_license_files Source/JavaScriptCore/icu/LICENSE
|
|
|
|
|
%add_to_license_files Source/ThirdParty/ANGLE/LICENSE
|
|
|
|
|
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE
|
|
|
|
|
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/murmurhash/LICENSE
|
|
|
|
|
%add_to_license_files Source/WebCore/icu/LICENSE
|
|
|
|
|
%add_to_license_files Source/WebCore/LICENSE-APPLE
|
|
|
|
|
%add_to_license_files Source/WebCore/LICENSE-LGPL-2
|
|
|
|
|
%add_to_license_files Source/WebCore/LICENSE-LGPL-2.1
|
|
|
|
|
%add_to_license_files Source/WebInspectorUI/UserInterface/External/CodeMirror/LICENSE
|
|
|
|
|
%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE
|
|
|
|
|
%add_to_license_files Source/WTF/icu/LICENSE
|
|
|
|
|
%add_to_license_files Source/WTF/wtf/dtoa/COPYING
|
|
|
|
|
%add_to_license_files Source/WTF/wtf/dtoa/LICENSE
|
2020-03-06 17:07:54 +08:00
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
%check
|
2020-11-13 09:50:54 +08:00
|
|
|
# verify Qt5WebKit cflags non-use of -I/.../Qt5WebKit
|
2020-03-06 17:07:54 +08:00
|
|
|
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
|
|
|
|
|
test -z "$(pkg-config --cflags Qt5WebKit | grep Qt5WebKit)"
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
2020-03-06 17:07:54 +08:00
|
|
|
|
|
|
|
|
%files
|
2020-11-13 09:50:54 +08:00
|
|
|
%license LICENSE.LGPLv21 _license_files/*
|
|
|
|
|
%{_qt5_libdir}/libQt5WebKit.so.5*
|
|
|
|
|
%{_qt5_libdir}/libQt5WebKitWidgets.so.5*
|
|
|
|
|
%{_qt5_libexecdir}/QtWebNetworkProcess
|
|
|
|
|
%{_qt5_libexecdir}/QtWebPluginProcess
|
|
|
|
|
%{_qt5_libexecdir}/QtWebProcess
|
|
|
|
|
%{_qt5_libexecdir}/QtWebStorageProcess
|
2020-03-06 17:07:54 +08:00
|
|
|
%{_qt5_archdatadir}/qml/QtWebKit/
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_qt5_headerdir}/Qt*/
|
|
|
|
|
%{_qt5_libdir}/libQt5*.so
|
|
|
|
|
%{_qt5_libdir}/cmake/Qt5*/
|
|
|
|
|
%{_qt5_libdir}/pkgconfig/Qt5*.pc
|
|
|
|
|
%{_qt5_archdatadir}/mkspecs/modules/*.pri
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
|
|
|
|
|
%if 0%{?docs}
|
|
|
|
|
%files doc
|
|
|
|
|
%{_qt5_docdir}/qtwebkit.qch
|
|
|
|
|
%{_qt5_docdir}/qtwebkit/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
%changelog
|
2023-09-21 19:53:14 +08:00
|
|
|
* Thu Sep 21 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 5.212.0-10
|
|
|
|
|
- add riscv64 support for qt5-qtwebkit
|
|
|
|
|
|
2023-08-02 13:55:32 +08:00
|
|
|
* Wed Aug 02 2023 peijiankang <peijiankang@kylinos.cn> - 5.212.0-9
|
|
|
|
|
- fix build error
|
|
|
|
|
|
2022-12-13 09:42:05 +08:00
|
|
|
* Mon Dec 12 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 5.212.0-8
|
|
|
|
|
- add loongarch support for qt5-qtwebkit
|
|
|
|
|
|
2022-05-10 12:06:28 +00:00
|
|
|
* Tue May 10 2022 chenchen <chen_aka_jan@163.com> - 5.212.0-7
|
|
|
|
|
- License compliance rectification
|
|
|
|
|
|
2022-01-13 15:38:18 +08:00
|
|
|
* Thu Jan 13 2022 Ge Wang <wangge20@huawei.com> - 5.212.0-6
|
|
|
|
|
- fix build fail due to json.load dose not surport pramam encoding
|
|
|
|
|
|
2021-07-26 11:07:21 +08:00
|
|
|
* Thu July 23 2021 yangyunyi <yangyunyi2@huawei.com> - 5.212.0-5
|
|
|
|
|
- fix build fail with glib 2.68.1
|
|
|
|
|
|
2020-11-13 09:50:54 +08:00
|
|
|
* Thu Nov 12 2020 wutao <wutao61@huawei.com> - 5.212.0-4
|
|
|
|
|
- update to alpha4 and drop python2 module
|
|
|
|
|
|
2020-08-03 19:52:11 +08:00
|
|
|
* Mon Aug 03 2020 lingsheng <lingsheng@huawei.com> - 5.212.0-3
|
|
|
|
|
- Fix build with icu 65.1
|
|
|
|
|
|
2020-03-18 14:15:04 +08:00
|
|
|
* Tue Mar 17 2020 Ling Yang <lingyang2@huawei.com> - 5.212.0-2
|
|
|
|
|
- Fixed building error
|
|
|
|
|
|
2020-03-06 17:07:54 +08:00
|
|
|
* Fri Feb 14 2020 Ling Yang <lingyang2@huawei.com> - 5.212.0-1
|
|
|
|
|
- Package init
|