Richard Hughes af857d
# Fix rebuild on non-Fedora
Richard Hughes af857d
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Richard Hughes af857d
37875f
## NOTE: Lots of files in various subdirectories have the same name (such as
37875f
## "LICENSE") so this short macro allows us to distinguish them by using their
37875f
## directory names (from the source tree) as prefixes for the files.
37875f
%global add_to_license_files() \
37875f
        mkdir -p _license_files ; \
37875f
        cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
37875f
37875f
Name:           webkitgtk4
f8473e
Version:        2.6.6
f8473e
Release:        1%{?dist}
37875f
Summary:        GTK+ Web content engine library
37875f
37875f
License:        LGPLv2
37875f
URL:            http://www.webkitgtk.org/
37875f
Source0:        http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
37875f
40af07
Patch0:         webkit-1.1.14-nspluginwrapper.patch
283c62
Patch1:         webkitgtk-2.6.4-disable-codec-installer.patch
483d26
Patch2:         webkitgtk-2.5.90-cloop_fix.patch
c70632
Patch3:         webkitgtk-2.5.2-commit_align.patch
3b35e8
37875f
BuildRequires:  at-spi2-core-devel
37875f
BuildRequires:  bison
37875f
BuildRequires:  cairo-devel
37875f
BuildRequires:  cmake
37875f
BuildRequires:  enchant-devel
37875f
BuildRequires:  flex
37875f
BuildRequires:  fontconfig-devel
37875f
BuildRequires:  freetype-devel
37875f
BuildRequires:  geoclue2-devel
37875f
BuildRequires:  gettext
37875f
BuildRequires:  glib2-devel
37875f
BuildRequires:  gobject-introspection-devel
37875f
BuildRequires:  gperf
37875f
BuildRequires:  gstreamer1-devel
37875f
BuildRequires:  gstreamer1-plugins-base-devel
37875f
BuildRequires:  gtk2-devel
37875f
BuildRequires:  gtk3-devel
ebbccd
BuildRequires:  gtk-doc
37875f
BuildRequires:  harfbuzz-devel
37875f
BuildRequires:  libicu-devel
37875f
BuildRequires:  libjpeg-devel
37875f
BuildRequires:  libpng-devel
37875f
BuildRequires:  libsecret-devel
37875f
BuildRequires:  libsoup-devel
37875f
BuildRequires:  libwebp-devel
37875f
BuildRequires:  libxslt-devel
37875f
BuildRequires:  libXt-devel
37875f
BuildRequires:  mesa-libGL-devel
37875f
BuildRequires:  pcre-devel
37875f
BuildRequires:  perl-Switch
37875f
BuildRequires:  ruby
37875f
BuildRequires:  sqlite-devel
d73294
37875f
Requires:       geoclue2
37875f
878d8c
# Obsolete libwebkit2gtk from the webkitgtk3 package
a5aecc
Obsoletes:      libwebkit2gtk < 2.5.0
878d8c
Provides:       libwebkit2gtk = %{version}-%{release}
878d8c
37875f
# Filter out provides for private libraries
37875f
%global __provides_exclude_from ^%{_libdir}/webkit2gtk-4\\.0/.*\\.so$
37875f
37875f
%description
37875f
WebKitGTK+ is the port of the portable web rendering engine WebKit to the
37875f
GTK+ platform.
37875f
37875f
This package contains WebKitGTK+ for GTK+ 3.
37875f
37875f
%package        devel
37875f
Summary:        Development files for %{name}
37875f
Requires:       %{name}%{?_isa} = %{version}-%{release}
37875f
37875f
%description    devel
37875f
The %{name}-devel package contains libraries, build data, and header
37875f
files for developing applications that use %{name}.
37875f
ebbccd
%package        doc
ebbccd
Summary:        Documentation files for %{name}
ebbccd
BuildArch:      noarch
ebbccd
Requires:       %{name} = %{version}-%{release}
ebbccd
ebbccd
%description    doc
ebbccd
This package contains developer documentation for %{name}.
ebbccd
37875f
%prep
37875f
%setup -q -n webkitgtk-%{version}
40af07
%patch0 -p1 -b .nspluginwrapper
283c62
%patch1 -p1 -b .disable_codec_installer
483d26
%patch2 -p1 -b .cloop_fix
40af07
%ifarch %{power64} aarch64 ppc
c70632
%patch3 -p1 -b .commit_align
40af07
%endif
37875f
37875f
# Remove bundled libraries
37875f
rm -rf Source/ThirdParty/leveldb/
37875f
rm -rf Source/ThirdParty/gtest/
37875f
rm -rf Source/ThirdParty/qunit/
37875f
37875f
%build
37875f
# Use linker flags to reduce memory consumption
37875f
%global optflags %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
37875f
37875f
%ifarch s390 %{arm}
37875f
# Decrease debuginfo verbosity to reduce memory consumption even more
37875f
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
37875f
%endif
37875f
40af07
%ifarch ppc
40af07
# Use linker flag -relax to get WebKit build under ppc(32) with JIT disabled
40af07
%global optflags %{optflags} -Wl,-relax -latomic
40af07
%endif
40af07
e27e9d
%ifarch s390 s390x ppc %{power64} aarch64
40af07
%global optflags %{optflags} -DENABLE_YARR_JIT=0
e27e9d
%endif
40af07
37875f
mkdir -p %{_target_platform}
37875f
pushd %{_target_platform}
37875f
%cmake \
37875f
  -DPORT=GTK \
