2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-25 08:40:10 -07:00
repo/testing/chromium/build

56 lines
2.3 KiB
Plaintext
Raw Normal View History

2019-07-21 03:11:03 -06:00
#!/bin/sh -e
2019-07-28 09:49:11 -06:00
for patch in *.patch; do
patch -p1 < "$patch"
done
2019-07-28 09:07:09 -06:00
2019-07-28 00:36:10 -06:00
# Fix 'python2' shebangs.
2019-07-28 00:59:42 -06:00
find . -type f -name \*.py -exec sed -i '1s|python$|&2|' {} \;
2019-07-27 23:59:06 -06:00
2019-07-28 00:36:10 -06:00
# Use 'gcc' instead of 'clang'.
2019-07-28 09:55:44 -06:00
export CC=gcc CXX=g++ LD=g++
2019-07-28 01:34:14 -06: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 01:44:02 -06:00
exec python2 "\$@"
2019-07-28 01:34:14 -06:00
EOF
chmod +x ./fix-python-bin/python
2019-07-28 00:36:10 -06:00
2019-07-28 15:38:37 -06: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 14:54:27 -06:00
# Use system libraries.
2019-07-28 15:16:42 -06:00
for dep in ffmpeg fontconfig harfbuzz-ng libdrm libevent libjpeg \
2019-07-28 14:59:52 -06:00
libpng libwebp libxml libxslt opus re2 snappy yasm; do
2019-07-28 14:54:27 -06: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-07-28 15:16:42 -06:00
--system-libraries ffmpeg fontconfig harfbuzz-ng libdrm libevent libjpeg libpng libwebp libxml libxslt opus re2 snappy yasm
2019-07-28 14:54:27 -06:00
2019-07-28 00:32:06 -06:00
python2 tools/gn/bootstrap/bootstrap.py -s -v \
2019-07-28 15:51:44 -06:00
--gn-gen-args 'is_debug=false use_jumbo_build=true enable_nacl=false symbol_level=0 blink_symbol_level=0 enable_nacl_nonsfi=false use_gold=false treat_warnings_as_errors=false fatal_linker_warnings=false use_sysroot=false use_cups=false rtc_use_x11=true is_clang=false use_atk=false use_dbus=false safe_browsing_mode=0 use_pulseaudio=false use_gperf=false use_gconf=false use_gio=false use_gnome_keyring=false use_kerberos=false use_allocator="none" use_allocator_shim=false use_system_harfbuzz=true clang_use_chrome_plugins=false custom_toolchain="//build/toolchain/linux/unbundle:default" host_toolchain="//build/toolchain/linux/unbundle:default" linux_use_bundled_binutils=false use_custom_libcxx=false use_lld=false'
2019-07-28 01:07:52 -06:00
2019-07-28 00:32:06 -06:00
out/Release/gn gen out/Release \
2019-07-28 00:48:09 -06:00
--script-executable=/usr/bin/python2
2019-07-27 23:49:13 -06:00
2019-07-28 00:32:06 -06:00
ninja -C out/Release chrome chromedriver
2019-07-28 09:49:11 -06:00
2019-07-28 10:08:35 -06:00
cd out/Release
for bin in chrome chromedriver *.bin; do
install -Dm755 "$bin" "$1/usr/lib/chromium/$bin"
done