File libqt5-qtwebkit.spec of Package libqt5-qtwebkit.3194

#
# spec file for package libqt5-qtwebkit
#
# 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 http://bugs.opensuse.org/
#


%define qt5_snapshot 0

%define libname libQt5WebKitWidgets5

Name:           libqt5-qtwebkit
Version:        5.3.1
Release:        0
%define base_name libqt5
%define real_version 5.3.1
%define so_version 5.3.1
%if %qt5_snapshot
%define tar_version qtwebkit-%{real_version}
%else
%define tar_version qtwebkit-opensource-src-%{real_version}
%endif
# Workaround ppc64le build failures due to OOM issue, bnc#863533
%ifarch ppc64le
%define make_jobs /usr/bin/make -j4 VERBOSE=1
%endif
Summary:        Qt 5 WebKit Library
License:        SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group:          Development/Libraries/X11
Url:            http://qt.digia.com
Source:         %{tar_version}.tar.xz
Source1:        baselibs.conf
Patch1:         04_enable_debug_information.diff
# PATCH-FIX-OPENSUSE 03_hide_std_symbols.diff asterios.dramis@gmail.com -- Do not make the std:: symbols in webkit public (taken from Ubuntu)
Patch2:         03_hide_std_symbols.diff
Patch3:         reduce-link-optimization.diff
# PATCH-FIX-UPSTREAM ppc64le-support.diff uweigand@de.ibm.com -- add support for ppc64le
Patch5:         ppc64le-support.patch
# PATCH-FIX-UPSTREAM libqt5-qtwebkit-CVE-2015-8079.patch mlin@suse.com -- CVE-2015-8079
Patch6:         libqt5-qtwebkit-CVE-2015-8079.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch130:       no-Werror-rpath.diff
BuildRequires:  pkgconfig(Qt5Core) >= %{version}
BuildRequires:  pkgconfig(Qt5Network) >= %{version}
BuildRequires:  pkgconfig(Qt5OpenGL) >= %{version}
BuildRequires:  pkgconfig(Qt5PrintSupport) >= %{version}
BuildRequires:  pkgconfig(Qt5Quick) >= %{version}
BuildRequires:  pkgconfig(Qt5Sql) >= %{version}
BuildRequires:  pkgconfig(Qt5Test) >= %{version}
BuildRequires:  pkgconfig(Qt5Widgets) >= %{version}
#BuildRequires:  pkgconfig(positioning)
BuildRequires:  libQt5Core-private-headers-devel >= %{version}
BuildRequires:  libQt5Gui-private-headers-devel >= %{version}
BuildRequires:  libQt5Widgets-private-headers-devel >= %{version}
BuildRequires:  libqt5-qtdeclarative-private-headers-devel >= %{version}
BuildRequires:  pkgconfig(Qt5Sensors) >= %{version}
%if 0%{?suse_version} < 1315
BuildRequires:  pkgconfig(gstreamer-0.10)
BuildRequires:  pkgconfig(gstreamer-app-0.10)
BuildRequires:  pkgconfig(gstreamer-base-0.10)
BuildRequires:  pkgconfig(gstreamer-interfaces-0.10)
BuildRequires:  pkgconfig(gstreamer-pbutils-0.10)
BuildRequires:  pkgconfig(gstreamer-plugins-base-0.10)
BuildRequires:  pkgconfig(gstreamer-video-0.10)
%else
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-app-1.0)
BuildRequires:  pkgconfig(gstreamer-base-1.0)
BuildRequires:  pkgconfig(gstreamer-pbutils-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  pkgconfig(gstreamer-video-1.0)
%endif
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gperf
BuildRequires:  libicu-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libxslt-devel
BuildRequires:  python-xml
BuildRequires:  ruby
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcomposite)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xrender)
BuildRequires:  pkgconfig(zlib)
%if %qt5_snapshot
#to create the forwarding headers
BuildRequires:  perl
%endif
BuildRequires:  procps
BuildRequires:  xz
BuildRequires:  pkgconfig(libwebp)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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

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

%prep
%if %qt5_snapshot
%setup -q -n qtwebkit-%{real_version}
%else
%setup -q -n qtwebkit-opensource-src-%{real_version}
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch130 -p1

%package -n %libname
Summary:        Qt 5 WebKit 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
handling.

%package -n libQt5WebKit5
Summary:        Qt Development Kit
Group:          Development/Libraries/X11

%description -n libQt5WebKit5
You need this package, if you want to compile programs with qtwebkit.

%package -n libQt5WebKitWidgets-devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
Requires:       %libname = %{version}
Requires:       libQt5WebKit5-devel = %{version}
Requires:       libqt5-qtdeclarative-devel >= %{version}
Requires:       libqt5-qtsensors-devel >= %{version}

%description -n libQt5WebKitWidgets-devel
You need this package, if you want to compile programs with qtwebkit.

%package -n libQt5WebKit5-devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
Requires:       libQt5WebKit5 = %version
Requires:       pkgconfig(Qt5Core) >= %version
Requires:       pkgconfig(Qt5Gui) >= %version
Requires:       pkgconfig(Qt5Network) >= %version
Requires:       pkgconfig(Qt5Qml) >= %version
Requires:       pkgconfig(Qt5Quick) >= %version
Requires:       pkgconfig(Qt5Sensors) >= %version
Requires:       pkgconfig(Qt5Sql) >= %version