37875f
  -DCMAKE_BUILD_TYPE=Release \
ebbccd
  -DENABLE_GTKDOC=ON \
e27e9d
%ifarch s390 s390x ppc %{power64} aarch64
40af07
  -DENABLE_JIT=OFF \
40af07
  -DENABLE_LLINT_C_LOOP=ON \
e27e9d
%endif
37875f
  ..
37875f
popd
37875f
37875f
make %{?_smp_mflags} -C %{_target_platform}
37875f
37875f
%install
37875f
%make_install -C %{_target_platform}
37875f
37875f
%find_lang WebKit2GTK-4.0
37875f
37875f
# Finally, copy over and rename various files for %%license inclusion
37875f
%add_to_license_files Source/JavaScriptCore/COPYING.LIB
37875f
%add_to_license_files Source/JavaScriptCore/icu/LICENSE
37875f
%add_to_license_files Source/ThirdParty/ANGLE/LICENSE
37875f
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE
37875f
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/murmurhash/LICENSE
37875f
%add_to_license_files Source/WebCore/icu/LICENSE
37875f
%add_to_license_files Source/WebCore/LICENSE-APPLE
37875f
%add_to_license_files Source/WebCore/LICENSE-LGPL-2
37875f
%add_to_license_files Source/WebCore/LICENSE-LGPL-2.1
37875f
%add_to_license_files Source/WebInspectorUI/UserInterface/External/CodeMirror/LICENSE
37875f
%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE
37875f
%add_to_license_files Source/WTF/icu/LICENSE
37875f
%add_to_license_files Source/WTF/wtf/dtoa/COPYING
37875f
%add_to_license_files Source/WTF/wtf/dtoa/LICENSE
37875f
37875f
%post -p /sbin/ldconfig
37875f
%postun -p /sbin/ldconfig
37875f
37875f
%files -f WebKit2GTK-4.0.lang
37875f
%license _license_files/*
37875f
%{_libdir}/libjavascriptcoregtk-4.0.so.*
37875f
%{_libdir}/libwebkit2gtk-4.0.so.*
37875f
%{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
37875f
%{_libdir}/girepository-1.0/WebKit2-4.0.typelib
37875f
%{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
37875f
%{_libdir}/webkit2gtk-4.0/
c70632
%{_libexecdir}/webkit2gtk-4.0/
37875f
37875f
%files devel
37875f
%{_bindir}/jsc
37875f
%{_includedir}/webkitgtk-4.0/
37875f
%{_libdir}/libjavascriptcoregtk-4.0.so
37875f
%{_libdir}/libwebkit2gtk-4.0.so
37875f
%{_libdir}/pkgconfig/javascriptcoregtk-4.0.pc
37875f
%{_libdir}/pkgconfig/webkit2gtk-4.0.pc
37875f
%{_libdir}/pkgconfig/webkit2gtk-web-extension-4.0.pc
37875f
%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
37875f
%{_datadir}/gir-1.0/WebKit2-4.0.gir
37875f
%{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
37875f
ebbccd
%files doc
ebbccd
%dir %{_datadir}/gtk-doc
ebbccd
%dir %{_datadir}/gtk-doc/html
ebbccd
%{_datadir}/gtk-doc/html/webkit2gtk-4.0/
ebbccd
%{_datadir}/gtk-doc/html/webkitdomgtk-4.0/
ebbccd
37875f
%changelog
f8473e
* Tue Apr 07 2015 Tomas Popela <tpopela@redhat.com> - 2.6.6-1
f8473e
- Update to 2.6.6
f8473e
905a4a
* Tue Mar 17 2015 Michael Catanzaro <mcatanzaro@gnome.org> - 2.6.5-3
905a4a
- Add patch for late certificate verification
905a4a
8d1193
* Mon Mar 16 2015 Michael Catanzaro <mcatanzaro@gnome.org> - 2.6.5-2
8d1193
- Add patch for rbz#1156330
8d1193
d73294
* Thu Jan 15 2015 Tomas Popela <tpopela@redhat.com> - 2.6.5-1
d73294
- Update to 2.6.5
d73294
283c62
* Thu Dec 11 2014 Michael Catanzaro <mcatanzaro@gnome.org> - 2.6.4-2
283c62
- Disable the PackageKit codec installer
283c62
25a2f3
* Fri Nov 21 2014 Tomas Popela <tpopela@redhat.com> - 2.6.4-1
25a2f3
- Update to 2.6.4
25a2f3
e27e9d
* Wed Nov 12 2014 Tomas Popela <tpopela@redhat.com> - 2.6.3-1
e27e9d
- Update to 2.6.3
e27e9d
- Enable JIT where possible (accidentally turned off when updating to 2.5.90)
e27e9d
ebbccd
* Fri Nov 07 2014 Kalev Lember <kalevlember@gmail.com> - 2.6.2-5
ebbccd
- Build developer documentation
ebbccd
Richard Hughes af857d
* Tue Nov 04 2014 Richard Hughes <richard@hughsie.com> - 2.6.2-4
Richard Hughes af857d
- Fix non-Fedora build
Richard Hughes af857d
a5aecc
* Fri Oct 31 2014 Michael Catanzaro <mcatanzaro@gnome.org> - 2.6.2-3
a5aecc
- Obsolete libwebkit2gtk < 2.5.0 to be future-proof
a5aecc
ce49a8
* Fri Oct 31 2014 Kalev Lember <kalevlember@gmail.com> - 2.6.2-2
ce49a8
- Bump libwebkit2gtk obsoletes version
ce49a8
37d7fe
* Wed Oct 22 2014 Tomas Popela <tpopela@redhat.com> - 2.6.2-1
37d7fe
- Update to 2.6.2
37d7fe
fd0553
* Tue Oct 21 2014 Tomas Popela <tpopela@redhat.com> - 2.6.1-2
fd0553
- Disable the SSLv3 to address the POODLE vulnerability
fd0553
3a0f76
* Tue Oct 14 2014 Tomas Popela <tpopela@redhat.com> - 2.6.1-1
3a0f76
- Update to 2.6.1
3a0f76
483d26
* Thu Sep 25 2014 Tomas Popela <tpopela@redhat.com> - 2.6.0-1
483d26
- Add the wrongly removed CLoop patch and remove the one that was upstreamed
483d26
a7cbac
* Wed Sep 24 2014 Kalev Lember <kalevlember@gmail.com> - 2.6.0-1
a7cbac
- Update to 2.6.0
a7cbac
c70632
* Mon Sep 22 2014 Tomas Popela <tpopela@redhat.com> - 2.5.90-1
c70632
- Update to 2.5.90
c70632
878d8c
* Tue Aug 26 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.3-6
878d8c
- Obsolete libwebkit2gtk from the webkitgtk3 package
878d8c
40af07
* Mon Aug 25 2014 Tomas Popela <tpopela@redhat.com> - 2.5.3-5
40af07
- Add support for secondary arches
40af07
3b35e8
* Fri Aug 22 2014 Michael Catanzaro <mcatanzaro@gnome.org> - 2.5.3-4
3b35e8
- Add webkitgtk-2.5.3-toggle-buttons.patch
3b35e8
37875f
* Thu Aug 21 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.3-3
37875f
- More package review fixes (#1131284)
37875f
- Correct the license tag to read LGPLv2
37875f
- Filter out provides for private libraries
37875f
37875f
* Tue Aug 19 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.3-2
37875f
- Remove bundled leveldb, gtest, qunit in %%prep (#1131284)
37875f
37875f
* Fri Aug 15 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.3-1
37875f
- Update to 2.5.3
37875f
37875f
* Fri Aug 01 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.1-1
37875f
- Initial Fedora packaging, based on the webkitgtk3 package