From a2bd9c28366729e81b6edc13e71b3afe1d503d18 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 9 Mar 2015 20:45:33 +0000 Subject: chromium-dev: update to 42.0.2311.22 --- chromium-dev/build/chromium-dev.SlackBuild | 106 ++++++++++++++++++----------- 1 file changed, 66 insertions(+), 40 deletions(-) (limited to 'chromium-dev/build/chromium-dev.SlackBuild') diff --git a/chromium-dev/build/chromium-dev.SlackBuild b/chromium-dev/build/chromium-dev.SlackBuild index c3973b0f..d43ebe08 100755 --- a/chromium-dev/build/chromium-dev.SlackBuild +++ b/chromium-dev/build/chromium-dev.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2013, 2014 Eric Hameleers, Eindhoven, NL +# Copyright 2013, 2014, 2015 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -49,6 +49,9 @@ # 41.0.2251.0-1: # 31/dec/2014 by Eric Hameleers # * Update. +# 42.0.2311.22-1: +# 09/mar/2015 by Eric Hameleers +# * Update. # # Run 'sh chromium-dev.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -59,7 +62,7 @@ SRCNAM=chromium SRCEXT=${SRCEXT:-"-dev"} PRGNAM=${SRCNAM}${SRCEXT} # chromium or chromium-dev -VERSION=${VERSION:-41.0.2251.0} +VERSION=${VERSION:-42.0.2311.22} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} @@ -75,8 +78,15 @@ USE_CLANG=${USE_CLANG:-0} # If you don't want to enable support for Widevine CDM # (content decryption module) say "0" here. USE_CDM=${USE_CDM:-1} -WIDEVINE_VERSION="1.4.6.703" -CHROME_VERSION="39.0.2171.95" + +# Find the version of Widevine using this commandline on the chrome binary. +# Note that the chrome binary RPM needs to have the same version +# as our chromium sources: +# rpm2cpio ${SOURCE[1]} | cpio --to-stdout -i ./opt/google/chrome-unstable/chrome 2>&1 | strings | grep -C 1 " (version:" | tail -1 +# What is the Chrome version we extract this from? +[ "x$SRCEXT" = "x-dev" ] && RPMCHAN=${RPMCHAN:-"unstable"} || RPMCHAN=${RPMCHAN:-"stable"} +RPMSUB=${RPMSUB:-"-1"} +WIDEVINE_VERSION="1.4.7.796" # CHROME_VERSION="42.0.2311.22" DOCS="AUTHORS DEPS LICENSE README*" @@ -124,9 +134,6 @@ EOT sleep 10 fi -SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz" -SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz" - ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -148,11 +155,13 @@ case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" TARGETARCH="ia32" + RPMARCH="i386" DSSE="1" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" TARGETARCH="x64" + RPMARCH="x86_64" #DSSE="0" DSSE="1" ;; @@ -160,16 +169,22 @@ case "$ARCH" in SLKLDFLAGS=""; LIBDIRSUFFIX="" TARGETARCH="arm" DSSE="1" + # Widevine not supported (no binary library available): + USE_CDM=0 ;; armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard" SLKLDFLAGS=""; LIBDIRSUFFIX="" TARGETARCH="arm" DSSE="1" + # Widevine not supported (no binary library available): + USE_CDM=0 ;; *) SLKCFLAGS=${SLKCFLAGS:-"O2"} SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} TARGETARCH="ia32" DSSE="1" + # Widevine not supported by default: + USE_CDM=0 ;; esac @@ -178,6 +193,15 @@ case "$ARCH" in *) TARGET=$ARCH-slackware-linux ;; esac +# Source locations: +SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz" +SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz" + +if [ $USE_CDM -eq 1 ]; then + SOURCE[1]="$SRCDIR/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$RPMARCH.rpm" + SRCURL[1]="https://dl.google.com/linux/chrome/rpm/stable/$RPMARCH/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$RPMARCH.rpm" +fi + # Exit the script on errors: set -e trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR @@ -236,13 +260,6 @@ echo "Extracting the source archive(s) for $PRGNAM..." tar -xf ${SOURCE[0]} cd ${SRCNAM}-${VERSION} -if [ "$ARCH" != "x86_64" ]; then - # For now, disable NaCl except on x86_64 because the precompiled toolchain is - # only available for that architecture at the moment. - echo "** Not building NaCL - architecture '$ARCH' is currently unsupported." - USE_NACL=0 -fi - # Patches: touch $OUTPUT/patch-${PRGNAM}.log # Prevent crashes when accessing google.com and youtube.com just because @@ -250,8 +267,17 @@ touch $OUTPUT/patch-${PRGNAM}.log cat $SRCDIR/patches/chromium_secure_referrer.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +if [ "$ARCH" != "x86_64" ]; then + # For now, disable NaCl except on x86_64 because the precompiled toolchain is + # only available for that architecture at the moment. + echo "** Not building NaCL - architecture '$ARCH' is currently unsupported." + USE_NACL=0 +fi + if [ $USE_CDM -eq 1 ]; then - # Add support for widevine cdm to this build: + # Add support for widevine cdm to this build. + # Note that the resulting Slackware package will *not* include the + # proprietary Widevine CDM, only the adapter library which is built from OSS: cat $SRCDIR/patches/chromium_widevine.patch \ | sed -e "s/@WIDEVINE_VERSION@/$WIDEVINE_VERSION/" \ | patch -p1 --verbose \ @@ -259,24 +285,25 @@ if [ $USE_CDM -eq 1 ]; then mkdir -p third_party/widevine/cdm/linux/${TARGETARCH} cp third_party/widevine/cdm/widevine_cdm_*.h \ third_party/widevine/cdm/linux/${TARGETARCH}/ - ## Grab the Widevine CDM library from the Chrome .deb package: - ## Find the version of Widevine using this line: - ## strings /opt/google/chrome/chrome | grep -C 1 " (version:" | tail -1 - # - #ar p ${SOURCE[1]} data.tar.lzma |lzma -d |tar xv --strip-components=4 \ - # -C third_party/widevine/cdm/linux/${TARGETARCH}/ \ - # ./opt/google/chrome/libwidevinecdm.so - cp $SRCDIR/libwidevinecdm.so \ - third_party/widevine/cdm/linux/${TARGETARCH}/ + # Grab the Widevine CDM library from the Chrome .rpm package + # (the adapter library will be custom-built): + echo "Extracting libwidevinecdm.so from $(basename ${SOURCE[1]})" + [ "x$SRCEXT" = "x-dev" ] && CHROMEDIR="chrome-unstable" || CHROMEDIR="chrome" + rpm2cpio ${SOURCE[1]} \ + | cpio -i --to-stdout ./opt/google/${CHROMEDIR}/libwidevinecdm.so 2>/dev/null \ + > third_party/widevine/cdm/linux/${TARGETARCH}/libwidevinecdm.so + chmod 755 third_party/widevine/cdm/linux/${TARGETARCH}/libwidevinecdm.so fi -# Save configuration in ~/.config/chromium-dev": -sed -e "s|'filename': 'chromium-browser'|'filename': '${PRGNAM}'|" \ - -e "s|'confdir': 'chromium'|'confdir': '${PRGNAM}'|" \ - -i chrome/chrome_exe.gypi -sed -e 's|config_dir.Append("chromium")|config_dir.Append("'${PRGNAM}'")|' \ - -e 's|config_dir.Append("chrome-frame")|config_dir.Append("'chrome-frame$SRCEXT}'")|' \ - -i chrome/common/chrome_paths_linux.cc +if [ "x$SRCEXT" = "x-dev" ]; then + # Save configuration in ~/.config/chromium-dev": + sed -e "s|'filename': 'chromium-browser'|'filename': '${PRGNAM}'|" \ + -e "s|'confdir': 'chromium'|'confdir': '${PRGNAM}'|" \ + -i chrome/chrome_exe.gypi + sed -e 's|config_dir.Append("chromium")|config_dir.Append("'${PRGNAM}'")|' \ + -e 's|config_dir.Append("chrome-frame")|config_dir.Append("'chrome-frame$SRCEXT}'")|' \ + -i chrome/common/chrome_paths_linux.cc +fi if [ "$USE_CLANG" = "1" ]; then # clang doesn't support this option yet: @@ -360,7 +387,7 @@ _chromium_conf=( # Download the NaCL toolchains: if [ ${USE_NACL} -eq 1 ]; then # We do not need arm_trusted on x86: - build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator \ + build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract \ 2>&1 | tee $OUTPUT/nacl_dl-${PRGNAM}.log fi @@ -393,17 +420,19 @@ install -D out/Release/chromedriver $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome # Copy over the remaining binaries: cp -a \ - out/Release/{*.pak,libffmpegsumo.so,libpdf.so} \ - out/Release/{natives_blob.bin,snapshot_blob.bin} \ + out/Release/{*.pak,libffmpegsumo.so} \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ +if [ -f out/Release/natives_blob.bin ]; then + cp -a \ + out/Release/{natives_blob.bin,snapshot_blob.bin} \ + $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ +fi if [ ${USE_NACL} -eq 1 ]; then # Native Client files: cp -a \ out/Release/nacl_helper{,_bootstrap,_nonsfi} \ out/Release/nacl_irt_*.nexe \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ - # No longer built: - #out/Release/libppGoogleNaClPluginChrome.so \ fi if [ $USE_CDM -eq 1 ]; then # Widevine CDM adapter: @@ -416,13 +445,10 @@ fi strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/{${PRGNAM},chrome-sandbox} \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver \ - $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/libffmpegsumo.so \ - $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/libpdf.so + $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/libffmpegsumo.so if [ ${USE_NACL} -eq 1 ]; then strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/nacl_helper{,_bootstrap,_nonsfi} - # No longer built: - #$PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/libppGoogleNaClPluginChrome.so fi # Add locales: -- cgit v1.2.3-65-gdbad