LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libQtWebKit4.spec of Package libQtWebKit4 (Project KDE:Qt)

#
# spec file for package libQtWebKit4
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Asterios Dramis <asterios.dramis@gmail.com>.
#
# 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/
#


Name:           libQtWebKit4
%define tar_version 2.3.1
%define qt_version 4.8.4
Version:        %{qt_version}+%{tar_version}
Release:        0
Summary:        Open source Web Browser engine based on Qt4
License:        LGPL-2.1+ and BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://trac.webkit.org/wiki/QtWebKit
Source0:        qtwebkit-%{tar_version}.tar.gz
Source1:        qwebview-%{qt_version}.tar.bz2
Source99:       baselibs.conf
# PATCH-FIX-OPENSUSE webkit-qtwebkit-2.2-tp1-pluginpath.patch asterios.dramis@gmail.com -- Search /usr/lib{,64}/mozilla/plugins-wrapped for browser plugins too (taken from Fedora)
Patch0:         webkit-qtwebkit-2.2-tp1-pluginpath.patch
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
# PATCH-FIX-OPENSUSE 02_add_nostrip_for_debug_packages.diff asterios.dramis@gmail.com -- Set CONFIG += nostrip to avoid stripping (taken from Ubuntu)
Patch3:         02_add_nostrip_for_debug_packages.diff
# PATCH-FIX-OPENSUSE defines_qt_webkit.diff asterios.dramis@gmail.com -- Defines QT_WEBKIT to display correctly documentation in Qt Creator Help plugin (taken from Ubuntu)
Patch4:         defines_qt_webkit.diff
Patch5:         do-not-force-optimization-level.diff
Patch6:         reduce-link-optimization.diff
Patch7:         libQtWebKit4-gcc47.patch
Patch8:         qwebview-buildfixes.diff
# PATCH-FEATURE-UPSTREAM
Patch9:         gstreamer-1.0.diff
# PATCH-FIX-UPSTREAM hrvoje.senjan@gmail.com -- Call gst_object_ref_sink() on the playbin object to take ownership of it
Patch10:        MediaPlayerPrivateGStreamer-should-take-ownership-of-the-playbin.patch
# PATCH-FIX-UPSTREAM buffer-ranges.patch hrvoje.senjan@gmail.com -- Use different method for buffering with gstreamer 1.0
Patch11:        buffer-ranges.patch
# PATCH-FIX-UPSTREAM aarch64-support.diff schwab@suse.de -- add support for aarch64
Patch12:        aarch64-support.patch
# PATCH-FIX-UPSTREAM no-jit.patch schwab@suse.de -- No JIT on aarch64 and powerpc
Patch13:        no-jit.patch
BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  fontconfig-devel
BuildRequires:  gperf
BuildRequires:  libicu-devel
BuildRequires:  libqt4-devel
%if 0%{?suse_version} > 1140
BuildRequires:  libwebp-devel
%endif
BuildRequires:  libxslt-devel
BuildRequires:  pcre-devel
BuildRequires:  perl
BuildRequires:  python-devel
BuildRequires:  ruby
%if 0%{?suse_version} > 1140
BuildRequires:  perl-Switch
%endif
%if 0%{?suse_version} > 1120
%if 0%{?suse_version} < 1310
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
%endif
BuildRequires:  sqlite-devel
%requires_ge libqt4-x11
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
WebKit is an open source web browser engine. WebKit's HTML and JavaScript code
began as a branch of the KHTML and KJS libraries from KDE. As part of KDE
framework KHTML was based on Qt but during their porting efforts Apple's
engineers made WebKit toolkit independent. QtWebKit is a project aiming at
porting this fabulous engine back to Qt.

%package -n libQtWebKit-devel
Summary:        Development files for qtwebkit
Group:          Development/Libraries/C and C++
Requires:       libQtWebKit4 = %{version}
%requires_ge libqt4-devel

%description -n libQtWebKit-devel
This package contains development files for qtwebkit.

%prep
%setup -q -n webkit-qtwebkit-23 -a 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8
%if 0%{?suse_version} > 1230
%patch9 -p1
%patch10 -p1
%patch11 -p1
%endif
%patch12 -p1
%patch13 -p1

%build
export QTDIR=%{_prefix}

Tools/Scripts/build-webkit \
  --qt \
  --makeargs="%{?_smp_mflags}" \
  --prefix=%{_prefix} \
  --no-webkit2 \
  --release \
%ifarch %ix86
  --no-force-sse2 \
%endif
  --qmakearg="CONFIG+=production_build CONFIG+=use_system_icu QMAKE_CFLAGS+=\"${RPM_OPT_FLAGS} $(getconf LFS_CFLAGS)\" QMAKE_CXXFLAGS+=\"${RPM_OPT_FLAGS} $(getconf LFS_CFLAGS)\" DEFINES+=USE_GSTREAMER=1 DEFINES+=HAVE_LIBWEBP=1"

pushd tools/designer/src/plugins/qwebview/
qmake
make
popd

%install
make INSTALL_ROOT=%{buildroot} -C WebKitBuild/Release install
make install INSTALL_ROOT=%{buildroot} -C tools/designer/src/plugins/qwebview
#
find %{buildroot}%{_libdir} -type f -name '*prl' -exec perl -pi -e "s, -L$RPM_BUILD_DIR/\S+,,g" {} \;
find %{buildroot}%{_libdir} -type f -name '*prl' -exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" {} \;
find %{buildroot}%{_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=/usr/bin/moc," -e "s,uic_location=.*,uic_location=/usr/bin/uic," {} \;

%fdupes -s %{buildroot}%{_includedir}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/qt4/plugins/imports/QtWebKit/
%{_libdir}/libQtWebKit.so.4*
%{_libdir}/qt4/plugins/designer/libqwebview.so

%files -n libQtWebKit-devel
%defattr(-,root,root,-)
%doc ChangeLog
%{_includedir}/QtWebKit/
%{_libdir}/pkgconfig/QtWebKit.pc
%{_libdir}/libQtWebKit.prl
%{_libdir}/libQtWebKit.so
%dir %{_datadir}/qt4/mkspecs/modules
%{_datadir}/qt4/mkspecs/modules/qt_webkit.pri

%changelog