%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
# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
# - to look for new tarball, use update-source.sh script
-%define branch 32.0.1700
-%define basever 77
-%define patchver 107
+%define branch 33.0.1750
+%define basever 117
+#define patchver 107
%define gyp_rev 1014
Summary: A WebKit powered web browser
Name: chromium-browser
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.xz
-# Source0-md5: 80f2651040917887c8a7b42010c2ba6c
+Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/dev/%{name}-%{branch}.%{basever}.tar.gz
+# Source0-md5: 1b273c1a80983ca7679a7031855a9b41
%if "%{?patchver}" != ""
Patch0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{version}.patch.xz
# Patch0-md5: 82e3012b5510187907bba50dadbe7137
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}
# 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
+
%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
%patch30 -p1
%patch31 -p0
%patch32 -p1
+%patch33 -p0
+exit 0
sh -x clean-source.sh \
%{!?with_nacl:nacl=0} \
%{!?with_system_libvpx:libvpx=0} \
fi
%endif
-flags="
-%ifarch %{ix86}
- -Dtarget_arch=ia32 \
- -Dpython_arch=ia32 \
-%endif
-%ifarch %{x8664}
- -Dtarget_arch=x64 \
- -Dpython_arch=x64 \
+%if %{without system_ffmpeg}
+# 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 -
%endif
+
+flags="
+ -Dtarget_arch=%{target_arch} \
+ -Dpython_arch=%{target_arch} \
-Dsystem_libdir=%{_lib} \
- -Dpython_ver=2.7 \
+ -Dpython_ver=%{py_ver} \
%if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
-Dno_strict_aliasing=1 -Dgcc_version=44 \
%endif
---- a/media/filters/ffmpeg_glue.h
-+++ b/media/filters/ffmpeg_glue.h
-@@ -28,9 +28,9 @@
- #include "base/basictypes.h"
- #include "base/memory/scoped_ptr.h"
- #include "media/base/media_export.h"
-+#include "media/ffmpeg/ffmpeg_common.h"
+Fix HOST_OS detection in build_ffpeg.sh
+https://bugs.gentoo.org/show_bug.cgi?id=491466
+
+Enable gold linker
+https://bugs.gentoo.org/show_bug.cgi?id=491850
+
+--- a/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
++++ b/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
+@@ -75,7 +75,7 @@
+ LIBAVUTIL_VERSION_MAJOR=52
- struct AVFormatContext;
--struct AVIOContext;
+ case $(uname -sm) in
+- Linux\ i386)
++ Linux\ i?86)
+ HOST_OS=linux
+ HOST_ARCH=ia32
+ JOBS=$(grep processor /proc/cpuinfo | wc -l)
+@@ -85,6 +85,11 @@
+ HOST_ARCH=x64
+ JOBS=$(grep processor /proc/cpuinfo | wc -l)
+ ;;
++ Linux\ arm*)
++ HOST_OS=linux
++ HOST_ARCH=arm
++ JOBS=$(grep processor /proc/cpuinfo | wc -l)
++ ;;
+ Darwin\ i386)
+ HOST_OS=mac
+ HOST_ARCH=ia32
+@@ -117,14 +122,6 @@
+ echo "LD = $(ld --version | head -n1)"
+ echo
- namespace media {
+-# As of this writing gold 2.20.1-system.20100303 is unable to link FFmpeg.
+-if ld --version | grep -q gold; then
+- echo "gold is unable to link FFmpeg"
+- echo
+- echo "Switch /usr/bin/ld to the regular binutils ld and try again"
+- exit 1
+-fi
+-
+ # We want to use a sufficiently recent version of yasm on Windows.
+ if [[ "$TARGET_OS" == "win" || "$TARGET_OS" == "win-vs2013" ]]; then
+ if !(which yasm 2>&1 > /dev/null); then
+@@ -292,14 +289,16 @@
+ add_flag_common --extra-cflags=-m32
+ add_flag_common --extra-ldflags=-m32
+ elif [ "$TARGET_ARCH" = "arm" ]; then
+- # This if-statement essentially is for chroot tegra2.
+- add_flag_common --enable-cross-compile
++ if [ "$HOST_ARCH" != "arm" ]; then
++ # This if-statement essentially is for chroot tegra2.
++ add_flag_common --enable-cross-compile
---- a/media/ffmpeg/ffmpeg_common.cc.orig 2013-01-17 00:07:51.635057013 +0000
-+++ b/media/ffmpeg/ffmpeg_common.cc 2013-01-17 00:15:50.867406811 +0000
-@@ -85,8 +85,10 @@
- return kCodecGSM_MS;
- case AV_CODEC_ID_PCM_MULAW:
- return kCodecPCM_MULAW;
-+#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS
- case AV_CODEC_ID_OPUS:
- return kCodecOpus;
-+#endif
- default:
- DVLOG(1) << "Unknown audio CodecID: " << codec_id;
- }
-@@ -130,8 +132,10 @@
- return AV_CODEC_ID_GSM_MS;
- case kCodecPCM_MULAW:
- return AV_CODEC_ID_PCM_MULAW;
-+#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS
- case kCodecOpus:
- return AV_CODEC_ID_OPUS;
-+#endif
- default:
- DVLOG(1) << "Unknown AudioCodec: " << audio_codec;
- }
-@@ -149,8 +153,10 @@
- return kCodecMPEG4;
- case AV_CODEC_ID_VP8:
- return kCodecVP8;
-+#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9
- case AV_CODEC_ID_VP9:
- return kCodecVP9;
-+#endif
- default:
- DVLOG(1) << "Unknown video CodecID: " << codec_id;
- }
-@@ -167,8 +173,10 @@
- return AV_CODEC_ID_MPEG4;
- case kCodecVP8:
- return AV_CODEC_ID_VP8;
-+#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9
- case kCodecVP9:
- return AV_CODEC_ID_VP9;
-+#endif
- default:
- DVLOG(1) << "Unknown VideoCodec: " << video_codec;
- }
---- a/media/filters/ffmpeg_demuxer.cc.orig 2013-05-09 18:04:25.089276403 +0000
-+++ b/media/filters/ffmpeg_demuxer.cc 2013-05-09 18:05:16.289599070 +0000
-@@ -111,12 +111,15 @@
- // Get side data if any. For now, the only type of side_data is VP8 Alpha. We
- // keep this generic so that other side_data types in the future can be
- // handled the same way as well.
-- av_packet_split_side_data(packet.get());
- int side_data_size = 0;
-- uint8* side_data = av_packet_get_side_data(
-+ uint8* side_data = NULL;
-+#ifndef CHROMIUM_OMIT_AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
-+ av_packet_split_side_data(packet.get());
-+ side_data = av_packet_get_side_data(
- packet.get(),
- AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
- &side_data_size);
-+#endif
+- # Location is for CrOS chroot. If you want to use this, enter chroot
+- # and copy ffmpeg to a location that is reachable.
+- add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
+- add_flag_common --target-os=linux
+- add_flag_common --arch=arm
++ # Location is for CrOS chroot. If you want to use this, enter chroot
++ # and copy ffmpeg to a location that is reachable.
++ add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
++ add_flag_common --target-os=linux
++ add_flag_common --arch=arm
++ fi
- // If a packet is returned by FFmpeg's av_parser_parse2() the packet will
- // reference inner memory of FFmpeg. As such we should transfer the packet
---- a/media/base/media_posix.cc.orig 2013-05-24 20:59:12.963046035 +0000
-+++ b/media/base/media_posix.cc 2013-05-24 20:59:50.593275882 +0000
-@@ -11,12 +11,15 @@
- #include "base/path_service.h"
- #include "base/strings/stringize_macros.h"
- #include "media/ffmpeg/ffmpeg_common.h"
-+
-+#if !defined(USE_SYSTEM_FFMPEG)
- #include "third_party/ffmpeg/ffmpeg_stubs.h"
-
- using third_party_ffmpeg::kNumStubModules;
- using third_party_ffmpeg::kModuleFfmpegsumo;
- using third_party_ffmpeg::InitializeStubs;
- using third_party_ffmpeg::StubPathMap;
-+#endif
-
- namespace media {
- namespace internal {
-@@ -46,6 +49,9 @@
- #endif
-
- bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) {
-+#if defined(USE_SYSTEM_FFMPEG)
-+ return true;
-+#else
- StubPathMap paths;
-
- // First try to initialize with Chrome's sumo library.
-@@ -61,6 +67,7 @@
- FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION))).value());
-
- return InitializeStubs(paths);
-+#endif
- }
-
- } // namespace internal
+ # TODO(ihf): ARM compile flags are tricky. The final options
+ # overriding everything live in chroot /build/*/etc/make.conf
+@@ -322,11 +321,13 @@
+ # NOTE: softfp/hardfp selected at gyp time.
+ add_flag_common --extra-cflags=-mfloat-abi=hard
+ elif [ "$TARGET_ARCH" = "arm-neon" ]; then
+- # This if-statement is for chroot arm-generic.
+- add_flag_common --enable-cross-compile
+- add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
+- add_flag_common --target-os=linux
+- add_flag_common --arch=arm
++ if [ "$HOST_ARCH" != "arm" ]; then
++ # This if-statement is for chroot arm-generic.
++ add_flag_common --enable-cross-compile
++ add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
++ add_flag_common --target-os=linux
++ add_flag_common --arch=arm
++ fi
+ add_flag_common --enable-armv6
+ add_flag_common --enable-armv6t2
+ add_flag_common --enable-vfp