summaryrefslogtreecommitdiff
path: root/chromium/Pkgfile
blob: 64f3d36dbc11283991561d3679086acc98700fda (plain)
    1 # Description: Open source version of Google Chrome web browser.
    2 # URL: http://chromium.org/
    3 # Maintainer: Jose V Beneyto, sepen at crux dot nu
    4 # Packager: Tadeusz Sosnierz, tadzikes gmail com
    5 # Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm
    6 
    7 name=chromium
    8 version=60.0.3112.101
    9 release=1
   10 source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz
   11         last-commit-position.patch $name.sh $name.desktop
   12 	chromium-blink-gcc7.patch
   13 	chromium-v8-gcc7.patch
   14 	chromium-gn-bootstrap-r8.patch)
   15 
   16 build() {
   17   cd $name-$version
   18 
   19   export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
   20   export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
   21 
   22   # we don't use git sources
   23   patch -p1 -i $SRC/last-commit-position.patch
   24 
   25   # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853347
   26   patch -p1 -i $SRC/chromium-blink-gcc7.patch
   27 
   28   # https://bugs.chromium.org/p/chromium/issues/detail?id=614289
   29   patch -p1 -i $SRC/chromium-v8-gcc7.patch
   30 
   31   # Fixes from Gentoo
   32   patch -p1 -i $SRC/chromium-gn-bootstrap-r8.patch
   33 
   34   mkdir -p third_party/node/linux/node-linux-x64/bin
   35   ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
   36 
   37   _gn_args=(
   38     'blink_gc_plugin=false'
   39     'clang_use_chrome_plugins=false'
   40     'enable_hangout_services_extension=true'
   41     'enable_nacl=false'
   42     'enable_swiftshader=false'
   43     'fatal_linker_warnings=false'
   44     'ffmpeg_branding="Chrome"'
   45     'is_clang=false'
   46     'is_debug=false'
   47     'linux_use_bundled_binutils=false'
   48     'proprietary_codecs=true'
   49     'remove_webcore_debug_symbols=true'
   50     'symbol_level=0'
   51     'treat_warnings_as_errors=false'
   52     'use_allocator="none"'
   53     'use_cups=false'
   54     'use_gconf=false'
   55     'use_gnome_keyring=false'
   56     'use_gold=false'
   57     'use_kerberos=false'
   58     'use_pulseaudio=false'
   59     'use_sysroot=false'
   60     'use_system_libjpeg=true'
   61   )
   62 
   63   python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args="${_gn_args[*]}"
   64   out/Release/gn gen out/Release --args="${_gn_args[*]}" --script-executable=/usr/bin/python2
   65 
   66   # Ninja, by default, sets the number of jobs to the number of availalble threads
   67   local JOBS=$(awk 'BEGIN{RS="-j|--jobs="} NR==2 {print $1}' <<< $MAKEFLAGS)
   68   test -n "$JOBS" && export JOBS="-j $JOBS"
   69 
   70   ninja $JOBS -C out/Release chrome chrome_sandbox
   71 
   72   install -m 0755 -D out/Release/chrome $PKG/usr/lib/$name/$name
   73   install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/$name/chrome-sandbox
   74   install -m 0644 -D out/Release/*.pak $PKG/usr/lib/$name
   75   install -d $PKG/usr/lib/$name/locales
   76   install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/$name/locales
   77   cp -a out/Release/resources $PKG/usr/lib/$name
   78   install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1
   79 
   80   # fix v8 natives
   81   cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
   82 
   83   for size in 22 24 48 128 256; do
   84       install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \
   85       $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
   86   done
   87 
   88   # fix icu installation
   89   cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
   90 
   91   install -d $PKG/usr/share/pixmaps
   92   ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
   93   install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
   94   install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
   95 }

Generated by cgit