From 95778912253aa184a3d1ea0b796f4078809541be Mon Sep 17 00:00:00 2001 From: David Date: Fri, 8 Apr 2022 14:36:56 +0200 Subject: [PATCH] Chromium: Add 100.0.4896.60 --- chromium-100.0.4896.60-0.build.sh | 72 ++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/chromium-100.0.4896.60-0.build.sh b/chromium-100.0.4896.60-0.build.sh index 9e687c0..04a00e7 100755 --- a/chromium-100.0.4896.60-0.build.sh +++ b/chromium-100.0.4896.60-0.build.sh @@ -1,7 +1,7 @@ #! /bin/bash -x PKG=chromium -VERSION=89.0.4389.128 +VERSION=100.0.4896.60 BUILD=0 PREFIX=/pkg/$PKG-$VERSION-$BUILD @@ -42,65 +42,90 @@ fi mkdir -p $BUILDDIR cd $BUILDDIR -#test -d depot_tools || git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git - -PATH=$PREFIX/build/depot_tools:$PATH +# clean for rebuild +if [ -d ${PKG}-${VERSION} ];then + rm -rf ${PKG}-${VERSION} +fi test -e ${PKG}-${VERSION}.tar.xz || wget https://commondatastorage.googleapis.com/${PKG}-browser-official/${PKG}-${VERSION}.tar.xz test -d ${PKG}-${VERSION} || tar xvf ${PKG}-${VERSION}.tar.xz cd ${PKG}-${VERSION} -cat /src/mariux/patches/chromium-72-as-needed.patch | patch -p1 --verbose - #Create Directories for Build and Install test -d $PREFIX/bin || mkdir $PREFIX/bin test -d out || mkdir out mkdir -p third_party/node/linux/node-linux-x64/bin if [ ! -e third_party/node/linux/node-linux-x64/bin/node ]; then - ln -s /pkg/node-10.16.0-0/bin/node third_party/node/linux/node-linux-x64/bin/ + ln -s /pkg/node-14.17.1-0/bin/node third_party/node/linux/node-linux-x64/bin/ fi -# Download the NaCL toolchains: -python2 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract + +# Add essential proprietary codecs to the "chrome" branding of ffmpeg: + cat /src/mariux/patches/chromium_ffmpeg_prop.patch | patch -p1 + # Do not make the build fail, see Chromium issue #386097: -python2 third_party/libaddressinput/chromium/tools/update-strings.py +python3 third_party/libaddressinput/chromium/tools/update-strings.py # Fix for: ERROR at //build/config/sysroot.gni:57:5: Assertion failed -python2 build/linux/sysroot_scripts/install-sysroot.py --arch=amd64 +python3 build/linux/sysroot_scripts/install-sysroot.py --arch=amd64 # Generate the ninja build files: -python2 tools/gn/bootstrap/bootstrap.py +python3 tools/gn/bootstrap/bootstrap.py -python2 tools/clang/scripts/build.py \ - --skip-checkout \ - --use-system-cmake \ - --without-android \ - --without-fuchsia +if [ -d $BUILDDIR/llvm-build ]; then + rm -r third_party/llvm-build + ln -sf $BUILDDIR/llvm-build third_party/llvm-build +else + python3 tools/clang/scripts/build.py \ + --skip-checkout \ + --use-system-cmake \ + --without-android \ + --without-fuchsia + cp -avr third_party/llvm-build $BUILDDIR +fi #Ensure that only this clang version is used export PATH=${BUILDDIR}/${PKG}-${VERSION}/third_party/llvm-build/Release+Asserts/bin:$PATH +#ffmpeg and HEVC want to play together now :) +cd third_party/ffmpeg +FFMPEG_BRANDING=Chrome +echo " +- Adding HEVC support..." +FFMPEG_CUSTOM_ARGS="--enable-decoder=hevc --enable-demuxer=hevc --enable-parser=hevc" +python3 chromium/scripts/build_ffmpeg.py linux x64 \ +--branding ${FFMPEG_BRANDING} -- ${FFMPEG_CUSTOM_ARGS} +chromium/scripts/copy_config.sh +python3 chromium/scripts/generate_gn.py + +cd ${BUILDDIR}/${PKG}-${VERSION} + _chromium_conf=( + 'blink_enable_generated_code_formatting=false' + 'blink_symbol_level=0' 'is_debug=false' - 'remove_webcore_debug_symbols=true' + #'remove_webcore_debug_symbols=true' 'use_gnome_keyring=true' 'treat_warnings_as_errors=false' - 'enable_nacl=true' + 'enable_nacl=false' 'use_sysroot=true' 'is_official_build=true' 'fatal_linker_warnings=false' 'enable_platform_hevc=true' + 'proprietary_codecs=true' 'enable_platform_ac3_eac3_audio=true' 'enable_platform_mpeg_h_audio=true' + "ffmpeg_branding=\"${FFMPEG_BRANDING}\"" 'enable_precompiled_headers=false' "google_api_key=\"$google_api_key\"" "google_default_client_id=\"$google_default_client_id\"" "google_default_client_secret=\"$google_default_client_secret\"" + 'enable_js_type_check=false' + 'enable_vulkan=true' ) # make sure to use python2 -source /pkg/python-2.7.16-0/profile +source /pkg/python-3.9.7-0/profile out/Release/gn gen out/Release --args="${_chromium_conf[*]}" @@ -111,11 +136,11 @@ install -D out/Release/chrome ${PREFIX}/bin/chrome2 cp -a out/Release/*.pak ${PREFIX}/bin/ cp -a out/Release/*.so ${PREFIX}/bin/ -cp -a out/Release/nacl_helper{,_bootstrap,_nonsfi} ${PREFIX}/bin/ -cp -a out/Release/nacl_irt_*.nexe ${PREFIX}/bin/ +cp -a out/Release/libvulkan.so.1 ${PREFIX}/bin/ cp -a out/Release/icudtl.dat ${PREFIX}/bin/ cp -a out/Release/locales ${PREFIX}/bin/ -cp -ar out/Release/swiftshader ${PREFIX}/bin/ +cp -a out/Release/{swiftshader,angledata} ${PREFIX}/bin/ +install -m755 out/Release/vk_swiftshader_icd.json ${PREFIX}/bin/ for i in out/Release/{natives_blob.bin,snapshot_blob.bin,v8_context_snapshot.bin}; do if [ -f $i ]; then @@ -125,7 +150,6 @@ done strip --strip-unneeded ${PREFIX}/bin/*.so strip --strip-unneeded ${PREFIX}/bin/chrome2 -strip --strip-unneeded ${PREFIX}/bin/nacl_helper{,_bootstrap,_nonsfi} strip --strip-unneeded ${PREFIX}/bin/swiftshader/*.so cat >$PREFIX/bin/chromium <<-EOF