%description -n libQt5WebKit5-devel
You need this package, if you want to compile programs with qtwebkit.

%package -n libQt5WebKitWidgets-private-headers-devel
Summary:        Non-ABI stable experimental API
Group:          Development/Libraries/C and C++
BuildArch:      noarch
Requires:       libQt5WebKit-private-headers-devel = %{version}
Requires:       libQt5WebKitWidgets-devel = %{version}

%description -n libQt5WebKitWidgets-private-headers-devel
This package provides private headers of libqt5-qtwebkit 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 -n libQt5WebKit-private-headers-devel
Summary:        Non-ABI stable experimental API
Group:          Development/Libraries/C and C++
BuildArch:      noarch
Requires:       libQt5WebKit5-devel = %{version}

%description -n libQt5WebKit-private-headers-devel
This package provides private headers of libqt5-qtwebkit 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 devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
Requires:       libQt5WebKit5-devel = %{version}
Requires:       libQt5WebKitWidgets-devel = %{version}

%description devel
You need this package, if you want to compile programs with qtwebkit.
This package pulls in development files for both libQt5WebKit and
libQt5WebKitWidgets libraries.

%package private-headers-devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
BuildArch:      noarch
Requires:       libQt5WebKit-private-headers-devel = %{version}
Requires:       libQt5WebKitWidgets-private-headers-devel = %{version}

%description private-headers-devel
You need this package, if you want to compile programs with qtwebkit.
This package pulls in private headers for both libQt5WebKit and
libQt5WebKitWidgets libraries.


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

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

%post -n libQt5WebKit5 -p /sbin/ldconfig

%postun -n libQt5WebKit5 -p /sbin/ldconfig

%build
%if %qt5_snapshot
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
%endif
export QMAKEPATH=`pwd`
RPM_OPT_FLAGS="$RPM_OPT_FLAGS "
export RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-g / /}
export LDFLAGS="$LDFLAGS -Wl,--reduce-memory-overheads -Wl,--no-keep-memory -Wl,--as-needed"
export PATH=%{_libqt5_bindir}:$PATH
%ifarch aarch64 ppc ppc64 ppc64le s390 s390x
%_libqt5_qmake DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0
%else
%_libqt5_qmake
%endif
%make_jobs

%install
%qmake5_install
find %{buildroot}/%{_libqt5_libdir} -type f -name '*la' -print -exec perl -pi -e 's,-L%{_builddir}/\S+,,g' {} \;
find %{buildroot}/%{_libqt5_libdir} -type f -name '*pc' -print -exec perl -pi -e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} \; -exec sed -i -e "s,^moc_location=.*,moc_location=%{_lib}qt5_bindir/moc," -e "s,uic_location=.*,uic_location=%{_lib}qt5_bindir/uic," {} \;

# kill .la files
rm -f %{buildroot}%{_libqt5_libdir}/lib*.la

%files -n %libname
%defattr(-,root,root,755)
%dir %{_libqt5_libexecdir}
%{_libqt5_libexecdir}/QtWebProcess
%{_libqt5_libdir}/libQt5WebKitWidgets.so.*

%files -n libQt5WebKit5
%defattr(-,root,root,755)
%{_libqt5_libdir}/libQt5WebKit.so.*
%{_libqt5_libexecdir}/QtWebPluginProcess
%{_libqt5_archdatadir}/qml/QtWebKit

%files -n libQt5WebKitWidgets-private-headers-devel
%defattr(-,root,root,755)
%{_libqt5_includedir}/QtWebKitWidgets/%{so_version}

%files -n libQt5WebKit-private-headers-devel
%defattr(-,root,root,755)
%{_libqt5_includedir}/QtWebKit/%{so_version}

%files -n libQt5WebKit5-devel
%defattr(-,root,root,755)
%exclude %{_libqt5_includedir}/QtWebKit/%{so_version}
%{_libqt5_includedir}/QtWebKit
%{_libqt5_libdir}/cmake/Qt5WebKit
%{_libqt5_libdir}/libQt5WebKit.prl
%{_libqt5_libdir}/libQt5WebKit.so
%{_libqt5_libdir}/pkgconfig/Qt5WebKit.pc
%{_libqt5_archdatadir}/mkspecs/modules/qt_lib_webkit.pri
%{_libqt5_archdatadir}/mkspecs/modules/qt_lib_webkit_private.pri

%files -n libQt5WebKitWidgets-devel
%defattr(-,root,root,755)
%exclude %{_libqt5_includedir}/QtWebKitWidgets/%{so_version}
%{_libqt5_includedir}/QtWebKitWidgets
%{_libqt5_libdir}/cmake/Qt5WebKitWidgets
%{_libqt5_libdir}/libQt5WebKitWidgets.prl
%{_libqt5_libdir}/libQt5WebKitWidgets.so
%{_libqt5_libdir}/pkgconfig/Qt5WebKitWidgets.pc
%{_libqt5_archdatadir}/mkspecs/modules/qt_lib_webkitwidgets.pri
%{_libqt5_archdatadir}/mkspecs/modules/qt_lib_webkitwidgets_private.pri

%changelog
openSUSE Build Service is sponsored by