# TODO:
# - consider --enable-libproxy
-# - provide proper $DISPLAY for PGO (Xvfb, Xdummy...) for unattended builds
#
# Conditional build:
%bcond_with tests # enable tests (whatever they check)
%bcond_with gtk3 # GTK+ 3.x instead of 2.x
%bcond_without kerberos # disable krb5 support
-%bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100)
+%bcond_without pgo # PGO-enabled build (requires working $DISPLAY == :100)
# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
%bcond_with shared_js # shared libmozjs library [broken]
# The actual sqlite version (see RHBZ#480989):
%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
-%define nspr_ver 4.10.6
-%define nss_ver 3.17.2
+%define nspr_ver 4.10.8
+%define nss_ver 3.18.1
Summary: Iceweasel web browser
Summary(hu.UTF-8): Iceweasel web böngésző
Summary(pl.UTF-8): Iceweasel - przeglądarka WWW
Name: iceweasel
-Version: 33.1.1
-Release: 0.1
+Version: 38.0.5
+Release: 1
License: MPL v2.0
Group: X11/Applications/Networking
Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2
-# Source0-md5: 2c23350a10d508f1d9b9a5f82df5dd93
+# Source0-md5: 60466afbc7105d29dcd18f996c9c67e0
Source1: %{name}-branding.tar.xz
-# Source1-md5: 6e3c10921c5b243f33241646b7941ce9
+# Source1-md5: aacc7e8298a3e6aa3ef2a3613a62f635
Source2: %{name}-rm_nonfree.sh
Source3: %{name}.desktop
Source4: %{name}.sh
Patch10: %{name}-packaging.patch
Patch11: system-virtualenv.patch
Patch12: Disable-Firefox-Health-Report.patch
+Patch13: freetype-2.6.patch
URL: http://www.pld-linux.org/Packages/Iceweasel
BuildRequires: OpenGL-devel
BuildRequires: ImageMagick
BuildRequires: bzip2-devel
BuildRequires: cairo-devel >= 1.10.2-5
BuildRequires: dbus-glib-devel >= 0.60
-BuildRequires: freetype-devel >= 1:2.1.8
+BuildRequires: freetype-devel >= 1:2.6
BuildRequires: gcc-c++ >= 6:4.4
-BuildRequires: glib2-devel >= 1:2.20
+BuildRequires: glib2-devel >= 1:2.22
BuildRequires: gstreamer-devel >= 1.0
BuildRequires: gstreamer-plugins-base-devel >= 1.0
-%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14}
-%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0}
+%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0}
+%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0}
%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
BuildRequires: hunspell-devel >= 1.2.3
BuildRequires: libIDL-devel >= 0.8.0
-BuildRequires: libdnet-devel
+# DECnet (dnprogs.spec), not dummy net (libdnet.spec)
+#BuildRequires: libdnet-devel
BuildRequires: libevent-devel >= 1.4.7
# standalone libffi 3.0.9 or gcc's from 4.5(?)+
BuildRequires: libffi-devel >= 6:3.0.9
# for rsvg-convert
BuildRequires: librsvg
BuildRequires: libpng(APNG)-devel >= 0.10
-BuildRequires: libpng-devel >= 2:1.6.10
+BuildRequires: libpng-devel >= 2:1.6.16
BuildRequires: libstdc++-devel >= 6:4.4
BuildRequires: libvpx-devel >= 1.3.0
BuildRequires: nspr-devel >= 1:%{nspr_ver}
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpmbuild(macros) >= 1.601
BuildRequires: sed >= 4.0
-BuildRequires: sqlite3-devel >= 3.8.5
+BuildRequires: sqlite3-devel >= 3.8.9
BuildRequires: startup-notification-devel >= 0.8
BuildRequires: xorg-lib-libXScrnSaver-devel
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXinerama-devel
BuildRequires: xorg-lib-libXt-devel
+%{?with_pgo:BuildRequires: xorg-xserver-Xvfb}
BuildRequires: zip
BuildRequires: zlib-devel >= 1.2.3
-BuildConflicts: %{name}-devel < %{version}-%{release}
+BuildConflicts: %{name}-devel < %{version}
Requires(post): mktemp >= 1.5-18
Requires: browser-plugins >= 2.0
Requires: desktop-file-utils
%define _noautoprovfiles %{_libdir}/%{name}
# and as we don't provide them, don't require either
-%define _noautoreq libmozalloc.so libmozjs.so libxpcom.so libxul.so
+%define _noautoreq libmozalloc.so libmozjs.so libxul.so
%description
Iceweasel is an open-source web browser, designed for standards
Group: X11/Libraries
Requires: cairo >= 1.10.2-5
Requires: dbus-glib >= 0.60
-Requires: glib2 >= 1:2.20
-%{!?with_gtk3:Requires: gtk+2 >= 2:2.14}
-%{?with_gtk3:Requires: gtk+3 >= 3.0.0}
+Requires: glib2 >= 1:2.22
+%{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0}
+%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
Requires: libjpeg-turbo
-Requires: libpng >= 2:1.6.10
+Requires: libpng >= 2:1.6.16
Requires: libpng(APNG) >= 0.10
Requires: libvpx >= 1.3.0
Requires: pango >= 1:1.22.0
Requires: sqlite3 >= %{sqlite_build_version}
Requires: startup-notification >= 0.8
+Provides: xulrunner-libs = 2:%{version}-%{release}
Obsoletes: xulrunner-libs
%description libs
Requires: nspr-devel >= 1:%{nspr_ver}
Requires: nss-devel >= 1:%{nss_ver}
Requires: python-ply
+Provides: xulrunner-devel = 2:%{version}-%{release}
Obsoletes: mozilla-devel
Obsoletes: mozilla-firefox-devel
Obsoletes: seamonkey-devel
cd mozilla
/bin/sh %{SOURCE2}
+# avoid using included headers (-I. is before HUNSPELL_CFLAGS)
+%{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h}
+# hunspell needed for factory including mozHunspell.h
+echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in
+
%patch0 -p1
%patch1 -p2
%patch2 -p1
%patch7 -p1
%patch8 -p2
%patch9 -p2
-%patch10 -p2
+%patch10 -p1
%patch11 -p2
%patch12 -p1
+%patch13 -p1
cp -a xulrunner/installer/*.pc.in browser/installer/
ac_add_options --enable-tests
ac_add_options --enable-mochitest
%else
+%if %{with pgo}
+ac_add_options --enable-tests
+%else
ac_add_options --disable-tests
+%endif
ac_add_options --disable-mochitest
%endif
ac_add_options --disable-cpp-exceptions
ac_add_options --with-distribution-id=org.pld-linux
ac_add_options --with-pthreads
ac_add_options --with-system-bz2
+ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-ply
ac_add_options --with-system-png
ac_add_options --with-system-zlib
-ac_add_options --with-system-icu
ac_add_options --with-x
EOF
%if %{with pgo}
-export DISPLAY=:100
+D=$(( RANDOM % (200 - 100 + 1 ) + 5 ))
+/usr/bin/Xvfb :${D} &
+XVFB_PID=$!
+[ -n "$XVFB_PID" ] || exit 1
+export DISPLAY=:${D}
%{__make} -j1 -f client.mk profiledbuild \
DESTDIR=obj-%{_target_cpu}/dist \
CC="%{__cc}" \
CXX="%{__cxx}" \
MOZ_MAKE_FLAGS="%{_smp_mflags}"
+kill $XVFB_PID
%else
%{__make} -j1 -f client.mk build \
CC="%{__cc}" \
%{_libdir}/%{name}/components/components.manifest
%attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so
%attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
-%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
%attr(755,root,root) %{_libdir}/%{name}/plugin-container
%{_libdir}/%{name}/dictionaries
%{_libdir}/%{name}/chrome.manifest
+%dir %{_libdir}/%{name}/gmp-clearkey
+%dir %{_libdir}/%{name}/gmp-clearkey/0.1
+%{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info
+%attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
+
%files libs
%defattr(644,root,root,755)
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}-devel/sdk
%{_libdir}/%{name}-devel/sdk/lib
%dir %{_libdir}/%{name}-devel/sdk/bin
-%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/*
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py
+%{_libdir}/%{name}-devel/sdk/bin/xpidllex.py
+%{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py
+%{_libdir}/%{name}-devel/sdk/bin/ply
+
%{_pkgconfigdir}/libxul.pc
%{_pkgconfigdir}/libxul-embedding.pc
%{_pkgconfigdir}/mozilla-js.pc