mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-02-04 01:07:16 +08:00
chromium: try to build Chromium 54
This commit is contained in:
parent
423d57792b
commit
e7cedea10e
@ -1,41 +1,55 @@
|
||||
# Contributions from Arch:
|
||||
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
# Contributor: Pierre Schmitz <pierre@archlinux.de>
|
||||
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
|
||||
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
|
||||
|
||||
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
|
||||
# Keys are the names in the above script; values are the dependencies in Chakra
|
||||
declare -rgA _system_libs=(
|
||||
[flac]=flac
|
||||
[harfbuzz-ng]=harfbuzz-icu
|
||||
[libjpeg]=libjpeg
|
||||
[libpng]=libpng
|
||||
[libvpx]=libvpx
|
||||
[libwebp]=libwebp
|
||||
#[libxml]=libxml2 # https://bugs.archlinux.org/task/29939
|
||||
[libxslt]=libxslt
|
||||
[snappy]=snappy
|
||||
[yasm]=
|
||||
#[zlib]=zlib # Error during build
|
||||
)
|
||||
|
||||
pkgname=chromium
|
||||
pkgver=54.0.2840.71
|
||||
pkgrel=1
|
||||
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser. Include PepperFlash and libpdf plugins"
|
||||
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
|
||||
arch=('x86_64')
|
||||
url="https://www.chromium.org/Home"
|
||||
license=('BSD')
|
||||
depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'bzip2' 'libevent' 'libxss' 'libgcrypt'
|
||||
'ttf-dejavu' 'dbus' 'desktop-file-utils' 'hicolor-icon-theme' 'systemd' 'speech-dispatcher'
|
||||
'flac' 'opus' 'libxml2' 'libpulse' 'zlib' 'harfbuzz' 'glib2' 'libexif' 'libxslt'
|
||||
'libvpx' 'snappy' 'perl' 'cups')
|
||||
makedepends=('python2' 'gperf' 'yasm' 'mesa' 'elfutils' 'ninja')
|
||||
optdepends=('pepperflashplugin: Pepper Flash plugin')
|
||||
install=chromium.install
|
||||
#backup=('etc/chromium/default') #not really needed beacuse we want to provide on chromium.default the pepperflash plugin, I keep it here as comment
|
||||
source=(http://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${pkgver}.tar.xz
|
||||
license.html::http://www.google.com/chrome/intl/en/eula_text.html
|
||||
depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libexif' 'libgcrypt'
|
||||
'ttf-font' 'systemd' 'dbus' 'libpulse' 'perl' 'perl-file-basedir'
|
||||
'pciutils' 'desktop-file-utils' 'hicolor-icon-theme')
|
||||
depends+=(${_system_libs[@]})
|
||||
makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja')
|
||||
optdepends=('kwallet: for storing passwords in KWallet')
|
||||
#install=chromium.install # Do we really need this?
|
||||
source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
|
||||
chromium.desktop
|
||||
chromium.sh
|
||||
chromium.default
|
||||
chromium-52.0.2743.116-unset-madv_free.patch
|
||||
chromium-53.0.2785.92-last-commit-position.patch
|
||||
chromium-widevine.patch
|
||||
template_url_prepopulate_data.diff
|
||||
search_engine_type.diff
|
||||
prepopulated_engines_json.diff
|
||||
chromium-widevine.patch
|
||||
chromium-52.0.2743.116-unset-madv_free.patch
|
||||
chromium-53.0.2785.92-last-commit-position.patch)
|
||||
|
||||
sha1sums=('db3bad5e61467cac415299838728a79f16333315'
|
||||
'9839044035b56b5dbeb9377e27a4ea0f5a1b94e2'
|
||||
'3ab45403f3e8ddfeeba6a5aee9f683d57883fb90'
|
||||
'19eff765ec1316f4ae057d48919b2fdd6b3a5bea'
|
||||
'51f172122f83825b64c58365620450865bbb879b'
|
||||
'4732e8b6b75ba10981ee6fa338960ce862dd8b1f'
|
||||
'abeb1e424b35bbca954a5afea39418a5e198ac64'
|
||||
'79fc829d740183d85fb147a3a44e572a8f304dbe'
|
||||
'1de76370c867a527c0449f5122331504abd9a1b5'
|
||||
'17ba326edbd5df0aba71958d9eea56ba9653c995'
|
||||
'd03e6465cd5a84580f9dad5d45f24ccd42bb71e6')
|
||||
prepopulated_engines_json.diff)
|
||||
sha256sums=('d202d3eb0b3a979ad0e6d0d0c4faa93222c5e5b664d88b9f3a0343899fe7dd7d'
|
||||
'1a748951cd48c549f64740b2568158a60f8675002ceb2635d98059abadc5b8d1'
|
||||
'3b3aa9e28f29e6f539ed1c7832e79463b13128863a02e9c6fecd16c30d61c227'
|
||||
'd3dc397956a26ec045e76c25c57a1fac5fc0acff94306b2a670daee7ba15709e'
|
||||
'd6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808'
|
||||
'ec932dc7d0d1ea5678d0eae19cfd0f27eeb69d6a8b776e7b56a3b0567feb4d80'
|
||||
'7783404b2123a1c3c301ba9ba84d48294f7658efe71c10ab3e254e2da5220dbf'
|
||||
'2b78e36cf1c45c2d5256f47af44cc00e67eeac1e7673a95f02d9468516ef7757')
|
||||
|
||||
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Note: These are for Chakra Linux use ONLY. For your own distribution, please
|
||||
@ -55,6 +69,12 @@ prepare() {
|
||||
patch -p1 -i "$srcdir/search_engine_type.diff"
|
||||
patch -p1 -i "$srcdir/prepopulated_engines_json.diff"
|
||||
|
||||
# Enable support for the Widevine CDM plugin
|
||||
# libwidevinecdm.so is not included, but can be copied over from Chrome
|
||||
# (Version string doesn't seem to matter so let's go with "Pinkie Pie")
|
||||
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
|
||||
patch -Np1
|
||||
|
||||
# Disable MADV_FREE (if set by glibc)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1361157
|
||||
patch -Np1 -i ../chromium-52.0.2743.116-unset-madv_free.patch
|
||||
@ -62,85 +82,79 @@ prepare() {
|
||||
# Disable last_commit_position as we don't build from git repository
|
||||
patch -Np1 -i ../chromium-53.0.2785.92-last-commit-position.patch
|
||||
|
||||
# Enable support for the Widevine CDM plugin
|
||||
# The actual libraries are not included, but can be copied over from Chrome:
|
||||
# libwidevinecdmadapter.so
|
||||
# libwidevinecdm.so
|
||||
# (Version string doesn't seem to matter so let's go with "Pinkie Pie")
|
||||
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
|
||||
patch -Np1
|
||||
# Work around bug in blink in which GCC 6 optimizes away null pointer checks
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833524
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68853#c2
|
||||
sed -i '/config("compiler")/ a cflags_cc = [ "-fno-delete-null-pointer-checks" ]' \
|
||||
build/config/linux/BUILD.gn
|
||||
|
||||
# Use Python 2
|
||||
find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
|
||||
|
||||
# There are still a lot of relative calls which need a workaround
|
||||
mkdir -p "$srcdir/python2-path"
|
||||
ln -sf /usr/bin/python2 "$srcdir/python2-path/python"
|
||||
|
||||
# Remove bundled libraries for which we will use the system copies; this
|
||||
# *should* do what the remove_bundled_libraries.py script does, with the
|
||||
# added benefit of not having to list all the remaining libraries
|
||||
local _lib
|
||||
for _lib in ${!_system_libs[@]} ${_system_libs[libjpeg]+libjpeg_turbo}; do
|
||||
find -type f -path "*third_party/$_lib/*" \
|
||||
\! -path "*third_party/$_lib/chromium/*" \
|
||||
\! -path "*third_party/$_lib/google/*" \
|
||||
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
||||
-delete
|
||||
done
|
||||
|
||||
python2 build/linux/unbundle/replace_gn_files.py \
|
||||
--system-libraries "${!_system_libs[@]}"
|
||||
|
||||
python2 third_party/libaddressinput/chromium/tools/update-strings.py
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
# CFLAGS are passed through release_extra_cflags below
|
||||
export -n CFLAGS CXXFLAGS
|
||||
export PATH="$srcdir/python2-path:$PATH"
|
||||
export TMPDIR="$srcdir/temp"
|
||||
mkdir -p "$TMPDIR"
|
||||
|
||||
# NOTE
|
||||
# -Dremove_webcore_debug_symbols=1 speed up the build by removing debug symbols for webkit
|
||||
local _flags=(
|
||||
'is_clang=false'
|
||||
'clang_use_chrome_plugins=false'
|
||||
'symbol_level=0'
|
||||
'is_debug=false'
|
||||
'fatal_linker_warnings=false'
|
||||
'treat_warnings_as_errors=false'
|
||||
'fieldtrial_testing_like_official_build=true'
|
||||
'remove_webcore_debug_symbols=true'
|
||||
'ffmpeg_branding="Chrome"'
|
||||
'proprietary_codecs=true'
|
||||
'link_pulseaudio=true'
|
||||
'linux_use_bundled_binutils=false'
|
||||
'use_allocator="none"'
|
||||
'use_cups=true'
|
||||
'use_gconf=false'
|
||||
'use_gnome_keyring=false'
|
||||
'use_gold=false'
|
||||
'use_gtk3=true'
|
||||
'use_kerberos=true'
|
||||
'use_mojo=false'
|
||||
'use_pulseaudio=true'
|
||||
'use_sysroot=false'
|
||||
'enable_hangout_services_extension=true'
|
||||
'enable_widevine=true'
|
||||
'enable_nacl=false'
|
||||
'enable_nacl_nonsfi=false'
|
||||
"google_api_key=\"${_google_api_key}\""
|
||||
"google_default_client_id=\"${_google_default_client_id}\""
|
||||
"google_default_client_secret=\"${_google_default_client_secret}\""
|
||||
)
|
||||
|
||||
local _chromium_conf=(
|
||||
-Dgoogle_api_key=$_google_api_key
|
||||
-Dgoogle_default_client_id=$_google_default_client_id
|
||||
-Dgoogle_default_client_secret=$_google_default_client_secret
|
||||
-Dwerror=
|
||||
-Dclang=0
|
||||
-Dclang_use_chrome_plugins=0
|
||||
-Dpython_ver=2.7
|
||||
-Dlinux_link_libpci=1
|
||||
-Dlinux_link_libspeechd=1
|
||||
-Dlinux_link_pulseaudio=1
|
||||
-Dlinux_strip_binary=1
|
||||
-Dlinux_use_bundled_binutils=0
|
||||
-Dlinux_use_bundled_gold=0
|
||||
-Dlinux_use_gold_flags=0
|
||||
-Dlogging_like_official_build=1
|
||||
-Dtracing_like_official_build=1
|
||||
-Dicu_use_data_file_flag=1
|
||||
-Dfieldtrial_testing_like_official_build=1
|
||||
-Drelease_extra_cflags="$CFLAGS"
|
||||
-Dlibspeechd_h_prefix=speech-dispatcher/
|
||||
-Dffmpeg_branding=Chrome
|
||||
-Dproprietary_codecs=1
|
||||
-Dremove_webcore_debug_symbols=1
|
||||
-Duse_system_bzip2=1
|
||||
-Duse_system_flac=1
|
||||
-Duse_system_ffmpeg=0
|
||||
-Duse_system_harfbuzz=1
|
||||
-Duse_system_icu=0
|
||||
-Duse_system_libevent=1
|
||||
-Duse_system_libjpeg=1
|
||||
-Duse_system_libpng=1
|
||||
-Duse_system_libvpx=1
|
||||
-Duse_system_libxml=1
|
||||
-Duse_system_opus=1
|
||||
-Duse_system_snappy=1
|
||||
-Duse_system_ssl=0
|
||||
-Duse_system_xdg_utils=1
|
||||
-Duse_system_yasm=1
|
||||
-Duse_system_zlib=0
|
||||
-Duse_system_v8=0
|
||||
-Duse_mojo=0
|
||||
-Duse_cups=1
|
||||
-Duse_gconf=0
|
||||
-Duse_gtk3=1
|
||||
-Duse_kerberos=1
|
||||
-Duse_gnome_keyring=0
|
||||
-Duse_sysroot=0
|
||||
-Dtarget_arch=x64
|
||||
-Dffmpeg_target_arch=x64
|
||||
-Denable_hangout_services_extension=1
|
||||
-Denable_widevine=1
|
||||
-Ddisable_nacl=1
|
||||
-Ddisable_glibc=1
|
||||
-Ddisable_pnacl=1
|
||||
-Ddisable_newlib_untar=0
|
||||
-Ddisable_fatal_linker_warnings=1
|
||||
-Ddisable_sse2=1)
|
||||
|
||||
build/linux/unbundle/replace_gyp_files.py "${_chromium_conf[@]}"
|
||||
build/gyp_chromium build/all.gyp --depth=. "${_chromium_conf[@]}"
|
||||
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args "${_flags[*]}"
|
||||
out/Release/gn gen out/Release --args="${_flags[*]}" \
|
||||
--script-executable=/usr/bin/python2
|
||||
|
||||
ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter
|
||||
}
|
||||
@ -148,32 +162,23 @@ build() {
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
install -D out/Release/chrome ${pkgdir}/usr/lib/chromium/chromium
|
||||
|
||||
install -Dm4755 -o root -g root out/Release/chrome_sandbox \
|
||||
"$pkgdir/usr/lib/chromium/chrome-sandbox"
|
||||
|
||||
install -D out/Release/chromedriver "$pkgdir/usr/lib/chromium/chromedriver"
|
||||
|
||||
cp out/Release/{*.pak,*.bin,nacl_helper{,_bootstrap}} \
|
||||
out/Release/nacl_irt_*.nexe \
|
||||
"$pkgdir/usr/lib/chromium/"
|
||||
|
||||
cp out/Release/{*.pak,*.bin,libwidevinecdmadapter.so} \
|
||||
"$pkgdir/usr/lib/chromium/"
|
||||
|
||||
# override command-line options
|
||||
install -Dm644 "$srcdir/chromium.default" "$pkgdir/etc/chromium/default"
|
||||
|
||||
cp -a out/Release/locales out/Release/icudtl.dat "$pkgdir/usr/lib/chromium/"
|
||||
|
||||
find "$pkgdir/usr/lib/chromium/" -name '*.d' -type f -delete
|
||||
|
||||
install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
|
||||
install -Dm644 out/Release/chrome.1 "$pkgdir/usr/share/man/man1/chromium.1"
|
||||
|
||||
install -Dm644 "$srcdir/chromium.desktop" \
|
||||
"$pkgdir/usr/share/applications/chromium.desktop"
|
||||
|
||||
install -Dm4755 out/Release/chrome_sandbox \
|
||||
"$pkgdir/usr/lib/chromium/chrome-sandbox"
|
||||
|
||||
cp -a out/Release/{*.pak,*.bin,chromedriver,libwidevinecdmadapter.so,icudtl.dat} \
|
||||
out/Release/locales \
|
||||
out/Release/gen/content/content_resources.pak \
|
||||
"$pkgdir/usr/lib/chromium/"
|
||||
|
||||
install -D "$srcdir/chromium.sh" "$pkgdir/usr/bin/chromium"
|
||||
|
||||
ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
|
||||
|
||||
for size in 22 24 48 64 128 256; do
|
||||
install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
|
||||
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
||||
@ -184,11 +189,5 @@ package() {
|
||||
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
||||
done
|
||||
|
||||
install -D "$srcdir/chromium.sh" "$pkgdir/usr/bin/chromium"
|
||||
|
||||
ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
|
||||
|
||||
install -Dm644 out/Release/icudtl.dat "${pkgdir}/usr/lib/chromium/icudtl.dat"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user