LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

# spec file for package libQtWebKit4
# Copyright (c) 2012 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.2.0
%define qt_version 4.8.2
Version:        %qt_version+%tar_version
Release:        0
Summary:        Open source Web Browser engine based on Qt4
License:        LGPL-2.1+ ; BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://trac.webkit.org/wiki/QtWebKit
Source0:        QtWebKit-%{tar_version}.tar.bz2
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
# PATCH-FIX-OPENSUSE webkit-qtwebkit-2.2tp1-qt46.patch asterios.dramis@gmail.com -- Fix for qt-4.6.x (taken from Fedora)
Patch3:         webkit-qtwebkit-2.2tp1-qt46.patch
# PATCH-FIX-OPENSUSE 0001_fix_symbols_visibility_for_webcore.diff asterios.dramis@gmail.com -- Corrects symbols visibility for WebCore (taken from Ubuntu)
Patch4:         0001_fix_symbols_visibility_for_webcore.diff
# PATCH-FIX-OPENSUSE 01_lflags_as-needed.diff asterios.dramis@gmail.com -- Set --as-needed linker flag to avoid useless linking (taken from Ubuntu)
Patch5:         01_lflags_as-needed.diff
# PATCH-FIX-OPENSUSE 02_add_nostrip_for_debug_packages.diff asterios.dramis@gmail.com -- Set CONFIG += nostrip to avoid stripping (taken from Ubuntu)
Patch6:         02_add_nostrip_for_debug_packages.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)
Patch7:         03_hide_std_symbols.diff
Patch8:         04_enable_debug_information.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)
Patch9:         defines_qt_webkit.diff
Patch10:        do-not-force-optimization-level.diff
Patch11:        reduce-link-optimization.diff
Patch12:        build-with-glib-231.diff
Patch13:        avoid-rpath.diff
Patch14:        qwebview-buildfixes.diff
# PATCH-FIX-OPENSUSE libQtWebKit4-gcc47.patch dimstar@opensuse.org -- Do not use -WError... Patch taken from Fedora
Patch15:        libQtWebKit4-gcc47.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  fontconfig-devel
BuildRequires:  gperf
BuildRequires:  libicu-devel
BuildRequires:  libqt4-devel
BuildRequires:  pcre-devel
BuildRequires:  perl
BuildRequires:  python-devel
%if 0%{?suse_version} > 1140
BuildRequires:  perl-Switch
%if 0%{?suse_version} > 1120
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)
BuildRequires:  sqlite-devel
%requires_ge libqt4-x11

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.

%setup -q -n QtWebKit-%{tar_version} -a 1
%patch0 -p1 -b .pluginpath
%patch3 -p1 -b .qt46
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch15 -p1

export QTDIR=%{_prefix}

%ifarch %arm
# debug uses crazy amount of memory which we don't have

Tools/Scripts/build-webkit \
 --release \
 --qt \
%ifarch %arm
 --no-svg \
 --no-mathml \
 --makeargs="%{?_smp_mflags}" \

pushd tools/designer/src/plugins/qwebview/

make install INSTALL_ROOT=%{buildroot} -C WebKitBuild/Release
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}

rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files -n libQtWebKit-devel
%doc ChangeLog
%dir %{_datadir}/qt4/mkspecs/modules