# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/chromium/chromium.conf # Copyright (C) 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- runmake=0 export CC=clang CXX=clang++ chromium_flags=" is_debug=false is_official_build=true clang_use_chrome_plugins=false use_custom_libcxx=false chrome_pgo_phase=0 use_sysroot=false goma_dir=\"\" enable_nacl=false use_unofficial_version_number=false treat_warnings_as_errors=false use_official_google_api_keys=false disable_fieldtrial_testing_config=true safe_browsing_mode=0 enable_mdns=false enable_reading_list=false enable_remoting=false enable_reporting=false enable_service_discovery=false enable_vr=false enable_widevine=false enable_js_type_check=false build_with_tflite_lib=false blink_enable_generated_code_formatting=false build_dawn_tests=false custom_toolchain=\"//build/toolchain/linux/unbundle:default\" host_toolchain=\"//build/toolchain/linux/unbundle:default\" clang_base_path=\"/usr\" use_system_freetype=true use_system_harfbuzz=true use_system_lcms2=true use_system_libdrm=true use_system_libjpeg=true use_system_libpng=true use_system_libwayland=true use_system_wayland_scanner=true use_system_zlib=true use_gnome_keyring=false use_pulseaudio=true use_qt=false link_pulseaudio=true icu_use_data_file=false perfetto_use_system_protobuf=true use_vaapi=true media_use_ffmpeg=true media_use_libvpx=true media_use_openh264=true proprietary_codecs=true ffmpeg_branding=\"Chrome\" rtc_use_h264=false rtc_use_pipewire=false rtc_link_pipewire=false rtc_build_json=false rtc_build_libevent=false rtc_build_libvpx=true rtc_build_opus=false rtc_build_libsrtp=true rtc_build_ssl=true is_asan=false is_cfi=false use_thin_lto=false use_vaapi=true " s_libs=" brotli dav1d ffmpeg flac fontconfig freetype harfbuzz-ng icu libdrm libevent libjpeg libpng libwebp libxml libxslt openh264 opus re2 snappy zlib " chromium_premake() { for x in $s_libs libjpeg_turbo; do echo "Removing buildscripts for system provided $x" find . -type f -path "*third_party/$x/*" \ \! -path "*third_party/$x/chromium/*" \ \! -path "*third_party/$x/google/*" \ \! -path './base/third_party/icu/*' \ \! -path './third_party/libxml/*' \ \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \ \! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \ \! -path './third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h' \ \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \ -delete done build/linux/unbundle/replace_gn_files.py --system-libraries $s_libs mkdir -p third_party/node/linux/node-linux-x64/bin ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ gn gen out/bld --args="$(echo $chromium_flags)" } chromium_inmake() { ninja -C out/bld chrome } chromium_postmake() { cd ./out/bld mkdir -p $root${libdir##*/}/$name cp chrome $root${libdir##*/}/$name/chrome cp libvulkan.so.1 $root${libdir##*/}/$name/chrome cp libEGL.so $root${libdir##*/}/$name/chrome cp libGLESv2.so $root${libdir##*/}/$name/chrome } hook_add premake 1 chromium_premake hook_add inmake 1 chromium_inmake hook_add postmake 1 chromium_postmake