Advertisement
Bkmz

Untitled

Apr 24th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 19.49 KB | None | 0 0
  1.  
  2. Search Portage:
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. Login     Register     Language Tools
  11. Newest News GLSAs Search Browse USE Flags More...
  12. www-client/chromium
  13. Open-source version of Google Chrome web browser
  14. Screenshots
  15.  
  16. http://chromium.org/
  17. chromium-9999-r1Hard Masked
  18. bindist cups gnome gnome-keyring kerberos pulseaudio selinux custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  19. View      Download      License: BSD
  20. chromium-20.0.1105.0Hard Masked
  21. ~amd64 ~x86
  22. bindist cups gnome gnome-keyring kerberos pulseaudio selinux custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  23. View      Download      License: BSD
  24. chromium-20.0.1096.1Hard Masked
  25. ~amd64 ~x86
  26. bindist cups gnome gnome-keyring kerberos pulseaudio selinux custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  27. View      Download      License: BSD
  28. chromium-19.0.1084.30
  29. ~amd64 ~x86
  30. bindist cups gnome gnome-keyring kerberos pulseaudio custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  31. View      Download      License: BSD
  32. chromium-19.0.1084.24
  33. ~amd64 ~x86
  34. bindist cups gnome gnome-keyring kerberos pulseaudio custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  35. View      Download      License: BSD
  36. chromium-18.0.1025.162
  37. ~amd64 ~x86
  38. bindist cups gnome gnome-keyring kerberos pulseaudio custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  39. View      Download      License: BSD
  40. chromium-18.0.1025.151
  41. amd64 x86
  42. bindist cups gnome gnome-keyring kerberos pulseaudio custom-cflags +linguas_am +linguas_ar +linguas_bg +linguas_bn +linguas_ca +linguas_cs +linguas_da +linguas_de +linguas_el +linguas_en_GB +linguas_es +linguas_es_LA +linguas_et +linguas_fa +linguas_fi +linguas_fil +linguas_fr +linguas_gu +linguas_he +linguas_hi +linguas_hr +linguas_hu +linguas_id +linguas_it +linguas_ja +linguas_kn +linguas_ko +linguas_lt +linguas_lv +linguas_ml +linguas_mr +linguas_ms +linguas_nb +linguas_nl +linguas_pl +linguas_pt_BR +linguas_pt_PT +linguas_ro +linguas_ru +linguas_sk +linguas_sl +linguas_sr +linguas_sv +linguas_sw +linguas_ta +linguas_te +linguas_th +linguas_tr +linguas_uk +linguas_vi +linguas_zh_CN +linguas_zh_TW test
  43. View      Download      License: BSD
  44. Comments ChangeLog USE Flags Dependencies Reverse Deps Related Bugs
  45.  
  46.  
  47. Leave a comment:
  48. Please login to leave a comment
  49.  
  50. Gentoo-Portage.com 2006 Beta - An unofficial portage website
  51. "Gentoo" is a trademark of Gentoo Foundation, Inc.
  52. A Mike Valstar Website
  53.  
  54. # Copyright 1999-2012 Gentoo Foundation
  55. # Distributed under the terms of the GNU General Public License v2
  56. # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-19.0.1084.30.ebuild,v 1.2 2012/04/22 20:08:00 floppym Exp $
  57.  
  58. EAPI="4"
  59. PYTHON_DEPEND="2:2.6"
  60.  
  61. CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
  62.     hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr
  63.     sv sw ta te th tr uk vi zh_CN zh_TW"
  64.  
  65. inherit chromium eutils flag-o-matic multilib \
  66.     pax-utils portability python toolchain-funcs versionator virtualx
  67.  
  68. DESCRIPTION="Open-source version of Google Chrome web browser"
  69. HOMEPAGE="http://chromium.org/"
  70. SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
  71.  
  72. LICENSE="BSD"
  73. SLOT="0"
  74. KEYWORDS="~amd64 ~x86"
  75. IUSE="bindist cups gnome gnome-keyring kerberos pulseaudio"
  76.  
  77. RDEPEND="app-arch/bzip2
  78.     cups? (
  79.         dev-libs/libgcrypt
  80.         >=net-print/cups-1.3.11
  81.     )
  82.     >=dev-lang/v8-3.9.13
  83.     dev-libs/dbus-glib
  84.     dev-libs/elfutils
  85.     >=dev-libs/icu-4.4.1
  86.     =dev-libs/libevent-1.4.13
  87.     dev-libs/libxml2[icu]
  88.     dev-libs/libxslt
  89.     >=dev-libs/nss-3.12.3
  90.     gnome? ( >=gnome-base/gconf-2.24.0 )
  91.     gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
  92.     >=media-libs/alsa-lib-1.0.19
  93.     media-libs/flac
  94.     >=media-libs/libjpeg-turbo-1.2.0-r1
  95.     media-libs/libpng
  96.     >=media-libs/libwebp-0.1.3
  97.     media-libs/speex
  98.     pulseaudio? ( media-sound/pulseaudio )
  99.     sys-fs/udev
  100.     sys-libs/zlib
  101.     x11-libs/gtk+:2
  102.     x11-libs/libXinerama
  103.     x11-libs/libXScrnSaver
  104.     x11-libs/libXtst
  105.     kerberos? ( virtual/krb5 )"
  106. DEPEND="${RDEPEND}
  107.     >=dev-lang/nacl-toolchain-newlib-0_p7311
  108.     dev-lang/perl
  109.     dev-lang/yasm
  110.     dev-python/ply
  111.     dev-python/simplejson
  112.     >=dev-util/gperf-3.0.3
  113.     >=dev-util/pkgconfig-0.23
  114.     >=sys-devel/bison-2.4.3
  115.     sys-devel/flex
  116.     >=sys-devel/make-3.81-r2
  117.     test? (
  118.         dev-python/pyftpdlib
  119.     )"
  120. RDEPEND+="
  121.     !=www-client/chromium-9999
  122.     x11-misc/xdg-utils
  123.     virtual/ttf-fonts"
  124.  
  125. if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
  126.     EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
  127. fi
  128.  
  129. pkg_setup() {
  130.     if [[ "${SLOT}" == "0" ]]; then
  131.         CHROMIUM_SUFFIX=""
  132.     else
  133.         CHROMIUM_SUFFIX="-${SLOT}"
  134.     fi
  135.     CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
  136.  
  137.     # Make sure the build system will use the right tools, bug #340795.
  138.     tc-export AR CC CXX RANLIB
  139.  
  140.     # Make sure the build system will use the right python, bug #344367.
  141.     python_set_active_version 2
  142.     python_pkg_setup
  143.  
  144.     chromium_check_kernel_config
  145.  
  146.     if use bindist; then
  147.         elog "bindist enabled: H.264 video support will be disabled."
  148.     else
  149.         elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
  150.     fi
  151. }
  152.  
  153. src_prepare() {
  154.     ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
  155.         native_client/toolchain/linux_x86_newlib || die
  156.  
  157.     # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
  158.     sed -i '1i#define OF(x) x' \
  159.         third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
  160.         chrome/common/zip*.cc || die
  161.  
  162.     epatch_user
  163.  
  164.     # Remove most bundled libraries. Some are still needed.
  165.     find third_party -type f \! -iname '*.gyp*' \
  166.         \! -path 'third_party/WebKit/*' \
  167.         \! -path 'third_party/adobe/*' \
  168.         \! -path 'third_party/angle/*' \
  169.         \! -path 'third_party/cacheinvalidation/*' \
  170.         \! -path 'third_party/cld/*' \
  171.         \! -path 'third_party/expat/*' \
  172.         \! -path 'third_party/ffmpeg/*' \
  173.         \! -path 'third_party/flac/flac.h' \
  174.         \! -path 'third_party/gpsd/*' \
  175.         \! -path 'third_party/harfbuzz/*' \
  176.         \! -path 'third_party/hunspell/*' \
  177.         \! -path 'third_party/iccjpeg/*' \
  178.         \! -path 'third_party/jsoncpp/*' \
  179.         \! -path 'third_party/json_minify/*' \
  180.         \! -path 'third_party/khronos/*' \
  181.         \! -path 'third_party/launchpad_translations/*' \
  182.         \! -path 'third_party/leveldb/*' \
  183.         \! -path 'third_party/leveldatabase/*' \
  184.         \! -path 'third_party/libjingle/*' \
  185.         \! -path 'third_party/libphonenumber/*' \
  186.         \! -path 'third_party/libsrtp/*' \
  187.         \! -path 'third_party/libvpx/*' \
  188.         \! -path 'third_party/libyuv/*' \
  189.         \! -path 'third_party/lss/*' \
  190.         \! -path 'third_party/mesa/*' \
  191.         \! -path 'third_party/modp_b64/*' \
  192.         \! -path 'third_party/mongoose/*' \
  193.         \! -path 'third_party/npapi/*' \
  194.         \! -path 'third_party/openmax/*' \
  195.         \! -path 'third_party/ots/*' \
  196.         \! -path 'third_party/protobuf/*' \
  197.         \! -path 'third_party/scons-2.0.1/*' \
  198.         \! -path 'third_party/sfntly/*' \
  199.         \! -path 'third_party/skia/*' \
  200.         \! -path 'third_party/smhasher/*' \
  201.         \! -path 'third_party/speex/speex.h' \
  202.         \! -path 'third_party/sqlite/*' \
  203.         \! -path 'third_party/tcmalloc/*' \
  204.         \! -path 'third_party/tlslite/*' \
  205.         \! -path 'third_party/undoview/*' \
  206.         \! -path 'third_party/v8-i18n/*' \
  207.         \! -path 'third_party/webdriver/*' \
  208.         \! -path 'third_party/webgl_conformance/*' \
  209.         \! -path 'third_party/webrtc/*' \
  210.         \! -path 'third_party/zlib/contrib/minizip/*' \
  211.         -delete || die
  212.  
  213.     local v8_bundled="$(chromium_bundled_v8_version)"
  214.     local v8_installed="$(chromium_installed_v8_version)"
  215.     elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
  216.  
  217.     # Remove bundled v8.
  218.     find v8 -type f \! -iname '*.gyp*' -delete || die
  219.  
  220.     # The implementation files include v8 headers with full path,
  221.     # like #include "v8/include/v8.h". Make sure the system headers
  222.     # will be used.
  223.     # TODO: find a solution that can be upstreamed.
  224.     rmdir v8/include || die
  225.     ln -s /usr/include v8/include || die
  226.  
  227.     # Make sure the build system will use the right python, bug #344367.
  228.     # Only convert directories that need it, to save time.
  229.     python_convert_shebangs -q -r 2 build tools
  230. }
  231.  
  232. src_configure() {
  233.     local myconf=""
  234.  
  235.     # Never tell the build system to "enable" SSE2, it has a few unexpected
  236.     # additions, bug #336871.
  237.     myconf+=" -Ddisable_sse2=1"
  238.  
  239.     # Use system-provided libraries.
  240.     # TODO: use_system_ffmpeg
  241.     # TODO: use_system_hunspell (upstream changes needed).
  242.     # TODO: use_system_ssl (http://crbug.com/58087).
  243.     # TODO: use_system_sqlite (http://crbug.com/22208).
  244.     # TODO: use_system_vpx
  245.     myconf+="
  246.         -Duse_system_bzip2=1
  247.         -Duse_system_flac=1
  248.         -Duse_system_icu=1
  249.         -Duse_system_libevent=1
  250.         -Duse_system_libjpeg=1
  251.         -Duse_system_libpng=1
  252.         -Duse_system_libwebp=1
  253.         -Duse_system_libxml=1
  254.         -Duse_system_speex=1
  255.         -Duse_system_v8=1
  256.         -Duse_system_xdg_utils=1
  257.         -Duse_system_yasm=1
  258.         -Duse_system_zlib=1"
  259.  
  260.     # Optional dependencies.
  261.     # TODO: linux_link_kerberos, bug #381289.
  262.     myconf+="
  263.         $(gyp_use cups use_cups)
  264.         $(gyp_use gnome use_gconf)
  265.         $(gyp_use gnome-keyring use_gnome_keyring)
  266.         $(gyp_use gnome-keyring linux_link_gnome_keyring)
  267.         $(gyp_use kerberos use_kerberos)
  268.         $(gyp_use pulseaudio use_pulseaudio)"
  269.  
  270.     # Enable sandbox.
  271.     myconf+="
  272.         -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
  273.         -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
  274.  
  275.     # Never use bundled gold binary. Disable gold linker flags for now.
  276.     myconf+="
  277.         -Dlinux_use_gold_binary=0
  278.         -Dlinux_use_gold_flags=0"
  279.  
  280.     if ! use bindist; then
  281.         # Enable H.624 support in bundled ffmpeg.
  282.         myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
  283.     fi
  284.  
  285.     local myarch="$(tc-arch)"
  286.     if [[ $myarch = amd64 ]] ; then
  287.         myconf+=" -Dtarget_arch=x64"
  288.     elif [[ $myarch = x86 ]] ; then
  289.         myconf+=" -Dtarget_arch=ia32"
  290.     else
  291.         die "Failed to determine target arch, got '$myarch'."
  292.     fi
  293.  
  294.     # Make sure that -Werror doesn't get added to CFLAGS by the build system.
  295.     # Depending on GCC version the warnings are different and we don't want
  296.     # the build to fail because of that.
  297.     myconf+=" -Dwerror="
  298.  
  299.     # Avoid CFLAGS problems, bug #352457, bug #390147.
  300.     if ! use custom-cflags; then
  301.         replace-flags "-Os" "-O2"
  302.         strip-flags
  303.     fi
  304.  
  305.     egyp_chromium ${myconf} || die
  306. }
  307.  
  308. src_compile() {
  309.     local test_targets
  310.     for x in base cacheinvalidation crypto \
  311.         googleurl gpu media net printing; do
  312.         test_targets+=" ${x}_unittests"
  313.     done
  314.  
  315.     local make_targets="chrome chrome_sandbox chromedriver"
  316.     if use test; then
  317.         make_targets+=$test_targets
  318.     fi
  319.  
  320.     # See bug #410883 for more info about the .host mess.
  321.     emake ${make_targets} BUILDTYPE=Release V=1 \
  322.         CC.host="$(tc-getCC)" CFLAGS.host="${CFLAGS}" \
  323.         CXX.host="$(tc-getCXX)" CXXFLAGS.host="${CXXFLAGS}" \
  324.         LINK.host="$(tc-getCXX)" LDFLAGS.host="${LDFLAGS}" \
  325.         AR.host="$(tc-getAR)" || die
  326.  
  327.     pax-mark m out/Release/chrome
  328.     if use test; then
  329.         for x in $test_targets; do
  330.             pax-mark m out/Release/${x}
  331.         done
  332.     fi
  333. }
  334.  
  335. src_test() {
  336.     # For more info see bug #350349.
  337.     local mylocale='en_US.utf8'
  338.     if ! locale -a | grep -q "$mylocale"; then
  339.         eerror "${PN} requires ${mylocale} locale for tests"
  340.         eerror "Please read the following guides for more information:"
  341.         eerror "  http://www.gentoo.org/doc/en/guide-localization.xml"
  342.         eerror "  http://www.gentoo.org/doc/en/utf-8.xml"
  343.         die "locale ${mylocale} is not supported"
  344.     fi
  345.  
  346.     # For more info see bug #370957.
  347.     if [[ $UID -eq 0 ]]; then
  348.         die "Tests must be run as non-root. Please use FEATURES=userpriv."
  349.     fi
  350.  
  351.     # ICUStringConversionsTest: bug #350347.
  352.     # MessagePumpLibeventTest: bug #398501.
  353.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
  354.         '--gtest_filter=-ICUStringConversionsTest.*:MessagePumpLibeventTest.*'
  355.  
  356.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/cacheinvalidation_unittests virtualmake
  357.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
  358.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
  359.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/gpu_unittests virtualmake
  360.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/media_unittests virtualmake
  361.  
  362.     # NetUtilTest: bug #361885.
  363.     # DnsConfigServiceTest.GetSystemConfig: bug #394883.
  364.     # CertDatabaseNSSTest.ImportServerCert_SelfSigned: bug #399269.
  365.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
  366.         '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:DnsConfigServiceTest.GetSystemConfig:CertDatabaseNSSTest.ImportServerCert_SelfSigned'
  367.  
  368.     LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/printing_unittests virtualmake
  369. }
  370.  
  371. src_install() {
  372.     exeinto "${CHROMIUM_HOME}"
  373.     doexe out/Release/chrome || die
  374.     doexe out/Release/chrome_sandbox || die
  375.     fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
  376.  
  377.     doexe out/Release/chromedriver || die
  378.  
  379.     # Install Native Client files on platforms that support it.
  380.     insinto "${CHROMIUM_HOME}"
  381.     case "$(tc-arch)" in
  382.         amd64)
  383.             doexe out/Release/nacl_helper{,_bootstrap} || die
  384.             doins out/Release/nacl_irt_x86_64.nexe || die
  385.             doins out/Release/libppGoogleNaClPluginChrome.so || die
  386.         ;;
  387.         x86)
  388.             doexe out/Release/nacl_helper{,_bootstrap} || die
  389.             doins out/Release/nacl_irt_x86_32.nexe || die
  390.             doins out/Release/libppGoogleNaClPluginChrome.so || die
  391.         ;;
  392.     esac
  393.  
  394.     newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
  395.     if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
  396.         sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
  397.             -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
  398.         sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
  399.             -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
  400.         sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
  401.             -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
  402.     fi
  403.  
  404.     # It is important that we name the target "chromium-browser",
  405.     # xdg-utils expect it; bug #355517.
  406.     dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
  407.     # keep the old symlink around for consistency
  408.     dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
  409.  
  410.     # Allow users to override command-line options, bug #357629.
  411.     dodir /etc/chromium || die
  412.     insinto /etc/chromium
  413.     newins "${FILESDIR}/chromium.default" "default" || die
  414.  
  415.     pushd out/Release/locales > /dev/null || die
  416.     chromium_remove_language_paks
  417.     popd
  418.  
  419.     insinto "${CHROMIUM_HOME}"
  420.     doins out/Release/chrome.pak || die
  421.     doins out/Release/resources.pak || die
  422.  
  423.     doins -r out/Release/locales || die
  424.     doins -r out/Release/resources || die
  425.  
  426.     newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
  427.     newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
  428.  
  429.     # Chromium looks for these in its folder
  430.     # See media_posix.cc and base_paths_linux.cc
  431.     # dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
  432.     # dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
  433.     # dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
  434.     doexe out/Release/libffmpegsumo.so || die
  435.  
  436.     # Install icons and desktop entry.
  437.     for SIZE in 16 22 24 32 48 64 128 256 ; do
  438.         insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
  439.         newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
  440.             chromium-browser${CHROMIUM_SUFFIX}.png || die
  441.     done
  442.     local mime_types="text/html;text/xml;application/xhtml+xml;"
  443.     mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
  444.     make_desktop_entry \
  445.         chromium-browser${CHROMIUM_SUFFIX} \
  446.         "Chromium${CHROMIUM_SUFFIX}" \
  447.         chromium-browser${CHROMIUM_SUFFIX} \
  448.         "Network;WebBrowser" \
  449.         "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
  450.     sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
  451.  
  452.     # Install GNOME default application entry (bug #303100).
  453.     if use gnome; then
  454.         dodir /usr/share/gnome-control-center/default-apps || die
  455.         insinto /usr/share/gnome-control-center/default-apps
  456.         newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
  457.         if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
  458.             sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
  459.                 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
  460.         fi
  461.     fi
  462. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement