X-Git-Url: http://gitweb/?a=blobdiff_plain;f=chromium%2FPkgfile;h=e5c286c2d6fb653684c8ea797b542352ad1b4e05;hb=a35dd6c00dfc4a48f2c99a37d840e770b3f84599;hp=1fc5fa7c3c3fae2f9e541d84340370fe927a1d27;hpb=e7d1d63fd3021a3795d14d97c76dc43d4e9c8dbe;p=ports%2Fopt-arm.git diff --git a/chromium/Pkgfile b/chromium/Pkgfile index 1fc5fa7..e5c286c 100644 --- a/chromium/Pkgfile +++ b/chromium/Pkgfile @@ -3,29 +3,36 @@ # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu # Maintainer: Jose V Beneyto, sepen at crux dot nu # Packager: Tadeusz Sosnierz, tadzikes gmail com -# Depends on: dbus-glib gtk libevent nss xorg-libxscrnsaver xorg-libxtst libgcrypt xorg-libxdamage xorg-libxt gperf speech-dispatcher +# Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm name=chromium -version=31.0.1650.57 +version=64.0.3282.119 release=1 -source=(http://commondatastorage.googleapis.com/chromium-browser-official/$name-$version.tar.xz \ - $name.sh icu-native-arm.patch ffmpeg-native-arm.patch) +source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz + chromium-build-toolchain.patch + last-commit-position.patch $name.sh + chromium-64.0.3282.119-constexpr-1.patch + chromium-exclude_unwind_tables.patch + chromium-use-fromUTF8-for-UnicodeString-construction.patch + chromium-omnibox-unescape-fragment.patch + chromium-skia-harmony.patch + chromium-memcpy-r0.patch + chromium-clang-r2.patch + chromium-cups-r0.patch) build() { cd $name-$version - # avoid 32-bit flags (g++: error: unrecognized command line option '-m32') - patch -p1 -i $SRC/icu-native-arm.patch - # https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/8a08a6d1dea934cf6507693a7f5285241b5c435b - patch -p1 -i $SRC/ffmpeg-native-arm.patch + if [ -n "$(pkginfo -i | grep '^ccache ')" ]; then + # Avoid falling back to preprocessor mode when sources contain time macros + export CCACHE_SLOPPINESS=time_macros + fi - # fix for speech-dispatcher >= 0.8 - sed -e 's|<<(libspeechd_h_prefix)libspeechd.h>||' \ - -i build/linux/system.gyp + export CFLAGS="-O2 -pipe -mfloat-abi=hard" - export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)" + export CFLAGS="$CFLAGS $(pkg-config --cflags nspr) -lpthread" export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)" - + # determine some flags depending on SOC USE_ARMV7=0; USE_ARM_THUMB=0; USE_ARM_NEON=0 case $(uname -m) in @@ -37,65 +44,110 @@ build() { esac done - build/gyp_chromium -f make build/all.gyp --depth=. \ - -Dtarget_arch=arm \ - -Darm_float_abi=hard \ - -Darmv7=$USE_ARMV7 \ - -Darm_thumb=$USE_ARM_THUMB \ - -Darm_neon=$USE_ARM_NEON \ - -Dv8_target_arch=arm \ - -Dv8_use_arm_eabi_hardfloat=1 \ - -Dsysroot= \ - -Dno_strict_aliasing=1 \ - -Dwerror= \ - -Dlinux_sandbox_path=/usr/lib/chromium/chrome-sandbox \ - -Dlinux_strip_binary=1 \ - -Dlinux_use_gold_binary=0 \ - -Dlinux_use_gold_flags=0 \ - -Dlinux_use_tmalloc=0 \ - -Drelease_extra_cflags="$CFLAGS" \ - -Dproprietary_codecs=1 \ - -Dffmpeg_branding=Chrome \ - -Duse_system_libjpeg=1 \ - -Duse_system_libxslt=1 \ - -Duse_system_libxml=1 \ - -Duse_system_bzip2=1 \ - -Duse_system_zlib=0 \ - -Duse_system_libpng=0 \ - -Duse_system_ffmpeg=0 \ - -Duse_system_yasm=0 \ - -Duse_system_libevent=1 \ - -Duse_system_sqlite=0 \ - -Dremove_webcore_debug_symbols=1 \ - -Duse_gconf=0 \ - -Duse_cups=0 \ - -Duse_gnome_keyring=0 \ - -Duse_kerberos=0 \ - -Duse_pulseaudio=0 \ - -Dlinux_link_gnome_keyring=0 \ - -Dlinux_link_libpci=1 \ - -Dlinux_link_libspeechd=1 \ - -Denable_webrtc=1 \ - -Ddisable_nacl=1 - - # fix issue with nspr libs - sed -e "s|LIBS := |LIBS := $LDFLAGS |" -i chrome/chrome.target.mk - - make V=1 chrome chrome_sandbox BUILDTYPE=Release - - install -m 0755 -D out/Release/chrome $PKG/usr/lib/chromium/chromium - install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/chromium/chrome-sandbox - install -m 0644 -D out/Release/*.pak $PKG/usr/lib/chromium - install -m 0755 -D out/Release/libffmpegsumo.so $PKG/usr/lib/chromium - install -d $PKG/usr/lib/chromium/locales - install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/chromium/locales - cp -a out/Release/resources $PKG/usr/lib/chromium - install -m 0644 -D out/Release/chrome.1 $PKG/usr/man/man1/chromium.1 - - for size in 22 24 48 128 256; do - install -m 0644 -D chrome/app/theme/chromium/product_logo_${size}.png \ - $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png + # we don't use git sources + patch -p1 -i $SRC/last-commit-position.patch + + # Corrects error call to non-constexpr function + patch -p1 -i $SRC/chromium-64.0.3282.119-constexpr-1.patch + + wget https://chromium.googlesource.com/chromium/src.git/+/$version?format=TEXT -O ../chromium-$version.txt + # https://crbug.com/710701 + local _chrome_build_hash=$(base64 -d ../chromium-$version.txt | + grep -Po '^parent \K[0-9a-f]{40}$') + if [[ -z $_chrome_build_hash ]]; then + error "Unable to find Chrome build hash." + return 1 + fi + echo "LASTCHANGE=$_chrome_build_hash-" >build/util/LASTCHANGE + + # https://chromium-review.googlesource.com/c/chromium/src/+/712575 + patch -p1 -i $SRC/chromium-exclude_unwind_tables.patch + + # https://crbug.com/772655 + patch -p1 -i $SRC/chromium-use-fromUTF8-for-UnicodeString-construction.patch + + # https://crbug.com/789163 + patch -p1 -i $SRC/chromium-omnibox-unescape-fragment.patch + + # https://crbug.com/skia/6663#c10 + patch -p4 -i $SRC/chromium-skia-harmony.patch + + # Fixes from Gentoo + patch -p1 -i $SRC/chromium-memcpy-r0.patch + patch -p1 -i $SRC/chromium-clang-r2.patch + patch -p1 -i $SRC/chromium-cups-r0.patch + + mkdir -p third_party/node/linux/node-linux-x64/bin + ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ + + # Let's fix the toolchain + patch -p0 -i $SRC/$name-build-toolchain.patch + + _gn_args=( + 'blink_gc_plugin=false' + 'clang_use_chrome_plugins=false' + 'enable_hangout_services_extension=true' + 'enable_nacl=false' + 'enable_swiftshader=false' + 'fatal_linker_warnings=false' + 'ffmpeg_branding="Chrome"' + 'is_clang=false' + 'is_debug=false' + 'linux_use_bundled_binutils=false' + 'use_custom_libcxx=false' + '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_gtk3=true' + 'use_kerberos=false' + 'use_pulseaudio=false' + 'use_sysroot=false' + ) + + /usr/bin/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 + + ninja -j ${JOBS-1} -C out/Release chrome chrome_sandbox + + 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 + + install -m 0644 -D chrome/installer/linux/common/desktop.template $PKG/usr/share/applications/$name.desktop + install -m 0644 -D chrome/app/resources/manpage.1.in $PKG/usr/share/man/man1/$name.1 + + sed -i \ + -e "s/@@MENUNAME@@/Chromium/g" \ + -e "s/@@PACKAGE@@/chromium/g" \ + -e "s/@@USR_BIN_SYMLINK_NAME@@/chromium/g" \ + $PKG/usr/share/applications/$name.desktop \ + $PKG/usr/share/man/man1/$name.1 + + # fix v8 natives + cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name + + for size in 16 32; do + install -m 0644 -D chrome/app/theme/default_100_percent/$name/product_logo_${size}.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png + done + + for size in 22 24 48 64 128 256; do + install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \ + $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png done - install -m 0755 -D $SRC/chromium.sh $PKG/usr/bin/chromium + # fix icu installation + install -m 0644 -D out/Release/icudtl.dat $PKG/usr/lib/$name/icudtl.dat + + install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name + }