2011-07-12 15:24:48 +02:00
|
|
|
# Description: Open source version of Google Chrome web browser.
|
|
|
|
# URL: http://chromium.org/
|
2017-10-28 14:08:49 +02:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2017-06-17 13:16:20 +02:00
|
|
|
# Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm
|
2011-07-12 15:24:48 +02:00
|
|
|
|
|
|
|
name=chromium
|
2017-10-28 14:08:49 +02:00
|
|
|
version=62.0.3202.75
|
2015-04-01 09:27:45 +02:00
|
|
|
release=1
|
2017-07-27 13:55:18 +02:00
|
|
|
source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz
|
2017-09-07 08:42:50 +02:00
|
|
|
last-commit-position.patch $name.sh $name.desktop
|
|
|
|
breakpad-use-ucontext_t.patch
|
2017-10-28 14:08:49 +02:00
|
|
|
chromium-gn-bootstrap-r17.patch
|
|
|
|
crc32c-string-view-check.patch)
|
2011-07-12 15:24:48 +02:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $name-$version
|
2014-05-06 09:31:50 +02:00
|
|
|
|
2011-07-12 15:24:48 +02:00
|
|
|
export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
|
2012-06-19 21:45:42 +02:00
|
|
|
export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
|
2011-07-12 15:24:48 +02:00
|
|
|
|
2016-11-14 18:24:12 +01:00
|
|
|
# we don't use git sources
|
|
|
|
patch -p1 -i $SRC/last-commit-position.patch
|
|
|
|
|
2017-10-28 14:08:49 +02:00
|
|
|
# Fix incorrect inclusion of <string_view> in modes other than >= C++17
|
|
|
|
patch -p1 -d third_party/crc32c/src -i $SRC/crc32c-string-view-check.patch
|
2017-07-27 13:55:18 +02:00
|
|
|
|
2017-09-07 08:42:50 +02:00
|
|
|
# Fix build with glibc 2.26
|
2017-09-07 09:25:52 +02:00
|
|
|
patch -p1 -i $SRC/breakpad-use-ucontext_t.patch
|
2017-07-27 13:55:18 +02:00
|
|
|
|
|
|
|
# Fixes from Gentoo
|
2017-10-28 14:08:49 +02:00
|
|
|
patch -p1 -i $SRC/chromium-gn-bootstrap-r17.patch
|
2017-06-17 13:16:20 +02:00
|
|
|
|
|
|
|
mkdir -p third_party/node/linux/node-linux-x64/bin
|
|
|
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
|
|
|
|
|
2016-11-14 18:24:12 +01:00
|
|
|
_gn_args=(
|
|
|
|
'blink_gc_plugin=false'
|
|
|
|
'clang_use_chrome_plugins=false'
|
|
|
|
'enable_hangout_services_extension=true'
|
|
|
|
'enable_nacl=false'
|
2017-07-27 13:55:18 +02:00
|
|
|
'enable_swiftshader=false'
|
2016-11-14 18:24:12 +01:00
|
|
|
'fatal_linker_warnings=false'
|
|
|
|
'ffmpeg_branding="Chrome"'
|
|
|
|
'is_clang=false'
|
|
|
|
'is_debug=false'
|
|
|
|
'linux_use_bundled_binutils=false'
|
2017-09-07 08:42:50 +02:00
|
|
|
'use_custom_libcxx=false'
|
2016-11-14 18:24:12 +01:00
|
|
|
'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
|
2011-07-12 15:24:48 +02:00
|
|
|
|
2017-10-28 14:08:49 +02:00
|
|
|
ninja -j ${JOBS-1} -C out/Release chrome chrome_sandbox
|
2011-07-12 15:24:48 +02:00
|
|
|
|
2015-03-04 12:46:54 +01:00
|
|
|
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
|
2016-04-11 12:40:39 +02:00
|
|
|
install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1
|
2011-07-12 15:24:48 +02:00
|
|
|
|
2015-03-15 17:33:50 +01:00
|
|
|
# fix v8 natives
|
|
|
|
cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
|
|
|
|
|
2012-08-21 08:31:28 +02:00
|
|
|
for size in 22 24 48 128 256; do
|
2016-07-26 12:03:04 +02:00
|
|
|
install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \
|
2015-03-04 12:46:54 +01:00
|
|
|
$PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
|
2011-07-12 15:24:48 +02:00
|
|
|
done
|
|
|
|
|
2016-05-02 16:48:24 +02:00
|
|
|
# fix icu installation
|
|
|
|
cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
|
|
|
|
|
2015-03-04 12:46:54 +01:00
|
|
|
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
|
2011-07-12 15:24:48 +02:00
|
|
|
}
|