summaryrefslogtreecommitdiff
path: root/chromium/Pkgfile
blob: 17b672a12bbfc7f2f38d22c93fce8e37b85f9b09 (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=61.0.3163.79
    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 	breakpad-use-ucontext_t.patch
   13 	chromium-gcc-r1.patch
   14 	chromium-gn-bootstrap-r14.patch
   15 	chromium-atk-r1.patch
   16 	chromium-blink-gcc7.patch)
   17 
   18 build() {
   19   cd $name-$version
   20 
   21   export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
   22   export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
   23 
   24   # we don't use git sources
   25   patch -p1 -i $SRC/last-commit-position.patch
   26 
   27   # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853347
   28   patch -p1 -i $SRC/chromium-blink-gcc7.patch
   29 
   30   # Fix build with glibc 2.26
   31   patch -p1 -i $SRC/breakpad-use-ucontext_t.patch
   32 
   33   # Fixes from Gentoo
   34   patch -p1 -i $SRC/chromium-gcc-r1.patch
   35   patch -p1 -i $SRC/chromium-gn-bootstrap-r14.patch
   36   patch -p1 -i $SRC/chromium-atk-r1.patch
   37 
   38   mkdir -p third_party/node/linux/node-linux-x64/bin
   39   ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
   40 
   41   _gn_args=(
   42     'blink_gc_plugin=false'
   43     'clang_use_chrome_plugins=false'
   44     'enable_hangout_services_extension=true'
   45     'enable_nacl=false'
   46     'enable_swiftshader=false'
   47     'fatal_linker_warnings=false'
   48     'ffmpeg_branding="Chrome"'
   49     'is_clang=false'
   50     'is_debug=false'
   51     'linux_use_bundled_binutils=false'
   52     'use_custom_libcxx=false'
   53     'proprietary_codecs=true'
   54     'remove_webcore_debug_symbols=true'
   55     'symbol_level=0'
   56     'treat_warnings_as_errors=false'
   57     'use_allocator="none"'
   58     'use_cups=false'
   59     'use_gconf=false'
   60     'use_gnome_keyring=false'
   61     'use_gold=false'
   62     'use_kerberos=false'
   63     'use_pulseaudio=false'
   64     'use_sysroot=false'
   65     'use_system_libjpeg=true'
   66   )
   67 
   68   python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args="${_gn_args[*]}"
   69   out/Release/gn gen out/Release --args="${_gn_args[*]}" --script-executable=/usr/bin/python2
   70 
   71   # Ninja, by default, sets the number of jobs to the number of availalble threads
   72   local JOBS=$(awk 'BEGIN{RS="-j|--jobs="} NR==2 {print $1}' <<< $MAKEFLAGS)
   73   test -n "$JOBS" && export JOBS="-j $JOBS"
   74 
   75   ninja $JOBS -C out/Release chrome chrome_sandbox
   76 
   77   install -m 0755 -D out/Release/chrome $PKG/usr/lib/$name/$name
   78   install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/$name/chrome-sandbox
   79   install -m 0644 -D out/Release/*.pak $PKG/usr/lib/$name
   80   install -d $PKG/usr/lib/$name/locales
   81   install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/$name/locales
   82   cp -a out/Release/resources $PKG/usr/lib/$name
   83   install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1
   84 
   85   # fix v8 natives
   86   cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
   87 
   88   for size in 22 24 48 128 256; do
   89       install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \
   90       $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
   91   done
   92 
   93   # fix icu installation
   94   cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
   95 
   96   install -d $PKG/usr/share/pixmaps
   97   ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
   98   install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
   99   install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
  100 }

Generated by cgit