/[gentoo-x86]/eclass/chromium.eclass
Gentoo

Diff of /eclass/chromium.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.10
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2015 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/chromium.eclass,v 1.1 2012/03/14 15:54:24 floppym Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/chromium.eclass,v 1.10 2015/05/21 01:37:25 floppym Exp $
4 4
5# @ECLASS: chromium.eclass 5# @ECLASS: chromium.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Chromium Herd <chromium@gentoo.org> 7# Chromium Herd <chromium@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
9# Mike Gilbert <floppym@gentoo.org> 9# Mike Gilbert <floppym@gentoo.org>
10# @BLURB: Shared functions for chromium and google-chrome 10# @BLURB: Shared functions for chromium and google-chrome
11 11
12inherit eutils fdo-mime gnome2-utils linux-info 12inherit eutils fdo-mime gnome2-utils linux-info
13 13
14if [[ ${CHROMIUM_EXPORT_PHASES} != no ]]; then
14EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm 15 EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
16fi
15 17
18if [[ ${PN} == chromium ]]; then
19 IUSE+=" custom-cflags"
20fi
21
16# @FUNCTION: chromium_check_kernel_config 22# @FUNCTION: chromium_suid_sandbox_check_kernel_config
17# @USAGE: 23# @USAGE:
18# @DESCRIPTION: 24# @DESCRIPTION:
19# Ensures the system kernel is configured for full Chromium functionality. 25# Ensures the system kernel supports features needed for SUID sandbox to work.
20chromium_check_kernel_config() { 26chromium_suid_sandbox_check_kernel_config() {
21 has "${EAPI:-0}" 0 1 2 3 && die "EAPI=${EAPI} is not supported" 27 has "${EAPI:-0}" 0 1 2 3 && die "EAPI=${EAPI} is not supported"
22 28
23 if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then 29 if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then
24 # Warn if the kernel does not support features needed for sandboxing. 30 # Warn if the kernel does not support features needed for sandboxing.
25 # Bug #363987. 31 # Bug #363987.
26 ERROR_PID_NS="PID_NS is required for sandbox to work" 32 ERROR_PID_NS="PID_NS is required for sandbox to work"
27 ERROR_NET_NS="NET_NS is required for sandbox to work" 33 ERROR_NET_NS="NET_NS is required for sandbox to work"
28 CONFIG_CHECK="~PID_NS ~NET_NS" 34 ERROR_USER_NS="USER_NS is required for sandbox to work"
35 ERROR_SECCOMP_FILTER="SECCOMP_FILTER is required for sandbox to work"
36 CONFIG_CHECK="~PID_NS ~NET_NS ~SECCOMP_FILTER ~USED_NS"
29 check_extra_config 37 check_extra_config
30 fi 38 fi
31} 39}
32 40
33# @ECLASS-VARIABLE: CHROMIUM_LANGS 41# @ECLASS-VARIABLE: CHROMIUM_LANGS
106 if ! has ${lang} ${CHROMIUM_LANGS}; then 114 if ! has ${lang} ${CHROMIUM_LANGS}; then
107 eqawarn "LINGUAS warning: no ${lang} in LANGS" 115 eqawarn "LINGUAS warning: no ${lang} in LANGS"
108 continue 116 continue
109 fi 117 fi
110 if ! use linguas_${lang}; then 118 if ! use linguas_${lang}; then
111 rm -v "$(_chromium_crlang ${lang}).pak" || die 119 rm "$(_chromium_crlang ${lang}).pak" || die
112 fi 120 fi
113 done 121 done
114} 122}
115 123
116chromium_pkg_preinst() { 124chromium_pkg_preinst() {
120chromium_pkg_postinst() { 128chromium_pkg_postinst() {
121 fdo-mime_desktop_database_update 129 fdo-mime_desktop_database_update
122 gnome2_icon_cache_update 130 gnome2_icon_cache_update
123 131
124 # For more info see bug #292201, bug #352263, bug #361859. 132 # For more info see bug #292201, bug #352263, bug #361859.
133 if ! has_version x11-themes/gnome-icon-theme &&
134 ! has_version x11-themes/oxygen-icons ; then
125 elog 135 elog
126 elog "Depending on your desktop environment, you may need" 136 elog "Depending on your desktop environment, you may need"
127 elog "to install additional packages to get icons on the Downloads page." 137 elog "to install additional packages to get icons on the Downloads page."
128 elog 138 elog
129 elog "For KDE, the required package is kde-base/oxygen-icons." 139 elog "For KDE, the required package is kde-base/oxygen-icons."
130 elog 140 elog
131 elog "For other desktop environments, try one of the following:" 141 elog "For other desktop environments, try one of the following:"
132 elog " - x11-themes/gnome-icon-theme" 142 elog " - x11-themes/gnome-icon-theme"
133 elog " - x11-themes/tango-icon-theme" 143 elog " - x11-themes/tango-icon-theme"
144 fi
134 145
135 # For more info see bug #359153. 146 # For more info see bug #359153.
136 elog 147 elog
137 elog "Some web pages may require additional fonts to display properly." 148 elog "Some web pages may require additional fonts to display properly."
138 elog "Try installing some of the following packages if some characters" 149 elog "Try installing some of the following packages if some characters"
159 # Prevent user problems like bug #348235. 170 # Prevent user problems like bug #348235.
160 eshopts_push -s extglob 171 eshopts_push -s extglob
161 if is-flagq '-g?(gdb)?([1-9])'; then 172 if is-flagq '-g?(gdb)?([1-9])'; then
162 ewarn 173 ewarn
163 ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)." 174 ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
175 ewarn "This produces very large build files causes the linker to consume large"
176 ewarn "amounts of memory."
177 ewarn
164 ewarn "Please try removing -g{,gdb} before reporting a bug." 178 ewarn "Please try removing -g{,gdb} before reporting a bug."
165 ewarn 179 ewarn
166 fi 180 fi
167 eshopts_pop 181 eshopts_pop
168 182

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20