%bcond_with gps # with gps support (linked), if enabled must use exactly same gpsd as shm structures may change leading to unexpected results (crash)
%bcond_without libjpegturbo # use libjpeg-turbo features
%bcond_with nacl # build Native Client support, disabled: http://crbug.com/269560
+%bcond_with ninja # use Ninja instead of make to build
%bcond_without pulseaudio # with pulseaudio
%bcond_without sandboxing # with sandboxing
%bcond_with selinux # with SELinux (need policy first)
%bcond_with shared_libs # with shared libs
%bcond_with sse2 # use SSE2 instructions
%bcond_without system_flac # system flac
-%bcond_without system_ffmpeg # system ffmpeg instead of ffmpegsumo
+%bcond_with system_ffmpeg # system ffmpeg instead of ffmpegsumo
%bcond_without system_harfbuzz # system harfbuzz
%bcond_without system_jsoncpp # system jsoncpp
%bcond_without system_libexif # system libexif
%bcond_without system_libmtp # system libmtp
%bcond_with system_libusb # system libusb-1, disabled: http://crbug.com/266149
-%bcond_with system_libwebp # system libwebp, disabled: http://crbug.com/288019
+%bcond_without system_libwebp # system libwebp
%bcond_without system_libxnvctrl # system libxnvctrl
%bcond_with system_mesa # system Mesa
%bcond_without system_minizip # system minizip
# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
# - to look for new tarball, use update-source.sh script
-%define branch 31.0.1650
-%define basever 48
-#define patchver 114
+%define branch 33.0.1750
+%define basever 117
+#define patchver 107
%define gyp_rev 1014
Summary: A WebKit powered web browser
Name: chromium-browser
%else
Version: %{branch}.%{basever}
%endif
-Release: 0.2
+Release: 1
License: BSD%{!?with_system_ffmpeg:, LGPL v2+ (ffmpeg)}
Group: X11/Applications/Networking
-Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{branch}.%{basever}.tar.gz
-# Source0-md5: 065e908d4b4a7ca44026a8234b336cf1
+Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{branch}.%{basever}.tar.xz
+# Source0-md5: 0811b1c65f2b8d1ebf00664ddb2f5e05
%if "%{?patchver}" != ""
Patch0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{version}.patch.xz
-# Patch0-md5: ccc99af9e31d866c174d824eeed5aab2
+# Patch0-md5: 82e3012b5510187907bba50dadbe7137
%endif
Source1: %{name}.default
Source2: %{name}.sh
Patch25: gnome3-volume-control.patch
Patch26: master-prefs-path.patch
Patch28: system-mesa.patch
-Patch29: system-icu.patch
Patch30: system-ply.patch
Patch31: system-jinja.patch
+Patch32: remove_bundled_libraries-stale.patch
+Patch33: gn.patch
URL: http://www.chromium.org/Home
%{?with_gconf:BuildRequires: GConf2-devel}
%{?with_system_mesa:BuildRequires: Mesa-libGL-devel >= 9.1}
%{?with_selinux:BuildRequires: libselinux-devel}
BuildRequires: libstdc++-devel
%{?with_system_libusb:BuildRequires: libusb-devel >= 1.0}
-%{?with_system_libvpx:BuildRequires: libvpx-devel >= 0.9.5-2}
-%{?with_system_libwebp:BuildRequires: libwebp-devel >= 0.1.99}
+%{?with_system_libvpx:BuildRequires: libvpx-devel >= 1.3.0}
+%{?with_system_libwebp:BuildRequires: libwebp-devel >= 0.4.0}
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: man-db
%{?with_system_minizip:BuildRequires: minizip-devel}
+%{?with_ninja:BuildRequires: ninja >= 1.3.0}
BuildRequires: nspr-devel
BuildRequires: nss-devel >= 1:3.12.3
%{?with_system_opus:BuildRequires: opus-devel >= 1.0.2}
Requires: hicolor-icon-theme
Requires: libevent >= 2.0.21
%{?with_libjpegturbo:Requires: libjpeg-turbo >= 1.2.0}
-%{?with_system_libvpx:Requires: libvpx >= 0.9.5-2}
+%{?with_system_libvpx:Requires: libvpx >= 1.3.0}
Requires: lsb-release
%{?with_system_re2:Requires: re2 >= 20130115-2}
Requires: shared-mime-info
# Usage: gyp_with BCOND_NAME [OPTION_NAME]
%define gyp_with() %{expand:%%{?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=1}%%{!?with_%{1}:-D%{?2:use_%{2}}%{!?2:use_%{1}}=0}}
+%ifarch %{ix86}
+%define target_arch ia32
+%endif
+%ifarch %{x8664}
+%define target_arch x64
+%endif
+
+%define buildtype %{?debug:Debug}%{!?debug:Release}
+%define builddir out/%{buildtype}
+
%if %{without debuginfo}
%define _enable_debug_packages 0
%endif
%patch12 -p1
%patch16 -p1
%patch28 -p1
-%patch25 -p2
+%patch25 -p1
%{?with_nacl:%patch18 -p1}
%patch24 -p2
%patch26 -p2
-%patch29 -p0
%patch30 -p1
%patch31 -p0
+%patch32 -p1
+%patch33 -p0
sh -x clean-source.sh \
%{!?with_nacl:nacl=0} \
%{!?with_system_v8:v8=0} \
%{!?with_system_libwebp:libwebp=0} \
%{!?with_system_zlib:zlib=0} \
+ %{!?with_system_ffmpeg:ffmpeg=0} \
%{nil}
%build
fi
%endif
-flags="
-%ifarch %{ix86}
- -Dtarget_arch=ia32 \
-%endif
-%ifarch %{x8664}
- -Dtarget_arch=x64 \
+%if %{without system_ffmpeg}
+if [ ! -d third_party/ffmpeg/build.%{target_arch}.linux ]; then
+ # Re-configure bundled ffmpeg
+ cd third_party/ffmpeg
+ chromium/scripts/build_ffmpeg.sh linux %{target_arch} "$PWD" config-only
+ chromium/scripts/copy_config.sh
+ cd -
+fi
%endif
+
+flags="
+ -Dtarget_arch=%{target_arch} \
+ -Dpython_arch=%{target_arch} \
+ -Dsystem_libdir=%{_lib} \
+ -Dpython_ver=%{py_ver} \
%if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
-Dno_strict_aliasing=1 -Dgcc_version=44 \
%endif
%{gyp_with system_libmtp} \
%{gyp_with system_libsrtp} \
%{gyp_with system_libusb} \
- %{gyp_with system_libvpx} -Dmedia_use_libvpx=0 \
+ %{gyp_with system_libvpx} -Dmedia_use_libvpx=1 \
%{gyp_with system_libwebp} \
%{gyp_with system_libxnvctrl} \
%{gyp_with system_mesa} \
build/linux/unbundle/replace_gyp_files.py $flags
-test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile
-test -e Makefile || \
+%if %{with ninja}
+chkfile=%{builddir}/build.ninja
+%else
+chkfile=Makefile
+%endif
+test %{_specdir}/%{name}.spec -nt $chkfile && %{__rm} -f $chkfile
+test -e $chkfile || \
CC="%{__cc}" \
CXX="%{__cxx}" \
LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
CXX_host="%{__cxx}" \
LD_host="%{__cxx}" \
%{__python} build/gyp_chromium \
- --format=make \
+ --format=%{?with_ninja:ninja}%{!?with_ninja:make} \
--depth=. \
build/all.gyp \
$flags
+%if %{with ninja}
+ninja %{?_smp_mflags} %{?with_verbose:-v} -C %{builddir} \
+%else
# need {CC/CXX/LDFLAGS}.host overrides for v8 build
-%{__make} -r chrome %{?with_sandboxing:chrome_sandbox} \
- BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
+%{__make} -r \
+ BUILDTYPE=%{buildtype} \
%{?with_verbose:V=1} \
CC.host="%{__cc}" \
CXX.host="%{__cxx}" \
LDFLAGS.host="%{rpmldflags} -fuse-ld=gold" \
+%endif
+ chrome %{?with_sandboxing:chrome_sandbox} \
+ %{nil}
-cd out/%{!?debug:Release}%{?debug:Debug}
+cd %{builddir}
MANWIDTH=80 man ./chrome.1 > man.out
%{__sed} -e '1,/OPTIONS/d; /ENVIRONMENT/,$d' man.out > options.txt
$RPM_BUILD_ROOT%{_datadir}/%{name}/{locales,resources} \
$RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/%{name},%{_mandir}/man1,%{_desktopdir}}
-cd out/%{!?debug:Release}%{?debug:Debug}
+cd %{builddir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
%{__sed} -i -e '