96 lines
3.3 KiB
Plaintext
96 lines
3.3 KiB
Plaintext
# Description: Open source version of Google Chrome web browser.
|
|
# URL: http://chromium.org/
|
|
# Maintainer: Jose V Beneyto, sepen at crux dot nu
|
|
# Packager: Tadeusz Sosnierz, tadzikes gmail com
|
|
# Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm
|
|
|
|
name=chromium
|
|
version=60.0.3112.101
|
|
release=1
|
|
source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz
|
|
last-commit-position.patch $name.sh $name.desktop
|
|
chromium-blink-gcc7.patch
|
|
chromium-v8-gcc7.patch
|
|
chromium-gn-bootstrap-r8.patch)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
|
|
export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
|
|
|
|
# we don't use git sources
|
|
patch -p1 -i $SRC/last-commit-position.patch
|
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853347
|
|
patch -p1 -i $SRC/chromium-blink-gcc7.patch
|
|
|
|
# https://bugs.chromium.org/p/chromium/issues/detail?id=614289
|
|
patch -p1 -i $SRC/chromium-v8-gcc7.patch
|
|
|
|
# Fixes from Gentoo
|
|
patch -p1 -i $SRC/chromium-gn-bootstrap-r8.patch
|
|
|
|
mkdir -p third_party/node/linux/node-linux-x64/bin
|
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
|
|
|
|
_gn_args=(
|
|
'blink_gc_plugin=false'
|
|
'clang_use_chrome_plugins=false'
|
|
'enable_hangout_services_extension=true'
|
|
'enable_nacl=false'
|
|
'enable_swiftshader=false'
|
|
'fatal_linker_warnings=false'
|
|
'ffmpeg_branding="Chrome"'
|
|
'is_clang=false'
|
|
'is_debug=false'
|
|
'linux_use_bundled_binutils=false'
|
|
'proprietary_codecs=true'
|
|
'remove_webcore_debug_symbols=true'
|
|
'symbol_level=0'
|
|
'treat_warnings_as_errors=false'
|
|
'use_allocator="none"'
|
|
'use_cups=false'
|
|
'use_gconf=false'
|
|
'use_gnome_keyring=false'
|
|
'use_gold=false'
|
|
'use_kerberos=false'
|
|
'use_pulseaudio=false'
|
|
'use_sysroot=false'
|
|
'use_system_libjpeg=true'
|
|
)
|
|
|
|
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args="${_gn_args[*]}"
|
|
out/Release/gn gen out/Release --args="${_gn_args[*]}" --script-executable=/usr/bin/python2
|
|
|
|
# Ninja, by default, sets the number of jobs to the number of availalble threads
|
|
local JOBS=$(awk 'BEGIN{RS="-j|--jobs="} NR==2 {print $1}' <<< $MAKEFLAGS)
|
|
test -n "$JOBS" && export JOBS="-j $JOBS"
|
|
|
|
ninja $JOBS -C out/Release chrome chrome_sandbox
|
|
|
|
install -m 0755 -D out/Release/chrome $PKG/usr/lib/$name/$name
|
|
install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/$name/chrome-sandbox
|
|
install -m 0644 -D out/Release/*.pak $PKG/usr/lib/$name
|
|
install -d $PKG/usr/lib/$name/locales
|
|
install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/$name/locales
|
|
cp -a out/Release/resources $PKG/usr/lib/$name
|
|
install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1
|
|
|
|
# fix v8 natives
|
|
cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
|
|
|
|
for size in 22 24 48 128 256; do
|
|
install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \
|
|
$PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
|
|
done
|
|
|
|
# fix icu installation
|
|
cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
|
|
|
|
install -d $PKG/usr/share/pixmaps
|
|
ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
|
|
install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
|
|
install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
|
|
}
|