Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 109 lines (79 sloc) 3.18 KB
#!/bin/bash
PKG=brave-browser
VERSION=0.66.101
BUILD=0
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/package/bin:/usr/local/bin
PREFIX=/pkg/$PKG-$VERSION-$BUILD
set -xe
umask 022
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && chmod -c -R u+rwx $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
exec </dev/null
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile
export MAKEFLAGS="-j $(nproc)"
# export MAKEFLAGS="-j 1"
BUILDDIR=$PREFIX/build
set -ex
mkdir -p $BUILDDIR
cd $BUILDDIR
S=brave-browser-${VERSION}
[ -d brave-browser ] || git clone https://github.com/brave/brave-browser
cd brave-browser
# git pull
git checkout v${VERSION}
npm config set color false
npm install
npm run init
# building fails somewhere in ./third_party/angle/third_party/vulkan-validation-layers/src/layers/
x=<<'xxx'
sudo -u build ninja -C /pkg/brave-browser-0.66.101-0/build/brave-browser/src/out/Debug brave -k 1 -v -j 1
[64/26338] python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="nm" --sofile="./libVkLayer_stateless_validation.so" --tocfile="./libVkLayer_stateless_validation.so.TOC" --output="./libVkLayer_stateless_validation.so" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-Bsymbolic,--exclude-libs,ALL -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,--color-diagnostics -m64 -Wl,--gdb-index -rdynamic -nostdlib++ --sysroot=../../build/linux/debian_sid_amd64-sysroot -L../../build/linux/debian_sid_amd64-sysroot/usr/local/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath=\$ORIGIN -Werror -o "./libVkLayer_stateless_validation.so" -Wl,-soname="libVkLayer_stateless_validation.so" @"./libVkLayer_stateless_validation.so.rsp"
FAILED: libVkLayer_stateless_validation.so libVkLayer_stateless_validation.so.TOC
ld.lld: error: undefined symbol: AllVkImageUsageFlagBits
xxx
npm run build
npm run build Release
find ${BUILDDIR} -perm -700 ! -perm -005 -exec chmod o+rx '{}' ';'
for b in Debug Release; do
mkdir -p ${PREFIX}/$b
for e in brave \
'*.so' \
'*.pak' \
'*.bin' \
icudtl.dat \
locales \
swiftshader \
; do
cp -ax ${BUILDDIR}/brave-browser/src/out/$b/$e ${PREFIX}/$b/
done
done
rm -f ${PREFIX}/$b/swiftshader/*.TOC
mkdir -p ${PREFIX}/bin
cat >${PREFIX}/bin/brave <<__EOS__
#!/bin/sh
export CHROME_LOG_FILE=chrome_debug.log
exec ${PREFIX}/Release/brave \
--enable-logging \
--v=0 \
--disable-brave-update --disable-chrome-google-url-tracking-client \
$@
__EOS__
chmod 755 ${PREFIX}/bin/brave
cat >${PREFIX}/bin/brave-debug <<__EOS__
#!/bin/sh -x
export CHROME_LOG_FILE=chrome_debug.log
exec ${PREFIX}/Debug/brave \
--enable-logging \
--v=0 \
--disable-brave-update --disable-chrome-google-url-tracking-client \
$@
__EOS__
chmod 755 ${PREFIX}/bin/brave-debug