From f94756908fca20fe007426670df58ebffafc4d6a Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 1 Nov 2017 14:05:58 +0000 Subject: chromium-dev: updated to 64.0.3251.0 --- chromium-dev/build/chromium-dev.SlackBuild | 425 +++++++++++++++++++---------- 1 file changed, 281 insertions(+), 144 deletions(-) (limited to 'chromium-dev') diff --git a/chromium-dev/build/chromium-dev.SlackBuild b/chromium-dev/build/chromium-dev.SlackBuild index 79fa0666..e55f5f05 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, 2015 Eric Hameleers, Eindhoven, NL +# Copyright 2013, 2014, 2015, 2017 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -31,7 +31,10 @@ # URL: http://www.chromium.org/ # Build needs: - multilib gcc & glibc for compiling the Native Client (64-bit); # - libelf with '-D_FILE_OFFSET_BITS=64' added to CFLAGS (32-bit); -# - ninja. +# - libtinfo (provides symlinks required by downloaded clang); +# - ninja; +# - nodejs; +# - gcc >= 5.4.0 unless you compile using clang # - Internet access (for downloading the nacl/pnacl toolchain bins) # Needs: # Changelog: @@ -70,6 +73,9 @@ # 49.0.2593.0-1: # 26/dec/2015 by Eric Hameleers # * Update. +# 64.0.3251.0-1: +# 31/oct/2017 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 . @@ -80,34 +86,42 @@ SRCNAM=chromium SRCEXT=${SRCEXT:-"-dev"} # "-dev" = development build; "" = stable build PRGNAM=${SRCNAM}${SRCEXT} # chromium or chromium-dev -VERSION=${VERSION:-49.0.2593.0} +VERSION=${VERSION:-64.0.3251.0} BUILD=${BUILD:-1} 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" - BINTREE="-unstable" else - RPMCHAN="stable" CRFLAGS="CHROMIUM_FLAGS" CRUSERFLAGS="CHROMIUM_USER_FLAGS" - BINTREE="" +fi + +# If pulseaudio is installed we support it unless you explicitly disable it: +if /usr/bin/pkg-config --exists libpulse 2>/dev/null ; then + USE_PA=${USE_PA:-1} +else + USE_PA=${USE_PA:-0} fi # By default the ffmpeg library is built statically into the chromium binary. # You can also build a shared library libffmpeg.so (formerly libffmpegsumo.so): USE_FFMPEG=${USE_FFMPEG:-shared} # other option is "static" -# 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} +# You can build with NaCl (native client) if you set USE_NACL to "1", +# and gain some Chrome functionality like using in-browser applications. +# Note that NaCl is only supported on 64bit, and will be obsoleted in 2018 +# in favor of WebAssembly: +USE_NACL=${USE_NACL:-0} # Use the clang compiler. Results in faster build and smaller binaries. -# I default this to "off" because it is untested: -USE_CLANG=${USE_CLANG:-0} +# This default to "1" (on) because gcc support is getting stale +# and the gcc of Slackware 14.2 is already too old. +# This script will compile google's modified clang from source, so that 32bit +# can be supported (Google offers only 64bit pre-built clang for download0: +USE_CLANG=${USE_CLANG:-1} # If you don't want to enable support for Widevine CDM # (content decryption module) say "0" here. @@ -118,14 +132,7 @@ USE_CDM=${USE_CDM:-1} # Some people object to a download without consent so it is disabled by default: USE_HOTWORD=${USE_HOTWORD:-0} -# 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${BINTREE}/chrome 2>&1 | strings | grep -C 1 " (version:" | tail -1 -RPMSUB=${RPMSUB:-"-1"} -WIDEVINE_VERSION="1.4.8.824" # CHROME_VERSION="49.0.2593.0" - -DOCS="AUTHORS DEPS LICENSE README*" +DOCS="AUTHORS BUILD.gn CODE_OF_CONDUCT.md DEPS LICENSE* OWNERS WATCHLISTS README*" # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -179,7 +186,7 @@ fi MARCH=$( uname -m ) if [ -z "$ARCH" ]; then case "$MARCH" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; armv7hl) export ARCH=$MARCH ;; armv6hl) export ARCH=$MARCH ;; arm*) export ARCH=arm ;; @@ -189,36 +196,31 @@ if [ -z "$ARCH" ]; then fi case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" + i?86) SLKCFLAGS="-O2 -march=${ARCH} -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" ;; armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" 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 @@ -245,10 +247,8 @@ umask 0022 SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz" SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz" -if [ "$P1" == "--download" -a $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 +SOURCE[1]="$SRCDIR/widevine-version.txt" +SRCURL[1]="https://redirector.gvt1.com/edgedl/widevine-cdm/current.txt" # Create working directories: mkdir -p $OUTPUT # place for the package to be saved @@ -283,9 +283,6 @@ done if [ "$P1" == "--download" ]; then echo "Download complete." - if [ $USE_CDM -eq 1 ]; then - echo "Widevine version is: \"$(rpm2cpio ${SOURCE[1]} | cpio --to-stdout -i ./opt/google/chrome${BINTREE}/chrome 2>&1 | strings | grep -C 1 ' (version:' | tail -1)\" # CHROME_VERSION=\"$VERSION\"" - fi exit 0 fi @@ -295,6 +292,9 @@ echo "++" echo "|| $PRGNAM-$VERSION" echo "++" +# Find the version of Widevine: +WIDEVINE_VERSION="$(cat ${SOURCE[1]})" + cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xf ${SOURCE[0]} @@ -302,11 +302,61 @@ cd ${SRCNAM}-${VERSION} # Patches: touch $OUTPUT/patch-${PRGNAM}.log -# Enable VAAPI hardware decoding on Linux platform: -cat $SRCDIR/patches/chromium_vaapi.patch | patch -p1 --verbose \ +## Fix bootstrapping 'gn': +#cat $SRCDIR/patches/chromium-gn-bootstrap-r17.patch | patch -p1 --verbose \ +# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +# Fix compilation with gcc5: +cat $SRCDIR/patches/chromium_gcc5.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +## Fix compiling against glibc 2.26: +#cat $SRCDIR/patches/chromium_glibc226.patch | patch -p1 --verbose \ +# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +## Fix incorrect inclusion of in modes other than >= C++17 +#cat $SRCDIR/patches/crc32c-string-view-check.patch \ +# | patch -p1 --verbose -d third_party/crc32c/src \ +# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +# When compiling google's clang on 32bit Slackware use 'i586' in the triplet. +# I am a python noob so this is clumsy, better implementation is welcome :-) +cp $SRCDIR/patches/clang.toolchains.i586.triple.diff . +cat $SRCDIR/patches/chromium_32bit_triplet.patch | patch -p0 --verbose \ + 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +# Don't crap out when gzip does not support '--rsyncable' (Slackware < 14.2): +if ! gzip --help |grep -q rsyncable ; then + cat $SRCDIR/patches/chromium_no_rsyncable.patch | patch -p1 --verbose \ + 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +fi +## Enable VAAPI hardware decoding on Linux platform: +#cat $SRCDIR/patches/chromium_vaapi.patch | patch -p1 --verbose \ +# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log + +# Also needed for Slackware <= 14.2: +if [ $(LC_ALL=C gcc -dumpversion |cut -d. -f1) -eq 4 ]; then + cat $SRCDIR/patches/chromium56_gcc4.patch | patch -p1 --verbose \ + 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +fi + +# When compiling google's clang, use the system cmake +# (prebuilt binary from google is only available as 64bit): +sed -i tools/clang/scripts/update.py -e 's/^ *AddCMakeToPath/#&/' + +# This header file is missing, so we need to generate it; code found in the +# DEPS file https://chromium.googlesource.com/chromium/src/+/master/DEPS: +python2 build/util/lastchange.py \ + -m GPU_LISTS_VERSION --revision-id-only --header \ + gpu/config/gpu_lists_version.h + +# Explicitly use Python 2: +find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} + + +# The above does not solve every invocation of python: +mkdir -p $TMP/tmp-$PRGNAM/privatebin +ln -sf /usr/bin/python2 $TMP/tmp-$PRGNAM/privatebin/python -if [ "$ARCH" != "x86_64" ]; then +# Prevent a build failure (yes, 'x64' even on 32bit Slackware): +mkdir -p third_party/node/linux/node-linux-x64/bin +ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ + +if [ "$ARCH" != "x86_64" -a "$USE_NACL" != "0" ]; 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." @@ -317,9 +367,6 @@ 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. - # 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 @@ -327,25 +374,16 @@ fi 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}'")|' \ + sed -e 's|filename = "chromium-browser"|filename = "chromium-dev"|' \ + -e 's|confdir = "chromium|&-dev|' \ + -i chrome/BUILD.gn + sed -e 's|config_dir.Append("chromium|&-dev|' \ -i chrome/common/chrome_paths_linux.cc -fi - -if [ "$USE_CLANG" = "1" ]; then - # clang doesn't support this option yet: - sed -e '/-Wno-absolute-value/d' -i build/common.gypi - - # -Dclang=1 uses clang instead of gcc. - # -Dclang_use_chrome_plugins=1 fails with clang 3.5 - disable for now. - CLANG_OPTS=" -Dclang=1 -Dclang_use_chrome_plugins=0" - export CC="clang" - export CXX="clang++" -else - CLANG_OPTS=" -Dclang=0" + sed -e 's|/etc/chromium|&-dev|' \ + -e 's|/usr/share/chromium|&-dev|' \ + -i chrome/common/chrome_paths.cc + sed -e 's|/etc/chromium|&-dev|' \ + -i components/policy/tools/template_writers/writer_configuration.py fi chown -R root:root . @@ -353,97 +391,176 @@ chmod -R u+w,go+r-w,a+X-s . echo Building ... -if [ ${USE_NACL} -eq 1 ]; then - DNACL=0 -else - DNACL=1 -fi +[ ${USE_CLANG} -eq 1 ] && do_clang=true || do_clang=false +[ ${USE_CDM} -eq 1 ] && do_cdm=true || do_cdm=false +[ ${USE_HOTWORD} -eq 1 ] && do_hotword=true || do_hotword=false +[ ${USE_NACL} -eq 1 ] && do_nacl=true || do_nacl=false +[ ${USE_PA} -eq 1 ] && do_pa=true || do_pa=false export -n LDFLAGS="$SLKLDFLAGS" export -n CXXFLAGS="$SLKCFLAGS" export -n CFLAGS="$SLKCFLAGS -Wno-unused-local-typedefs" +export PATH="$TMP/tmp-$PRGNAM/privatebin:$PATH" _chromium_conf=( - ${CLANG_OPTS} - -Ddisable_glibc=1 - -Denable_hotwording=${USE_HOTWORD} - -Denable_pepper_cdms=1 - -Denable_webrtc=1 - -Denable_widevine=${USE_CDM} - -Dffmpeg_branding=Chrome - -Dffmpeg_component=${USE_FFMPEG}_library - -Dgoogle_api_key=$_google_api_key - -Dgoogle_default_client_id=$_google_default_client_id - -Dgoogle_default_client_secret=$_google_default_client_secret - -Dicu_use_data_file_flag=0 - -Dlinux_sandbox_path=/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_sandbox - -Dlinux_strip_binary=1 - -Dlinux_use_bundled_binutils=0 - -Dlinux_use_bundled_gold=0 - -Dlinux_use_gold_binary=0 - -Dlinux_use_gold_flags=0 - -Dlogging_like_official_build=1 - -Dproprietary_codecs=1 - -Dremove_webcore_debug_symbols=1 - -Dusb_ids_path=/usr/share/hwdata/usb.ids - -Duse_allocator=none - -Duse_gconf=0 - -Duse_kerberos=0 - -Duse_pulseaudio=0 - -Duse_sysroot=0 - -Duse_system_bzip2=1 - -Duse_system_flac=1 - -Duse_system_ffmpeg=0 - -Duse_system_harfbuzz=0 - -Duse_system_icu=0 - -Duse_system_libevent=1 - -Duse_system_libjpeg=0 - -Duse_system_libpng=0 - -Duse_system_libxml=0 - -Duse_system_libxslt=0 - -Duse_system_nspr=1 - -Duse_system_opus=0 - -Duse_system_snappy=0 - -Duse_system_openssl=1 - -Duse_system_xdg_utils=1 - -Duse_system_yasm=1 - -Duse_system_zlib=0 - -Dwerror= - -Drelease_extra_cflags="$CFLAGS" - -Dtarget_arch=${TARGETARCH} - -Ddisable_nacl=${DNACL} - -Ddisable_sse2=${DSSE} + "clang_use_chrome_plugins=${do_clang}" + 'enable_hangout_services_extension=true' + 'enable_hidpi=true' + "enable_hotwording=${do_hotword}" + 'enable_glibc=false' + "enable_nacl=${do_nacl}" + "enable_nacl_nonsfi=${do_nacl}" + 'enable_pepper_cdms=true' + 'enable_swiftshader=false' + 'enable_webrtc=true' + "enable_widevine=${do_cdm}" + 'exclude_unwind_tables=true' + 'fatal_linker_warnings=false' + 'ffmpeg_branding="Chrome"' + "ffmpeg_component=\"${USE_FFMPEG}_library\"" + 'fieldtrial_testing_like_official_build=true' + "google_api_key=\"$_google_api_key\"" + "google_default_client_id=\"$_google_default_client_id\"" + "google_default_client_secret=\"$_google_default_client_secret\"" + "is_clang=${do_clang}" + 'is_debug=false' + "linux_sandbox_path=\"/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_sandbox\"" + 'linux_strip_binary=true' + 'linux_use_bundled_binutils=false' + 'linux_use_bundled_gold=false' + 'linux_use_gold_binary=false' + 'linux_use_gold_flags=false' + 'logging_like_official_build=true' + 'proprietary_codecs=true' + 'remove_webcore_debug_symbols=true' + 'treat_warnings_as_errors=false' + "usb_ids_path=\"/usr/share/hwdata/usb.ids\"" + 'use_allocator="none"' + 'use_cups=true' + 'use_custom_libcxx=false' + 'use_gconf=false' + 'use_gio=false' + 'use_gold=false' + 'use_kerberos=false' + "use_pulseaudio=${do_pa}" + 'use_sysroot=false' ) - #-Dlinux_link_gsettings=1 - #-Dlinux_link_libpci=1 - #-Dlinux_link_pulseaudio=0 -# 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 sync --extract \ - 2>&1 | tee $OUTPUT/nacl_dl-${PRGNAM}.log -fi + # Change this back when CRBUG 592268 is fixed (error during final link: + # undefined reference to `base::i18n::GetRawIcuMemory()) + # See https://bugs.chromium.org/p/chromium/issues/detail?id=592268 + # icu_use_data_file_flag=false + +gn_system_libraries=( + # 'bzip2' + # 'ffmpeg' + 'flac' + # 'harfbuzz' + # 'icu' + # 'libevent' + # 'libjpeg' + # 'libpng' + # 'libxml' + # 'libxslt' + # 'opus' + # 'snappy' + 'yasm' + # 'zlib' + ) + +# Unbundle the libraries which we use from the system. +# (taken from Arch Linux:) +# This *should* do what the remove_bundled_libraries.py script does, +# with the added benefit of not having to list all the remaining libraries: +echo "-- Unbundling system libraries from $PRGNAM sources." +for ULIB in ${gn_system_libraries[@]}; do + find -type f -path "*third_party/$ULIB/*" \ + \! -path "*third_party/$ULIB/chromium/*" \ + \! -path "*third_party/$ULIB/google/*" \ + \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \ + -delete +done + +# Change bundled libraries to system ones: +echo "-- Change bundled to system libraries in $PRGNAM sources." +python2 build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]} # Do not make the build fail, see Chromium issue #386097: -third_party/libaddressinput/chromium/tools/update-strings.py \ +python2 third_party/libaddressinput/chromium/tools/update-strings.py \ 2>&1 | tee $OUTPUT/update_strings-${PRGNAM}.log +# Use usb.ids at run time instead of compiling it in: +sed -i device/usb/BUILD.gn \ + -e 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' + # Do not make the build fail, see https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion : touch chrome/test/data/webui/i18n_process_css_test.html -# Unbundle the libraries which we use from the system: -build/linux/unbundle/replace_gyp_files.py "${_chromium_conf[@]}" \ - 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log +# Do not make the build fail: +if [ ! -f chrome/test/data/webui_test_resources.grd ]; then +cat <chrome/test/data/webui_test_resources.grd + + + + + + + + + + + +EOF +fi + +# Download the NaCL toolchains: +if [ ${USE_NACL} -eq 1 ]; then + # We do not need arm_trusted on x86: + echo "-- Downloading NaCL toolchains." + python2 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract \ + 2>&1 | tee $OUTPUT/nacl_dl-${PRGNAM}.log +fi +# Download and compile google's clang sources if needed +# (clang is required for building NaCl): +if [ ${USE_CLANG} -eq 1 -o ${USE_NACL} -eq 1 ]; then + # Build clang from source instead of downloading: + echo "-- Building google's clang toolchain." + python2 tools/clang/scripts/update.py \ + --force-local-build --gcc-toolchain=/usr --without-android \ + 2>&1 | tee $OUTPUT/clang_build-${PRGNAM}.log +fi + # Generate the ninja build files: -build/gyp_chromium --depth=. "${_chromium_conf[@]}" \ +echo "-- Bootstrapping 'gn'." +python2 tools/gn/bootstrap/bootstrap.py \ + -v --gn-gen-args "${_chromium_conf[*]}" \ 2>&1 | tee $OUTPUT/gyp-${PRGNAM}.log +echo "-- Generating ninja build files." +out/Release/gn gen out/Release -v --args="${_chromium_conf[*]}" \ + 2>&1 | tee -a $OUTPUT/gyp-${PRGNAM}.log + # Compile everything: +echo "-- Compiling the lot." + +if [ "$USE_CLANG" = "1" ]; then + # clang_use_chrome_plugins=true fails with clang 3.5 - disable for now. + export CC="clang" + export CXX="clang++" +else + # Be careful not to override CC and CXX (may have been set by gcc5): + export CC=${CC:-"gcc"} + export CXX=${CXX:-"g++"} +fi +export AS=as +export AR=ar + +LC_ALL=C \ ninja -C out/Release \ pdf chrome chrome_sandbox chromedriver widevinecdmadapter clearkeycdm \ 2>&1 | tee $OUTPUT/ninja-${PRGNAM}.log # Manually install everything: +echo "-- Manually installing everything." # The main binary: install -D out/Release/chrome $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/${PRGNAM} @@ -513,17 +630,48 @@ 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}/ +# This step used to be done for us, now do it manaually too. +# This script's 'process_template' function is needed in order +# to generate man page and desktop file: +source $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/chrome/installer/linux/common/installer.include +PACKAGE=${PRGNAM} +PROGNAME=${PRGNAM} +MENUNAME="${PRGNAM^} Web Browser" +USR_BIN_SYMLINK_NAME=${PRGNAM} + # Install a man page: -install -D -m0644 out/Release/chrome.1 $PKG/usr/man/man1/${PRGNAM}.1 +process_template chrome/app/resources/manpage.1.in out/Release/${PRGNAM}.1 +install -D -m0644 out/Release/${PRGNAM}.1 $PKG/usr/man/man1/${PRGNAM}.1 + +# Add a desktop file: +process_template chrome/installer/linux/common/desktop.template \ + out/Release/${PRGNAM}.desktop +install -D -m0644 out/Release/${PRGNAM}.desktop \ + $PKG/usr/share/applications/${PRGNAM}.desktop + +# Install desktop icons: +for size in 16 32; do + install -D -m0644 \ + chrome/app/theme/default_100_percent/chromium/product_logo_$size.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png + ln -s ${PRGNAM}.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png +done +for size in 22 24 48 64 128 256; do + install -D -m0644 \ + chrome/app/theme/chromium/product_logo_$size.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png + ln -s ${PRGNAM}.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png +done # Without this file, chromium refuses to start: -cp -a third_party/icu/source/data/in/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ +cp -a out/Release/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ # Install a wrapper script: install -D -m0755 $SRCDIR/${PRGNAM}.sh $PKG/usr/bin/${PRGNAM} @@ -538,21 +686,8 @@ sed \ # Make the chromedriver available in the $PATH : ln -s ../lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver $PKG/usr/bin/chromedriver${SRCEXT} -# Install desktop icons: -for size in 16 32; do - install -D -m0644 \ - chrome/app/theme/default_100_percent/chromium/product_logo_$size.png \ - $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png -done -for size in 22 24 48 64 128 256; do - install -D -m0644 \ - chrome/app/theme/chromium/product_logo_$size.png \ - $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png -done - -# Add a desktop file: -install -D -m0644 \ - $SRCDIR/${PRGNAM}.desktop $PKG/usr/share/applications/${PRGNAM}.desktop +# xdg-utils looks for "chromium-browser" so symlink it to the wrapper: +ln -s ${PRGNAM} $PKG/usr/bin/chromium-browser${SRCEXT} # Move the 'default' file into place. # This allows users to override command-line options: @@ -608,6 +743,8 @@ EOINS # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/patches +cp -a $SRCDIR/patches/*.{diff,patch} $PKG/usr/doc/$PRGNAM-$VERSION/patches/ cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; -- cgit v1.2.3