diff options
author | sL1pKn07 | 2018-03-30 00:57:28 +0200 |
---|---|---|
committer | sL1pKn07 | 2018-03-30 00:57:28 +0200 |
commit | 339d82c28decc387ff702ca23dfb20b1d8069488 (patch) | |
tree | 53ca6460d6dfb867fe041039e4321520ae2d9698 | |
parent | b66ebd8a2666d2c9d5d13d15b7853ff96fa653a0 (diff) | |
download | aur-339d82c28decc387ff702ca23dfb20b1d8069488.tar.gz |
Update to 67.0.3381.0
- Build NaCL by default
- Use only clang for build. can switch between bundled or system clang
- Use bundled ffmpeg. if use system ffmpeg fail playback all videos
- Disable Widevine. seems need update to new API in upstream
- Remove debug and ccache options. now use makepkg environment
- Remove attemps to fix libpng errors. this do nothig after all
- Add some patches and remove others
- Cleanup and fix typos
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 301 | ||||
-rw-r--r-- | chromium-exclude_unwind_tables_r3.patch | 33 |
4 files changed, 130 insertions, 233 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Sat Mar 17 20:32:48 UTC 2018 +# Thu Mar 29 22:50:21 UTC 2018 pkgbase = chromium-dev pkgdesc = The open-source project behind Google Chrome (Dev Channel) - pkgver = 66.0.3350.0 + pkgver = 67.0.3381.0 pkgrel = 1 url = http://www.chromium.org install = chromium-dev.install @@ -18,7 +18,6 @@ pkgbase = chromium-dev makedepends = subversion makedepends = yasm makedepends = git - makedepends = imagemagick makedepends = hwids makedepends = nodejs makedepends = wget @@ -35,10 +34,12 @@ pkgbase = chromium-dev depends = xdg-utils depends = libcups depends = libxml2 - depends = ffmpeg depends = gtk3 depends = openh264 depends = vulkan-icd-loader + depends = libpulse + depends = libwebp + depends = opus optdepends = pepper-flash: PPAPI Flash Player optdepends = chromium-widevine-dev: Widevine plugin (eg: Netflix) (Dev Channel) optdepends = kdialog: Needed for file dialogs in KF5 @@ -48,23 +49,28 @@ pkgbase = chromium-dev optdepends = libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users optdepends = libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users optdepends = libva-intel-driver: HW video acceleration for Intel G45 and HD users - options = !strip - source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-66.0.3350.0.tar.xz + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-67.0.3381.0.tar.xz source = git+https://github.com/foutrelis/chromium-launcher.git source = chromium-dev.svg source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-FORTIFY_SOURCE-r2.patch + source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-clang-r2.patch - source = chromium-intel-vaapi_r16.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/16/patch?download + source = https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-ffmpeg-r1.patch + source = chromium-intel-vaapi_r17.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/17/patch?download source = chromium-widevine-r1.patch - source = chromium-exclude_unwind_tables_r3.patch - sha256sums = 553129cbf651f0d94bf0200f46c0359f2abd2aebf435723ebf667bb5062b6ffa + source = fix_gn.diff.base64::https://chromium-review.googlesource.com/changes/982250/revisions/2/patch?download + source = chromium-skia-harmony.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium + sha256sums = cbe8b28a30699687e54ad6ef7edae1da76c1e4738c7d9b1a1d8815a1e2460582 sha256sums = SKIP sha256sums = dd2b5c4191e468972b5ea8ddb4fa2e2fa3c2c94c79fc06645d0efc0e63ce7ee1 sha256sums = fa3f703d599051135c5be24b81dfcb23190bb282db73121337ac76bc9638e8a5 + sha256sums = bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562 sha256sums = 4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3 - sha256sums = 809f3a8939259b2a346935bcf414b88155db28b355b689532ae5b88c714d822f + sha256sums = aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde + sha256sums = 0db6db88f49e01a42b0defc9b152b90d628ff6a0c09268fe7b0c02c569acf60e sha256sums = 0d537830944814fe0854f834b5dc41dc5fc2428f77b2ad61d4a5e76b0fe99880 - sha256sums = 603d05a0099302ea0797888ac499053a44c11f136ef9e2c471be52c62f6e499c + sha256sums = 1965356bb6e7ca5fb4be30b3034325b4eb8d91bcbc07d7c8c0c6e2591f05fbe9 + sha256sums = feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3 pkgname = chromium-dev diff --git a/.gitignore b/.gitignore index 371ed59e8ba5..441539d1399a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ !chromium-dev.install !chromium-dev.svg !chromium-widevine-r1.patch -!chromium-exclude_unwind_tables_r3.patch @@ -9,16 +9,14 @@ ## -- Build options -- ## ######################### -_use_clang=1 # Use clang compiler (downloaded binaries from google). Results in faster build and smaller chromium. -_use_ccache=0 # Use ccache when build. -_debug_mode=0 # Build in debug mode. -_use_wayland=0 # Build Wayland NOTE: extremely experimental and don't work at this moment +_use_bundled_clang=1 # Use bundled clang compiler (downloaded binaries from google). +_use_wayland=0 # Build Wayland NOTE: extremely experimental and don't work at this moment ############################################## ## -- Package and components information -- ## ############################################## pkgname=chromium-dev -pkgver=66.0.3350.0 +pkgver=67.0.3381.0 pkgrel=1 pkgdesc="The open-source project behind Google Chrome (Dev Channel)" arch=('x86_64') @@ -39,11 +37,14 @@ depends=( # 'harfbuzz-icu' # 'protobuf' # 'libevent' - 'ffmpeg' +# 'ffmpeg' # 'icu' # https://crbug.com/678661 'gtk3' 'openh264' 'vulkan-icd-loader' + 'libpulse' + 'libwebp' + 'opus' ) makedepends=( 'libexif' @@ -56,12 +57,12 @@ makedepends=( 'subversion' 'yasm' 'git' - 'imagemagick' 'hwids' 'nodejs' 'wget' 'atk' 'at-spi2-atk' + 'ncurses5-compat-libs' ) optdepends=( 'pepper-flash: PPAPI Flash Player' @@ -73,6 +74,10 @@ optdepends=( 'ttf-font: For some typography' # 'libappindicator-gtk3: Needed for show systray icon in the panel on GTK3 Desktop based' + # + 'libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users' + 'libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users' + 'libva-intel-driver: HW video acceleration for Intel G45 and HD users' ) source=( #"https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgver}.tar.xz" "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${pkgver}.tar.xz" @@ -80,13 +85,15 @@ source=( #"https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgv 'chromium-dev.svg' # Patch form Gentoo 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-FORTIFY_SOURCE-r2.patch' + 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-webrtc-r0.patch' 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-clang-r2.patch' + 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-ffmpeg-r1.patch' # Misc Patches - 'chromium-intel-vaapi_r16.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/16/patch?download' + 'chromium-intel-vaapi_r17.diff.base64::https://chromium-review.googlesource.com/changes/532294/revisions/17/patch?download' # Patch from crbug (chromium bugtracker) or Arch chromium package 'chromium-widevine-r1.patch' -# 'chromium-exclude_unwind_tables.patch.base64::https://chromium-review.googlesource.com/changes/712575/revisions/1/patch?download' # https://bugs.archlinux.org/task/55914 - 'chromium-exclude_unwind_tables_r3.patch' + 'fix_gn.diff.base64::https://chromium-review.googlesource.com/changes/982250/revisions/2/patch?download' + 'chromium-skia-harmony.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium' ) sha256sums=( #"$(curl -sL https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgver}.tar.xz.hashes | grep sha256 | cut -d ' ' -f3)" "$(curl -sL https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${pkgver}.tar.xz.hashes | grep sha256 | cut -d ' ' -f3)" @@ -94,15 +101,17 @@ sha256sums=( #"$(curl -sL https://gsdview.appspot.com/chromium-browser-official/ 'dd2b5c4191e468972b5ea8ddb4fa2e2fa3c2c94c79fc06645d0efc0e63ce7ee1' # Patch form Gentoo 'fa3f703d599051135c5be24b81dfcb23190bb282db73121337ac76bc9638e8a5' + 'bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562' '4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3' + 'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde' # Misc Patches - '809f3a8939259b2a346935bcf414b88155db28b355b689532ae5b88c714d822f' + '0db6db88f49e01a42b0defc9b152b90d628ff6a0c09268fe7b0c02c569acf60e' # Patch from crbug (chromium bugtracker) or Arch chromium package '0d537830944814fe0854f834b5dc41dc5fc2428f77b2ad61d4a5e76b0fe99880' # 'd4a99239701256edb37ef3a5504fa87ca2219349834cbf59b9fe42bf7ac496d8' - '603d05a0099302ea0797888ac499053a44c11f136ef9e2c471be52c62f6e499c' + '1965356bb6e7ca5fb4be30b3034325b4eb8d91bcbc07d7c8c0c6e2591f05fbe9' + 'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3' ) -options=('!strip') install=chromium-dev.install ################################################ @@ -117,23 +126,6 @@ _google_api_key="AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM" _google_default_client_id="413772536636.apps.googleusercontent.com" _google_default_client_secret="0ZChLK6AxeA3Isu96MkwqDR4" -# Build NaCL -_build_nacl=1 -_nacl=true -makedepends+=('ncurses5-compat-libs') - -# Need you use ccache?. -if [ "${_use_ccache}" = "1" ]; then - makedepends+=('ccache') -fi - -# Are you use gnome-keyring/gnome?. -_gnome_keyring=false -if [ -e /usr/lib/libgnome-keyring.so.0 ]; then - depends+=('libgnome-keyring') - _gnome_keyring=true -fi - # List of third-party components needed for build chromium. The rest is remove by remove_bundled_libraries srcipt in prepare(). _keeplibs=( 'base/third_party/dmg_fp' @@ -147,7 +139,6 @@ _keeplibs=( 'base/third_party/xdg_user_dirs' 'buildtools/third_party/libc++' 'buildtools/third_party/libc++abi' - 'buildtools/third_party/libunwind' 'chrome/third_party/mozilla_security_manager' 'courgette/third_party' 'native_client/src/third_party/dlmalloc' @@ -189,6 +180,7 @@ _keeplibs=( 'third_party/cros_system_api' 'third_party/devscripts' 'third_party/dom_distiller_js' + 'third_party/ffmpeg' 'third_party/fips181' 'third_party/flatbuffers' 'third_party/flot' @@ -199,7 +191,6 @@ _keeplibs=( 'third_party/google_input_tools/third_party/closure_library' 'third_party/google_input_tools/third_party/closure_library/third_party/closure' 'third_party/googletest' - 'third_party/harfbuzz-ng' 'third_party/hunspell' 'third_party/iccjpeg' 'third_party/inspector_protocol' @@ -228,7 +219,6 @@ _keeplibs=( 'third_party/mesa' 'third_party/metrics_proto' 'third_party/modp_b64' - 'third_party/mt19937ar' 'third_party/node' 'third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2' 'third_party/openmax_dl' @@ -254,6 +244,8 @@ _keeplibs=( 'third_party/shaderc' 'third_party/skia' 'third_party/skia/third_party/gif' + 'third_party/skia/third_party/spirv-headers' + 'third_party/skia/third_party/spirv-tools' 'third_party/skia/third_party/vulkan' 'third_party/smhasher' 'third_party/spirv-headers' @@ -291,33 +283,38 @@ _keeplibs=( # Set build flags. _flags=( + "custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" + "host_toolchain=\"//build/toolchain/linux/unbundle:default\"" + 'is_clang=true' 'is_debug=false' - 'enable_widevine=true' - 'enable_hangout_services_extension=false' + 'is_cfi=true' +# 'enable_widevine=true' + 'enable_hangout_services_extension=true' "ffmpeg_branding=\"ChromeOS\"" 'proprietary_codecs=true' "google_api_key=\"${_google_api_key}\"" "google_default_client_id=\"${_google_default_client_id}\"" "google_default_client_secret=\"${_google_default_client_secret}\"" - 'fieldtrial_testing_like_official_build=false' + 'fieldtrial_testing_like_official_build=true' + 'remove_webcore_debug_symbols=true' 'use_gtk3=true' "use_gio=false" - "use_gnome_keyring=${_gnome_keyring}" + "use_gnome_keyring=false" 'link_pulseaudio=true' 'use_sysroot=false' 'use_gold=false' 'linux_use_bundled_binutils=false' 'fatal_linker_warnings=false' 'treat_warnings_as_errors=false' - "enable_nacl=${_nacl}" - "enable_nacl_nonsfi=${_nacl}" + 'enable_nacl=true' + 'enable_nacl_nonsfi=true' 'use_custom_libcxx=false' - 'use_lld=false' # https://bugs.gentoo.org/641556 'use_jumbo_build=false' # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md 'enable_vulkan=true' + 'use_vaapi=true' ) -if [ "$_wayland" = "1" ]; then +if [ "${_wayland}" = "1" ]; then _flags+=( 'use_ozone=true' 'use_xkbcommon=true' @@ -326,23 +323,14 @@ if [ "$_wayland" = "1" ]; then ) fi - -# Enable VAAPI, see https://chromium-review.googlesource.com/532294 -_flags+=('use_vaapi=true') -optdepends+=( - 'libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users' - 'libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users' - 'libva-intel-driver: HW video acceleration for Intel G45 and HD users' - ) - # Set the bundled/external components. # TODO: need ported to GN as GYP doing before. see status page: https://crbug.com/551343 _use_system=( - 'ffmpeg' +# 'ffmpeg' # I'm not sure why, but all videos stop playbackl if use system ffmpeg 'flac' 'fontconfig' 'freetype' -# 'harfbuzz-ng' # freetype and harfbuzz needs update at same time, or both or none. disable due freetype bug. link avobe + 'harfbuzz-ng' # 'icu' # https://crbug.com/678661 'libdrm' # 'libevent' # Get segfaults and other problems https://bugs.gentoo.org/593458 @@ -360,40 +348,27 @@ _use_system=( 'zlib' ) -# Use system harfbuzz -_flags+=('use_system_harfbuzz=true') +# https://crbug.com/678661 +_keeplibs+=( + 'third_party/icu' + ) # Conditionals. -# Build Debug mode?. -if [ "${_debug_mode}" = "1" ]; then - _keeplibs+=('native_client/src/third_party/valgrind') - _flags+=( - 'symbol_level=1' - 'remove_webcore_debug_symbols=false' - ) -elif [ "${_debug_mode}" = "0" ]; then - _flags+=( - 'remove_webcore_debug_symbols=true' - 'exclude_unwind_tables=true' - ) +if check_option strip y; then + CFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables' + CXXFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables' + CPPFLAGS+=' -DNO_UNWIND_TABLES' fi -# https://crbug.com/678661 -if [ "${_build_nacl}" = "1" ]; then - _keeplibs+=('third_party/icu') # https://crbug.com/678661 -elif [ "${_build_nacl}" = "0" ]; then - depends+=('icu') - _use_system+=('icu') +if check_buildoption ccache y; then + # Avoid falling back to preprocessor mode when sources contain time macros + export CCACHE_CPP2=yes + export CCACHE_SLOPPINESS=time_macros fi ################################################ prepare() { - # Use custom toolchain. - _flags+=( - "custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" - "host_toolchain=\"//build/toolchain/linux/unbundle:default\"" - ) # Set Python2 path. mkdir -p python-path @@ -417,16 +392,16 @@ prepare() { msg2 "Patching the sources" # Patch sources from Gentoo. patch -p1 -i "${srcdir}/chromium-FORTIFY_SOURCE-r2.patch" + patch -p1 -i "${srcdir}/chromium-webrtc-r0.patch" patch -p1 -i "${srcdir}/chromium-clang-r2.patch" + patch -p1 -i "${srcdir}/chromium-ffmpeg-r1.patch" # Pats to chromium dev's about why always they forget add/remove missing build rules - # Done this time :D - - # Misc Patches: - sed '11i#include <cstring>' -i third_party/webrtc/api/audio/audio_frame.cc + base64 -d "${srcdir}/fix_gn.diff.base64" | patch -p1 -i - # https://crbug.com/710701 - _chrome_build_hash=$(curl -s "https://chromium.googlesource.com/chromium/src.git/+/${pkgver}?format=TEXT" | base64 -d | grep -Po '^parent \K[0-9a-f]{40}$') + _chrome_build_hash=$(curl -s "https://chromium.googlesource.com/chromium/src.git/+/${pkgver}?format=TEXT") + _chrome_build_hash=$(echo $_chrome_build_hash | base64 -d | grep -Po '^parent \K[0-9a-f]{40}$') if [[ -z $_chrome_build_hash ]]; then error "Unable to fetch Chrome build hash." return 1 @@ -437,35 +412,22 @@ prepare() { export VULKAN_SDK="/usr" sed 's|/x86_64-linux-gnu||' -i gpu/vulkan/BUILD.gn - # Apply VAAPI patch - #base64 -d "${srcdir}/chromium-intel-vaapi_r16.diff.base64" | patch -p1 -i - + # https://chromium-review.googlesource.com/c/chromium/src/+/532294 + #base64 -d "${srcdir}/chromium-intel-vaapi_r17.diff.base64" | patch -p1 -i - # Patch from crbug (chromium bugtracker) or Arch chromium package + # https://crbug.com/skia/6663#c10 + patch -Np4 -i "${srcdir}/chromium-skia-harmony.patch" + # https://crbug.com/473866 patch -p0 -i "${srcdir}/chromium-widevine-r1.patch" sed 's|@WIDEVINE_VERSION@|The Cake Is a Lie|g' -i third_party/widevine/cdm/stub/widevine_cdm_version.h - # https://bugs.archlinux.org/task/55914 - #base64 -d "${srcdir}/chromium-exclude_unwind_tables.patch.base64" | patch -p1 -i - - patch -p1 -i "${srcdir}/chromium-exclude_unwind_tables_r3.patch" - # Setup nodejs dependency mkdir -p third_party/node/linux/node-linux-x64/bin/ ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/node - # Try to fix libpng errors. - msg2 "Attempt for fix libpng errors" - for _path in 'chrome/app/theme' 'chrome/renderer' 'ui'; do - pushd "${_path}" &> /dev/null - export IFS=$'\n' - for i in $(find . -name '*.png' -type f); do - mogrify "${i}" &> /dev/null - done - export IFS=' ' - popd &> /dev/null - done - # Remove most bundled libraries. Some are still needed. msg2 "Removing unnecessary components to save space." python2 build/linux/unbundle/remove_bundled_libraries.py ${_keeplibs[@]} --do-remove @@ -479,10 +441,8 @@ prepare() { # Use the file at run time instead of effectively compiling it in. sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' -i device/usb/BUILD.gn - if [ "${_build_nacl}" = "1" ]; then - msg2 "Setup NaCl/PNaCl SDK: Download and install NaCl/PNaCl toolchains" - python2 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract - fi + msg2 "Setup NaCl/PNaCl SDK: Download and install NaCl/PNaCl toolchains" + python2 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract } build() { @@ -493,60 +453,49 @@ build() { cd "chromium-${pkgver}" - # Download clang from google. need for build NaCl. also is used by build the project in x86_64 systems when use clang + msg2 "Download external build components from google" python2 tools/clang/scripts/update.py --without-android #--force-local-build --use-system-cmake --if-needed --gcc-toolchain=/usr --skip-checkout - # Setup compilers. - if [ "${_use_ccache}" = "1" ]; then - export CCACHE_CPP2=yes - export CCACHE_SLOPPINESS=time_macros - _ccache=ccache - _ccache_flags='-Qunused-arguments' - fi + msg2 "Setup compiler" - _set_gcc() { - _compiler=GCC + if [ "${_use_bundled_clang}" = "0" ]; then _flags+=( - 'is_clang=false' 'clang_use_chrome_plugins=false' ) - _c_compiler=gcc - _cpp_compiler=g++ - CFLAGS+=' -fno-delete-null-pointer-checks' - CXXFLAGS+=' -fno-delete-null-pointer-checks' - } - - if [ "${_use_clang}" = "0" ]; then - _set_gcc - elif [ "${_use_clang}" = "1" ]; then - _compiler=Clang + elif [ "${_use_bundled_clang}" = "1" ]; then _flags+=( - 'is_clang=true' 'clang_use_chrome_plugins=true' ) - _clang_path="${srcdir}/chromium-${pkgver}/third_party/llvm-build/Release+Asserts/bin" - _c_compiler="${_clang_path}/clang" - _cpp_compiler="${_clang_path}/clang++" + _clang_path="${srcdir}/chromium-${pkgver}/third_party/llvm-build/Release+Asserts/bin/" + # Bundled clang not like this export CXXFLAGS="${CXXFLAGS//-fno-plt/}" export CFLAGS="${CFLAGS//-fno-plt/}" - CFLAGS+=' -Wno-unknown-warning-option' - CXXFLAGS+=' -Wno-unknown-warning-option' fi - # Export compilers - msg2 "Setup ${_compiler} compiler${_compiler_msg}" + export CC="${_clang_path}clang" + export CXX="${_clang_path}clang++" export AR=ar export NM=nm - export CC="${_ccache} ${_c_compiler} ${_ccache_flags}" - export CXX="${_ccache} ${_cpp_compiler} ${_ccache_flags}" - msg2 "Starting building Chromium..." - # Configure the builder. + #echo ${_flags[@]} + + msg2 "Configure bundled ffmpeg" + pushd third_party/ffmpeg > /dev/null + # use system opus + sed -e "s|CHROMIUM_ROOT_DIR, 'third_party/opus/src/include'|'/usr/include/opus'|g" -i chromium/scripts/build_ffmpeg.py + chromium/scripts/build_ffmpeg.py linux x64 --branding ChromeOS + chromium/scripts/copy_config.sh + chromium/scripts/generate_gn.py + popd > /dev/null + + msg2 "Build GN" python2 tools/gn/bootstrap/bootstrap.py -v -s --no-clean - out/Release/gn gen out/Release -v --args="${_flags[*]}" --script-executable=/usr/bin/python2 + + msg2 "Starting building Chromium..." + LC_ALL=C out/Release/gn gen out/Release -v --args="${_flags[*]}" --script-executable=/usr/bin/python2 # Build all with ninja. - LC_ALL=C ninja -C out/Release -v pdf chrome chrome_sandbox chromedriver widevinecdmadapter clear_key_cdm + LC_ALL=C ninja -C out/Release -v chrome chrome_sandbox chromedriver #widevinecdmadapter } package() { @@ -567,11 +516,6 @@ package() { MENUNAME="Chromium-dev Web Browser" USR_BIN_SYMLINK_NAME=chromium-dev - # Build with debug needs a tons of space. remove this save that space, but break the rebuild process. - if [ "${_debug_mode}" = "1" ]; then - rm -fr "chromium-${pkgver}/third_party" - fi - # Install binaries. install -Dm755 chrome "${pkgdir}/usr/lib/chromium-dev/chromium-dev" install -Dm4755 chrome_sandbox "${pkgdir}/usr/lib/chromium-dev/chrome-sandbox" @@ -580,7 +524,6 @@ package() { # Install libs. _libs=( - 'libclearkeycdm.so' 'libEGL.so' 'libGLESv2.so' 'libVkLayer_core_validation.so' @@ -588,18 +531,38 @@ package() { 'libVkLayer_parameter_validation.so' 'libVkLayer_threading.so' 'libVkLayer_unique_objects.so' - 'libwidevinecdmadapter.so' +# 'libwidevinecdmadapter.so' 'swiftshader/libEGL.so' 'swiftshader/libGLESv2.so' - # - 'natives_blob.bin' - 'snapshot_blob.bin' - 'v8_context_snapshot.bin' ) for i in "${_libs[@]}"; do install -Dm755 "${i}" "${pkgdir}/usr/lib/chromium-dev/${i}" done + _blobs=( + 'natives_blob.bin' + 'snapshot_blob.bin' + 'v8_context_snapshot.bin' + 'icudtl.dat' + # + 'MEIPreload/manifest.json' + 'MEIPreload/preloaded_data.pb' + ) + for i in "${_blobs[@]}"; do + install -Dm644 "${i}" "${pkgdir}/usr/lib/chromium-dev/${i}" + done + + # Install NaCL + _nacl_libs=( + 'nacl_helper' + 'nacl_helper_bootstrap' + 'nacl_helper_nonsfi' + 'nacl_irt_x86_64.nexe' + ) + for i in "${_nacl_libs[@]}"; do + install -Dm755 "${i}" "${pkgdir}/usr/lib/chromium-dev/${i}" + done + # Install Resources. _resources=( 'chrome_100_percent.pak' @@ -615,9 +578,6 @@ package() { find resources -type f -name "*" -exec install -Dm644 '{}' "${pkgdir}/usr/lib/chromium-dev/{}" \; - install -Dm644 MEIPreload/manifest.json "${pkgdir}/usr/lib/chromium-dev/MEIPreload/manifest.json" - install -Dm644 MEIPreload/preloaded_data.pb "${pkgdir}/usr/lib/chromium-dev/MEIPreload/preloaded_data.pb" - # Install .desktop and manpages process_template "${srcdir}/chromium-${pkgver}/chrome/app/resources/manpage.1.in" chromium-dev.1 install -Dm644 chromium-dev.1 "${pkgdir}/usr/share/man/man1/chromium-dev.1" @@ -637,43 +597,8 @@ package() { done install -Dm644 "${srcdir}/chromium-dev.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/chromium-dev.svg" - # Install NaCL stuff if is detected. - if [ "${_build_nacl}" = "1" ]; then - _nacl_libs=( - 'nacl_helper' - 'nacl_helper_bootstrap' - 'nacl_helper_nonsfi' - 'nacl_irt_x86_64.nexe' - 'icudtl.dat' - ) - for i in "${_nacl_libs[@]}"; do - install -Dm755 "${i}" "${pkgdir}/usr/lib/chromium-dev/${i}" - done - fi - popd &> /dev/null # Install License install -Dm644 "chromium-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/chromium-dev/LICENSE" - - if [ "${_debug_mode}" = "0" ]; then - # Manually strip binaries so that 'nacl_irt_*.nexe' is left intact. - if [ "${_build_nacl}" = "1" ]; then - strip $STRIP_BINARIES "${pkgdir}/usr/lib/chromium-dev/"nacl_helper{,_bootstrap,_nonsfi} - fi - strip $STRIP_BINARIES "${pkgdir}/usr/lib/chromium-dev/"{chromium-dev,chrome-sandbox,chromedriver} - strip $STRIP_SHARED "${pkgdir}/usr/lib/chromium-dev/"lib*.so - strip $STRIP_SHARED "${pkgdir}/usr/lib/chromium-dev/swiftshader/"lib*.so - fi - - # Try to fix libpng errors. (second attemp) - for _path in "${pkgdir}/usr/lib/chromium-dev/resources/inspector/Images"; do - pushd "${_path}" &> /dev/null - export IFS=$'\n' - for i in $(find . -name '*.png' -type f); do - mogrify "${i}" &> /dev/null - done - export IFS=' ' - popd &> /dev/null - done } diff --git a/chromium-exclude_unwind_tables_r3.patch b/chromium-exclude_unwind_tables_r3.patch deleted file mode 100644 index 305549d1f548..000000000000 --- a/chromium-exclude_unwind_tables_r3.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni -index ad40fd9..50e19a4 100644 ---- a/build/config/compiler/compiler.gni -+++ b/build/config/compiler/compiler.gni -@@ -68,19 +68,19 @@ - - # x86{,_64}. - using_mismatched_sample_profile = current_cpu != "x64" && current_cpu != "x86" -+ -+ # Exclude unwind tables for official builds as unwinding can be done from -+ # stack dumps produced by Crashpad at a later time "offline" in the crash -+ # server. For unofficial (e.g. development) builds and non-Chrome branded -+ # (e.g. Cronet which doesn't use Crashpad, crbug.com/479283) builds it's -+ # useful to be able to unwind at runtime. -+ exclude_unwind_tables = -+ (is_chrome_branded && is_official_build) || -+ (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia) - } - - assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO") - --# Exclude unwind tables for official builds as unwinding can be done from stack --# dumps produced by Crashpad at a later time "offline" in the crash server. --# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet --# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able --# to unwind at runtime. --exclude_unwind_tables = -- (is_chrome_branded && is_official_build) || -- (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia) -- - # If true, optimize for size. Does not affect windows builds. - # Linux & Mac favor speed over size. - # TODO(brettw) it's weird that Mac and desktop Linux are different. We should |