/[gentoo-x86]/www-client/google-chrome/google-chrome-22.0.1201.0_alpha145644.ebuild
Gentoo

Contents of /www-client/google-chrome/google-chrome-22.0.1201.0_alpha145644.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jul 17 02:22:57 2012 UTC (11 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Dev channel bump.

(Portage version: 2.2.0_alpha118/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/google-chrome/google-chrome-22.0.1201.0_alpha145644.ebuild,v 1.1 2012/07/10 02:19:02 floppym Exp $
4
5 EAPI="4"
6
7 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
8 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
9 sv sw ta te th tr uk vi zh_CN zh_TW"
10
11 inherit chromium eutils multilib pax-utils unpacker
12
13 DESCRIPTION="The web browser from Google"
14 HOMEPAGE="http://www.google.com/chrome"
15
16 case ${PV} in
17 *_alpha*)
18 SLOT="unstable"
19 MY_PV=${PV/_alpha/-r}
20 ;;
21 *_beta*)
22 SLOT="beta"
23 MY_PV=${PV/_beta/-r}
24 ;;
25 *_p*)
26 SLOT="stable"
27 MY_PV=${PV/_p/-r}
28 ;;
29 *)
30 die "Invalid value for \${PV}: ${PV}"
31 ;;
32 esac
33
34 MY_PN="${PN}-${SLOT}"
35 MY_P="${MY_PN}_${MY_PV}"
36
37 SRC_BASE="http://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_"
38 SRC_URI="amd64? ( ${SRC_BASE}amd64.deb ) x86? ( ${SRC_BASE}i386.deb )"
39
40 LICENSE="google-chrome"
41 KEYWORDS="-* ~amd64 ~x86"
42 IUSE="+plugins"
43 RESTRICT="mirror strip"
44
45 RDEPEND="
46 media-libs/alsa-lib
47 app-arch/bzip2
48 x11-libs/cairo
49 net-print/cups
50 sys-apps/dbus
51 dev-libs/expat
52 media-libs/fontconfig
53 media-libs/freetype
54 app-misc/ca-certificates
55 gnome-base/gconf:2
56 dev-libs/libgcrypt
57 x11-libs/gdk-pixbuf
58 x11-libs/gtk+:2
59 dev-libs/glib:2
60 dev-libs/nspr
61 dev-libs/nss
62 x11-libs/pango
63 media-libs/libpng:1.2
64 || ( >=sys-devel/gcc-4.4.0[-nocxx] >=sys-devel/gcc-4.4.0[cxx] )
65 sys-fs/udev
66 x11-libs/libX11
67 x11-libs/libXext
68 x11-libs/libXfixes
69 x11-libs/libXrender
70 x11-libs/libXScrnSaver
71 sys-libs/zlib
72 x11-misc/xdg-utils
73 net-misc/curl
74 dev-libs/openssl:0.9.8
75 "
76
77 # Add blockers for the other slots.
78 for x in 0 beta stable unstable; do
79 if [[ ${SLOT} != ${x} ]]; then
80 RDEPEND+=" !${CATEGORY}/${PN}:${x}"
81 fi
82 done
83
84 QA_PREBUILT="*"
85 S=${WORKDIR}
86
87 pkg_setup() {
88 CHROME_HOME="opt/google/chrome/"
89 chromium_suid_sandbox_check_kernel_config
90 }
91
92 src_install() {
93 pax-mark m ${CHROME_HOME}chrome || die
94 rm -rf usr/share/menu || die
95 mv usr/share/doc/${PN} usr/share/doc/${PF} || die
96
97 pushd "${CHROME_HOME}locales" > /dev/null || die
98 chromium_remove_language_paks
99 popd
100
101 mv opt usr "${D}" || die
102
103 fperms u+s "/${CHROME_HOME}chrome-sandbox" || die
104
105 if use plugins ; then
106 local plugins="--extra-plugin-dir=/usr/$(get_libdir)/nsbrowser/plugins"
107 sed -e "/^exec/ i set -- \"${plugins}\" \"\$@\"" \
108 -i "${D}${CHROME_HOME}google-chrome" || die
109 fi
110
111 domenu "${D}${CHROME_HOME}google-chrome.desktop" || die
112 local size
113 for size in 16 22 24 32 48 64 128 256 ; do
114 insinto /usr/share/icons/hicolor/${size}x${size}/apps
115 newins "${D}${CHROME_HOME}product_logo_${size}.png" google-chrome.png
116 done
117
118 # Compatibility symlink for newer udev, bug 423415.
119 dosym "/usr/$(get_libdir)/libudev.so" "${CHROME_HOME}libudev.so.0"
120 }
121
122 any_cpu_missing_flag() {
123 local value=$1
124 grep '^flags' /proc/cpuinfo | grep -qv "$value"
125 }
126
127 pkg_preinst() {
128 chromium_pkg_preinst
129 if any_cpu_missing_flag sse2; then
130 ewarn "The bundled PepperFlash plugin requires a CPU that supports the"
131 ewarn "SSE2 instruction set, and at least one of your CPUs does not"
132 ewarn "support this feature. Disabling PepperFlash."
133 sed -e "/^exec/ i set -- --disable-bundled-ppapi-flash \"\$@\"" \
134 -i "${D}${CHROME_HOME}google-chrome" || die
135 fi
136 }
137
138 pkg_postinst() {
139 chromium_pkg_postinst
140
141 einfo
142 elog "Please notice the bundled flash player (PepperFlash)."
143 elog "You can (de)activate all flash plugins via chrome://plugins"
144 einfo
145 }

  ViewVC Help
Powered by ViewVC 1.1.20