CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
firefox: updated to 52.5.3
[ports/opt-arm.git] / chromium / Pkgfile
index 0bace6431a42a83ccd4796baab9a6e9f9a040ff0..c6a646850b87d40b9683f8919dab516d83b1ca0a 100644 (file)
@@ -3,23 +3,26 @@
 # 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 gperf gtk libevent libexif libgcrypt mesa3d ninja nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt xorg-libxtst yasm
+# Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm
 
 name=chromium
-version=53.0.2785.143
-
+version=62.0.3202.94
 release=1
-source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
-        $name.sh $name.desktop)
+source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz
+  chromium-build-toolchain.patch
+  last-commit-position.patch $name.sh $name.desktop
+  breakpad-use-ucontext_t.patch
+  chromium-gn-bootstrap-r17.patch
+  crc32c-string-view-check.patch)
 
 build() {
   cd $name-$version
 
-       touch chrome/test/data/webui/i18n_process_css_test.html
+  export CFLAGS="-O2 -pipe -mfloat-abi=hard"
 
   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
@@ -31,54 +34,60 @@ build() {
     esac
   done
 
-  build/gyp_chromium 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= \
-        -Dclang=0 \
-        -Dpython_ver="2.7" \
-        -Dno_strict_aliasing=1 \
-        -Dwerror= \
-        -Dlinux_sandbox_path=/usr/lib/$name/chrome-sandbox \
-        -Dlinux_strip_binary=1 \
-        -Dlinux_use_gold_binary=0 \
-        -Dlinux_use_gold_flags=0 \
-        -Drelease_extra_cflags="$CFLAGS" \
-        -Dproprietary_codecs=1 \
-        -Dffmpeg_branding=Chrome \
-        -Dlibspeechd_h_prefix=speech-dispatcher/ \
-        -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=1 \
-        -Duse_system_libevent=1 \
-        -Duse_system_sqlite=0 \
-        -Duse_system_ssl=0 \
-        -Duse_system_icu=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 \
-        -Dicu_use_data_file_flag=1
-
-  ninja -C out/Release chrome chrome_sandbox
 
+  # we don't use git sources
+  patch -p1 -i $SRC/last-commit-position.patch
+
+  # Fix incorrect inclusion of <string_view> in modes other than >= C++17
+  patch -p1 -d third_party/crc32c/src -i $SRC/crc32c-string-view-check.patch
+
+  # Fix build with glibc 2.26
+  patch -p1 -i $SRC/breakpad-use-ucontext_t.patch
+
+  # Fixes from Gentoo
+  patch -p1 -i $SRC/chromium-gn-bootstrap-r17.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_kerberos=false'
+    'use_pulseaudio=false'
+    'use_sysroot=false'
+    'use_system_libjpeg=true'
+  )
+
+#  export TMPDIR="${PKGMK_WORK_DIR}/temp"
+#  mkdir -p -m 755 "${TMPDIR}" || die
+
+  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
@@ -92,7 +101,7 @@ build() {
 
   for size in 22 24 48 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
+    $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
   done
 
   # fix icu installation