2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-08-22 14:06:19 +00:00
repo/testing/chromium/build

110 lines
3.2 KiB
Plaintext
Raw Normal View History

2019-07-21 09:11:03 +00:00
#!/bin/sh -e
pkg_dir=$1
set -- \
blink_symbol_level=0 \
clang_use_chrome_plugins=false \
closure_compile=false \
custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \
enable_nacl=false \
enable_nacl_nonsfi=false \
enable_reading_list=false \
enable_remoting=false \
enable_reporting=false \
enable_service_discovery=false \
enable_swiftshader=false \
2019-08-01 21:19:42 +00:00
enable_vr=false \
fatal_linker_warnings=false \
host_toolchain=\"//build/toolchain/linux/unbundle:default\" \
2019-07-31 22:53:53 +00:00
is_clang=true \
is_debug=false \
linux_use_bundled_binutils=false \
rtc_use_x11=true \
safe_browsing_mode=0 \
symbol_level=0 \
treat_warnings_as_errors=false \
use_allocator=\"none\" \
use_allocator_shim=false \
use_atk=false \
use_cups=false \
use_custom_libcxx=false \
use_dbus=false \
use_gio=false \
use_gnome_keyring=false \
use_gold=false \
use_jumbo_build=true \
2019-08-01 07:03:28 +00:00
jumbo_file_merge_limit=25 \
use_kerberos=false \
2019-08-01 07:24:01 +00:00
enable_hangout_services_extension=false \
2019-08-01 21:16:53 +00:00
use_lld=false \
2019-07-31 06:47:08 +00:00
icu_use_data_file=false \
use_pulseaudio=false \
use_sysroot=false \
use_system_harfbuzz=true \
use_official_google_api_keys=false \
2019-07-31 06:35:50 +00:00
use_unofficial_version_number=false \
2019-08-01 21:14:11 +00:00
fieldtrial_testing_like_official_build=true \
2019-08-01 07:24:01 +00:00
proprietary_codecs=false \
2019-08-01 12:24:41 +00:00
target_cpu=\"x64\"
2019-07-28 15:49:11 +00:00
for patch in *.patch; do
patch -p1 < "$patch"
done
2019-07-28 15:07:09 +00:00
2019-07-31 22:53:53 +00:00
# Use 'clang' instead of 'gcc'.
2019-08-01 12:30:15 +00:00
export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm LD=ld.lld
2019-07-28 07:34:14 +00:00
export PATH=$PWD/fix-python-bin:$PATH
# Make a temporary script to cause 'python' to resolve to python 2 and not 3.
mkdir -p fix-python-bin
cat << EOF > ./fix-python-bin/python
#!/bin/sh
2019-07-28 07:44:02 +00:00
exec python2 "\$@"
2019-07-28 07:34:14 +00:00
EOF
chmod +x ./fix-python-bin/python
2019-07-28 06:36:10 +00:00
2019-07-28 21:38:37 +00:00
# Use system nodejs.
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
2019-07-28 20:54:27 +00:00
# Use system libraries.
2019-08-01 12:30:34 +00:00
for dep in fontconfig harfbuzz-ng libdrm libevent libjpeg \
2019-07-28 20:59:52 +00:00
libpng libwebp libxml libxslt opus re2 snappy yasm; do
2019-07-28 20:54:27 +00:00
find . -type f -path "*third_party/$dep/*" \
\! -path "*third_party/$dep/chromium/*" \
\! -path "*third_party/$dep/google/*" \
\! -path './base/third_party/icu/*' \
\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
\! -path './third_party/yasm/run_yasm.py' \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
# Switch to system provided dependencies.
python2 build/linux/unbundle/replace_gn_files.py \
2019-08-01 12:30:34 +00:00
--system-libraries fontconfig harfbuzz-ng libdrm libevent \
2019-08-01 12:24:41 +00:00
libjpeg libpng libwebp libxml libxslt opus re2 \
snappy yasm
2019-07-28 20:54:27 +00:00
python2 tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$*"
2019-07-28 07:07:52 +00:00
2019-07-30 15:10:35 +00:00
# All shells seem to support this despite the lack of a POSIX spec for it.
# shellcheck disable=2039
2019-08-01 16:27:30 +00:00
ulimit -n 4096 ||:
2019-07-30 15:10:35 +00:00
2019-07-28 06:32:06 +00:00
out/Release/gn gen out/Release \
2019-07-28 06:48:09 +00:00
--script-executable=/usr/bin/python2
2019-07-28 05:49:13 +00:00
2019-07-28 06:32:06 +00:00
ninja -C out/Release chrome chromedriver
2019-07-28 15:49:11 +00:00
2019-07-28 16:08:35 +00:00
cd out/Release
for bin in chrome chromedriver *.bin; do
install -Dm755 "$bin" "$pkg_dir/usr/lib/chromium/$bin"
2019-07-28 16:08:35 +00:00
done
mkdir -p "$pkg_dir/usr/bin"
ln -s /usr/lib/chromium/chrome "$pkg_dir/usr/bin/chrome"
ln -s /usr/lib/chromium/chromedriver "$pkg_dir/usr/bin/chromedriver"