Skip to content

Instantly share code, notes, and snippets.

@user
Last active January 26, 2018 12:01
Show Gist options
  • Select an option

  • Save user/3829d1c5977c8fc18c15 to your computer and use it in GitHub Desktop.

Select an option

Save user/3829d1c5977c8fc18c15 to your computer and use it in GitHub Desktop.

Revisions

  1. user revised this gist Jan 26, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,6 @@ build() {
    'enable_print_preview=false'
    'enable_remoting=false'
    'enable_swiftshader=false'
    'enable_webrtc=false'
    'fatal_linker_warnings=false'
    'ffmpeg_branding="Chrome"'
    'is_clang=false'
  2. user revised this gist Jan 26, 2018. No changes.
  3. user revised this gist Jan 26, 2018. 1 changed file with 90 additions and 52 deletions.
    142 changes: 90 additions & 52 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,80 +1,118 @@
    name=chromium
    version=50.0.2661.94
    version=63.0.3239.132
    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
    last-commit-position.patch $name.sh
    chromium-exclude_unwind_tables.patch
    chromium-clang-r1.patch
    chromium-webrtc-r0.patch)

    build() {
    cd $name-$version

    touch chrome/test/data/webui/i18n_process_css_test.html
    if [ -n "$(pkginfo -i | grep '^ccache ')" ]; then
    # Avoid falling back to preprocessor mode when sources contain time macros
    export CCACHE_SLOPPINESS=time_macros
    fi

    export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"

    build/gyp_chromium build/all.gyp --depth=. \
    -Duse_sysroot=0 \
    -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=0 \
    -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

    # https://chromium-review.googlesource.com/c/chromium/src/+/71257
    patch -p1 -i $SRC/chromium-exclude_unwind_tables.patch

    # Fixes from Gentoo
    patch -p1 -i $SRC/chromium-clang-r1.patch
    patch -p1 -i $SRC/chromium-webrtc-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/

    # for LIB in ffmpeg flac harfbuzz-ng libjpeg libjpeg_turbo libpng libwebp libxslt yasm; do
    # find -type f -path "*third_party/$LIB/*" \
    # \! -path "*third_party/$LIB/chromium/*" \
    # \! -path "*third_party/$LIB/google/*" \
    # \! -path "*base/third_party/icu/*" \
    # \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
    # -delete
    # done

    # /usr/bin/python2 build/linux/unbundle/replace_gn_files.py \
    # --system-libraries ffmpeg flac harfbuzz-ng libjpeg libxml libevent \
    # libpng libwebp libxslt opus yasm freetype
    # /usr/bin/python2 third_party/libaddressinput/chromium/tools/update-strings.py

    _gn_args=(
    'blink_gc_plugin=false'
    'clang_use_chrome_plugins=false'
    'enable_basic_printing=false'
    'enable_hangout_services_extension=true'
    'enable_nacl=false'
    'enable_print_preview=false'
    'enable_remoting=false'
    'enable_swiftshader=false'
    'enable_webrtc=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 out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1

    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 22 24 48 128 256; do
    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
    $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
    done

    # fix icu installation
    cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
    install -m 0644 -D out/Release/icudtl.dat $PKG/usr/lib/$name/icudtl.dat

    install -d $PKG/usr/share/pixmaps
    ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
    install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
    install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
    }

  4. user revised this gist May 3, 2016. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    name=chromium
    version=50.0.2661.86
    version=50.0.2661.94
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)
    @@ -37,6 +37,7 @@ build() {
    -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 \
    @@ -48,7 +49,6 @@ build() {
    -Dlinux_link_libspeechd=1 \
    -Denable_webrtc=0 \
    -Ddisable_nacl=1 \
    -Duse_system_icu=0 \
    -Dicu_use_data_file_flag=1

    ninja -C out/Release chrome chrome_sandbox
    @@ -66,9 +66,12 @@ 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
    cp -a out/Release/icudtl.dat $PKG/usr/lib/$name

    install -d $PKG/usr/share/pixmaps
    ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
    install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
  5. user revised this gist Apr 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ build() {
    -Denable_webrtc=0 \
    -Ddisable_nacl=1 \
    -Duse_system_icu=0 \
    -Dicu_use_data_file_flag=0
    -Dicu_use_data_file_flag=1

    ninja -C out/Release chrome chrome_sandbox

  6. user revised this gist Apr 27, 2016. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    name=chromium
    version=49.0.2623.75
    version=50.0.2661.86
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)
    @@ -46,8 +46,9 @@ build() {
    -Dlinux_link_gnome_keyring=0 \
    -Dlinux_link_libpci=1 \
    -Dlinux_link_libspeechd=1 \
    -Denable_webrtc=1 \
    -Denable_webrtc=0 \
    -Ddisable_nacl=1 \
    -Duse_system_icu=0 \
    -Dicu_use_data_file_flag=0

    ninja -C out/Release chrome chrome_sandbox
    @@ -58,7 +59,7 @@ build() {
    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 out/Release/chrome.1 $PKG/usr/man/man1/$name.1
    install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1

    # fix v8 natives
    cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
  7. user revised this gist Mar 31, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -32,9 +32,9 @@ build() {
    -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_ffmpeg=0 \
    -Duse_system_yasm=1 \
    -Duse_system_libevent=1 \
    -Duse_system_sqlite=0 \
    -Duse_system_ssl=0 \
    -Dremove_webcore_debug_symbols=1 \
  8. user revised this gist Mar 13, 2016. 1 changed file with 34 additions and 33 deletions.
    67 changes: 34 additions & 33 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    name=chromium
    version=48.0.2564.116
    version=49.0.2623.75
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)
    @@ -13,41 +13,42 @@ build() {
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"

    build/gyp_chromium build/all.gyp --depth=. \
    -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_sysroot=0 \
    -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 \
    -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=0 \
    -Ddisable_nacl=1 \
    -Dicu_use_data_file_flag=0
    -Duse_system_sqlite=0 \
    -Duse_system_ssl=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=0

    ninja -C out/Release chrome chrome_sandbox

  9. user revised this gist Feb 21, 2016. 1 changed file with 37 additions and 35 deletions.
    72 changes: 37 additions & 35 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,30 @@
    name=chromium
    version=47.0.2526.106
    version=48.0.2564.116
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)

    build() {
    cd $name-$version
    cd $name-$version

    touch chrome/test/data/webui/i18n_process_css_test.html
    export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
    touch chrome/test/data/webui/i18n_process_css_test.html

    build/gyp_chromium build/all.gyp --depth=. \
    -Dclang=0 \
    -Dpython_ver="2.7" \
    export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"

    build/gyp_chromium build/all.gyp --depth=. \
    -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 \
    -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/ \
    -Dffmpeg_branding=Chrome \
    -Dlibspeechd_h_prefix=speech-dispatcher/ \
    -Duse_system_libjpeg=1 \
    -Duse_system_libxslt=1 \
    -Duse_system_libxml=1 \
    @@ -39,35 +40,36 @@ build() {
    -Duse_gconf=0 \
    -Duse_cups=0 \
    -Duse_gnome_keyring=0 \
    -Duse_kerberos=0 \
    -Duse_pulseaudio=0 \
    -Duse_kerberos=0 \
    -Duse_pulseaudio=0 \
    -Dlinux_link_gnome_keyring=0 \
    -Dlinux_link_libpci=1 \
    -Dlinux_link_libspeechd=1 \
    -Dlinux_link_libpci=1 \
    -Dlinux_link_libspeechd=1 \
    -Denable_webrtc=0 \
    -Ddisable_nacl=1 \
    -Dicu_use_data_file_flag=0
    -Dicu_use_data_file_flag=0

    ninja -C out/Release chrome chrome_sandbox
    ninja -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 out/Release/chrome.1 $PKG/usr/man/man1/$name.1
    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 out/Release/chrome.1 $PKG/usr/man/man1/$name.1

    # fix v8 natives
    cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
    # fix v8 natives
    cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name

    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
    done
    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
    done

    install -d $PKG/usr/share/pixmaps
    ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
    install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
    install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
    install -d $PKG/usr/share/pixmaps
    ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
    install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
    install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
    }

  10. user revised this gist Jan 11, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,13 @@
    name=chromium
    version=45.0.2454.85
    version=47.0.2526.106
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)

    build() {
    cd $name-$version

    touch chrome/test/data/webui/i18n_process_css_test.html
    export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"

  11. user revised this gist Sep 3, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    name=chromium
    version=44.0.2403.130
    version=45.0.2454.85
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)
  12. user revised this gist Aug 12, 2015. No changes.
  13. user revised this gist Aug 7, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ build() {
    -Dlinux_link_gnome_keyring=0 \
    -Dlinux_link_libpci=1 \
    -Dlinux_link_libspeechd=1 \
    -Denable_webrtc=1 \
    -Denable_webrtc=0 \
    -Ddisable_nacl=1 \
    -Dicu_use_data_file_flag=0

  14. user created this gist Aug 7, 2015.
    72 changes: 72 additions & 0 deletions Pkgfile-chromium
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,72 @@
    name=chromium
    version=44.0.2403.130
    release=1
    source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
    $name.sh $name.desktop)

    build() {
    cd $name-$version

    export CFLAGS="$CFLAGS $(pkg-config --cflags nspr)"
    export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"

    build/gyp_chromium build/all.gyp --depth=. \
    -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 \
    -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=0

    ninja -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 out/Release/chrome.1 $PKG/usr/man/man1/$name.1

    # fix v8 natives
    cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name

    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
    done

    install -d $PKG/usr/share/pixmaps
    ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
    install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
    install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
    }