diff options
Diffstat (limited to 'chromium-dev/build/chromium-dev.SlackBuild')
-rwxr-xr-x | chromium-dev/build/chromium-dev.SlackBuild | 84 |
1 files changed, 55 insertions, 29 deletions
diff --git a/chromium-dev/build/chromium-dev.SlackBuild b/chromium-dev/build/chromium-dev.SlackBuild index 88920180..2360a16a 100755 --- a/chromium-dev/build/chromium-dev.SlackBuild +++ b/chromium-dev/build/chromium-dev.SlackBuild @@ -55,6 +55,9 @@ # 43.0.2327.5-1: # 10/mar/2015 by Eric Hameleers <alien@slackware.com> # * Update. +# 44.0.2398.0-1: +# 14/may/2015 by Eric Hameleers <alien@slackware.com> +# * 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 . @@ -65,11 +68,22 @@ SRCNAM=chromium SRCEXT=${SRCEXT:-"-dev"} PRGNAM=${SRCNAM}${SRCEXT} # chromium or chromium-dev -VERSION=${VERSION:-43.0.2327.5} +VERSION=${VERSION:-44.0.2398.0} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} +# Differentiate between stable and development releases: +if [ "x$SRCEXT" = "x-dev" ]; then + RPMCHAN="unstable" + CRFLAGS="CHROMIUM_DEV_FLAGS" + CRUSERFLAGS="CHROMIUM_DEV_USER_FLAGS" +else + RPMCHAN="stable" + CRFLAGS="CHROMIUM_FLAGS" + CRUSERFLAGS="CHROMIUM_USER_FLAGS" +fi + # You can build without NaCl (native client) if you set USE_NACL to "0", # but you'll lose some Chrome functionality like using in-browser applications: USE_NACL=${USE_NACL:-1} @@ -86,10 +100,8 @@ USE_CDM=${USE_CDM:-1} # 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="43.0.2327.5" +WIDEVINE_VERSION="1.4.8.823" # CHROME_VERSION="44.0.2398.0" DOCS="AUTHORS DEPS LICENSE README*" @@ -249,6 +261,8 @@ done if [ "$P1" == "--download" ]; then echo "Download complete." + [ "x$SRCEXT" = "x-dev" ] && BINTREE="-unstable" || BINTREE="" + echo "Widevine version in Chrome $VERSION: $(rpm2cpio ${SOURCE[1]} | cpio --to-stdout -i ./opt/google/chrome${BINTREE}/chrome 2>&1 | strings | grep -C 1 ' (version:' | tail -1)" exit 0 fi @@ -265,9 +279,8 @@ cd ${SRCNAM}-${VERSION} # Patches: touch $OUTPUT/patch-${PRGNAM}.log -# Prevent crashes when accessing google.com and youtube.com just because -# this is not an official build: -cat $SRCDIR/patches/chromium_secure_referrer.patch | patch -p1 --verbose \ +# Enable VAAPI hardware decoding on Linux platform: +cat $SRCDIR/patches/chromium_vaapi.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log if [ "$ARCH" != "x86_64" ]; then @@ -281,21 +294,12 @@ if [ $USE_CDM -eq 1 ]; then # 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 \ - 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log - 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 .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 + # Also note that it is no longer required to extract the Widevine CDM from + # the chrome RPM in order to compile the adapter library. We do it anyway, + # but only to determine the version of the Widevine library. + # To compile, we just add one #define - see https://crbug.com/473866 + sed '14i#define WIDEVINE_CDM_VERSION_STRING "'$WIDEVINE_VERSION'"' \ + -i third_party/widevine/cdm/stub/widevine_cdm_version.h fi if [ "x$SRCEXT" = "x-dev" ]; then @@ -341,6 +345,7 @@ _chromium_conf=( -Ddisable_glibc=1 -Denable_pepper_cdms=1 -Denable_webrtc=1 + -Denable_widevine=1 -Dffmpeg_branding=Chrome -Dgoogle_api_key=$_google_api_key -Dgoogle_default_client_id=$_google_default_client_id @@ -405,7 +410,8 @@ build/linux/unbundle/replace_gyp_files.py "${_chromium_conf[@]}" \ build/gyp_chromium --depth=. "${_chromium_conf[@]}" \ 2>&1 | tee $OUTPUT/gyp-${PRGNAM}.log # Compile everything: -ninja $NUMJOBS -C out/Release chrome chrome_sandbox chromedriver +ninja $NUMJOBS -C out/Release \ + chrome chrome_sandbox chromedriver widevinecdmadapter clearkeycdm 2>&1 | tee $OUTPUT/ninja-${PRGNAM}.log # Manually install everything: @@ -438,9 +444,10 @@ if [ ${USE_NACL} -eq 1 ]; then $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ fi if [ $USE_CDM -eq 1 ]; then - # Widevine CDM adapter: + # Widevine and ClearKey CDM adapter: cp -a \ out/Release/libwidevinecdmadapter.so \ + out/Release/libclearkeycdm.so \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ fi @@ -453,9 +460,15 @@ if [ ${USE_NACL} -eq 1 ]; then strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/nacl_helper{,_bootstrap,_nonsfi} fi +if [ ${USE_CDM} -eq 1 ]; then + strip --strip-unneeded \ + $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib{widevinecdmadapter,clearkeycdm}.so +fi # Add locales: cp -a out/Release/locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ +cp -a out/Release/pseudo_locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ +ln -s locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/remoting_locales # Add resource files: cp -a out/Release/resources $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ @@ -468,7 +481,13 @@ cp -a third_party/icu/source/data/in/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/${PR # Install a wrapper script: install -D -m0755 $SRCDIR/${PRGNAM}.sh $PKG/usr/bin/${PRGNAM} -sed -i -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" $PKG/usr/bin/${PRGNAM} +sed \ + -e "s/@PRGNAM@/${SRCNAM}${SRCEXT}/g" \ + -e "s/@SRCEXT@/${SRCEXT}/g" \ + -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \ + -e "s/@CRFLAGS@/${CRFLAGS}/g" \ + -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \ + -i $PKG/usr/bin/${PRGNAM} # Make the chromedriver available in the $PATH : ln -s ../lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver $PKG/usr/bin/chromedriver${SRCEXT} @@ -489,9 +508,16 @@ done install -D -m0644 \ $SRCDIR/${PRGNAM}.desktop $PKG/usr/share/applications/${PRGNAM}.desktop -# Move the 'default' file into place, -# this allows users to override command-line options: -install -D -m0644 $SRCDIR/${PRGNAM}.default $PKG/etc/default/${PRGNAM}.new +# Move the 'default' file into place. +# This allows users to override command-line options: +install -D -m0644 $SRCDIR/${PRGNAM}.default $PKG/etc/${PRGNAM}/00-default.conf.new +cat $SRCDIR/${PRGNAM}.default | sed \ + -e "s/@PRGNAM@/${PRGNAM}/g" \ + -e "s/@SRCEXT@/${SRCEXT}/g" \ + -e "s/@CRFLAGS@/${CRFLAGS}/g" \ + -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \ + -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \ + > $PKG/etc/${PRGNAM}/00-default.conf.new # Add this to the doinst.sh: mkdir -p $PKG/install @@ -512,7 +538,7 @@ config() { done } -config etc/default/${PRGNAM}.new +config etc/${PRGNAM}/00-default.conf.new # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then |