* manually add pygments hatchling DEP and update .cache
[t2sde.git] / package / www / chromium / chromium.conf
blobdef07f9b5e8e94e4a947ff4cc0d40eca458aacfa
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/chromium/chromium.conf
3 # Copyright (C) 2023 - 2024 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 runmake=0
13 CC=${CC/gcc/clang} CXX=${CXX/g++/clang++}
15 export RUSTC_BOOTSTRAP=1
17 chromium_flags="
18         is_debug=false
19         is_official_build=true
20         clang_base_path=\"/usr\"
21         clang_use_chrome_plugins=false
22         clang_version=\"19\"
23         rust_sysroot_absolute=\"/opt\/rust\"
24         rust_bindgen_root=\"/usr\"
25         rustc_version=\"rustc 1.82.0 (f6e511eec 2024-10-15) (built from a source tarball)\"
26         use_custom_libcxx=false
27         chrome_pgo_phase=0
28         use_sysroot=false
29         goma_dir=\"\"
30         enable_nacl=false
31         use_unofficial_version_number=false
32         treat_warnings_as_errors=false
33         use_official_google_api_keys=false
34         disable_fieldtrial_testing_config=true
35         safe_browsing_mode=0
36         enable_reading_list=false
37         enable_remoting=false
38         enable_reporting=false
39         enable_vr=false
40         enable_widevine=false
41         enable_js_type_check=false
42         build_with_tflite_lib=false
43         blink_enable_generated_code_formatting=false
44         build_dawn_tests=false
45         custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
46         host_toolchain=\"//build/toolchain/linux/unbundle:default\"
47         use_system_harfbuzz=true
48         use_system_lcms2=true
49         use_system_libdrm=true
50         use_system_libjpeg=true
51         use_system_libpng=true
52         use_system_libwayland=true
53         use_system_wayland_scanner=true
54         use_system_zlib=true
55         use_gnome_keyring=false
56         use_pulseaudio=true
57         use_qt=false
58         link_pulseaudio=true
59         use_vaapi=true
60         media_use_ffmpeg=true
61         media_use_libvpx=true
62         media_use_openh264=true
63         proprietary_codecs=true
64         ffmpeg_branding=\"Chrome\"
65         rtc_use_h264=false
66         rtc_use_pipewire=false
67         rtc_link_pipewire=false
68         rtc_build_json=false
69         rtc_build_libevent=false
70         rtc_build_libvpx=true
71         rtc_build_opus=false
72         rtc_build_libsrtp=true
73         rtc_build_ssl=true
74         is_asan=false
75         is_cfi=false
76         use_thin_lto=false
77         use_vaapi=true
80 s_libs="
81         brotli
82         dav1d
83         ffmpeg
84         flac
85         fontconfig
86         harfbuzz-ng
87         libdrm
88         libevent
89         libjpeg
90         libpng
91         libwebp
92         libxml
93         libxslt
94         openh264
95         opus
96         snappy
97         zlib
100 chromium_premake() {
101         for x in $s_libs libjpeg_turbo; do
102                 echo "Removing buildscripts for system provided $x"
103                         find . -type f -path "*third_party/$x/*" \
104                         \! -path "*third_party/$x/chromium/*" \
105                         \! -path "*third_party/$x/google/*" \
106                         \! -path './third_party/libxml/*' \
107                         \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
108                         \! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \
109                         \! -path './third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h' \
110                         \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
111                         -delete
112         done
114         build/linux/unbundle/replace_gn_files.py --system-libraries $s_libs
116         mkdir -p third_party/node/linux/node-linux-x64/bin
117         ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/
119         gn gen out/bld --args="$(echo $chromium_flags)"
121 hook_add premake 1 chromium_premake
123 chromium_inmake() {
124         ninja -C out/bld chrome
126 hook_add inmake 1 chromium_inmake
128 chromium_postmake() {
129         cd ./out/bld
130         mkdir -p $root${libdir##*/}/$name
132         cp chrome $root${libdir##*/}/$name/chrome
133         cp libvulkan.so.1 $root${libdir##*/}/$name/chrome
134         cp libEGL.so $root${libdir##*/}/$name/chrome
135         cp libGLESv2.so $root${libdir##*/}/$name/chrome
137 hook_add postmake 1 chromium_postmake