Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 18 Apr 2017 14:11:33
Message-Id: 1492524658.5248d8fb011541388f36e9cf4655bdf9f78f7603.floppym@gentoo
1 commit: 5248d8fb011541388f36e9cf4655bdf9f78f7603
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 18 14:10:58 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 18 14:10:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5248d8fb
7
8 chromium.eclass: remove
9
10 eclass/chromium.eclass | 264 -------------------------------------------------
11 1 file changed, 264 deletions(-)
12
13 diff --git a/eclass/chromium.eclass b/eclass/chromium.eclass
14 deleted file mode 100644
15 index 5f8c53cabf3..00000000000
16 --- a/eclass/chromium.eclass
17 +++ /dev/null
18 @@ -1,264 +0,0 @@
19 -# Copyright 1999-2016 Gentoo Foundation
20 -# Distributed under the terms of the GNU General Public License v2
21 -
22 -# DEPRECATED
23 -# This eclass has been deprecated and should not be used by any new ebuilds.
24 -
25 -# @DEAD
26 -
27 -# @ECLASS: chromium.eclass
28 -# @MAINTAINER:
29 -# Chromium Herd <chromium@g.o>
30 -# @AUTHOR:
31 -# Mike Gilbert <floppym@g.o>
32 -# @BLURB: Shared functions for chromium and google-chrome
33 -
34 -inherit eutils fdo-mime gnome2-utils linux-info
35 -
36 -eqawarn "chromium.eclass is deprecated"
37 -
38 -if [[ ${CHROMIUM_EXPORT_PHASES} != no ]]; then
39 - EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
40 -fi
41 -
42 -if [[ ${PN} == chromium ]]; then
43 - IUSE+=" custom-cflags"
44 -fi
45 -
46 -# @FUNCTION: chromium_suid_sandbox_check_kernel_config
47 -# @USAGE:
48 -# @DESCRIPTION:
49 -# Ensures the system kernel supports features needed for SUID sandbox to work.
50 -chromium_suid_sandbox_check_kernel_config() {
51 - has "${EAPI:-0}" 0 1 2 3 && die "EAPI=${EAPI} is not supported"
52 -
53 - if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then
54 - # Warn if the kernel does not support features needed for sandboxing.
55 - # Bug #363987.
56 - ERROR_PID_NS="PID_NS is required for sandbox to work"
57 - ERROR_NET_NS="NET_NS is required for sandbox to work"
58 - ERROR_USER_NS="USER_NS is required for sandbox to work"
59 - ERROR_SECCOMP_FILTER="SECCOMP_FILTER is required for sandbox to work"
60 - # Warn if the kernel does not support features needed for the browser to work
61 - # (bug #552576, bug #556286).
62 - ERROR_ADVISE_SYSCALLS="CONFIG_ADVISE_SYSCALLS is required for the renderer (bug #552576)"
63 - ERROR_COMPAT_VDSO="CONFIG_COMPAT_VDSO causes segfaults (bug #556286)"
64 - CONFIG_CHECK="~PID_NS ~NET_NS ~SECCOMP_FILTER ~USER_NS ~ADVISE_SYSCALLS ~!COMPAT_VDSO"
65 - check_extra_config
66 - fi
67 -}
68 -
69 -# @ECLASS-VARIABLE: CHROMIUM_LANGS
70 -# @DEFAULT_UNSET
71 -# @DESCRIPTION:
72 -# List of language packs available for this package.
73 -
74 -_chromium_set_linguas_IUSE() {
75 - [[ ${EAPI:-0} == 0 ]] && die "EAPI=${EAPI} is not supported"
76 -
77 - local lang
78 - for lang in ${CHROMIUM_LANGS}; do
79 - # Default to enabled since we bundle them anyway.
80 - # USE-expansion will take care of disabling the langs the user has not
81 - # selected via LINGUAS.
82 - IUSE+=" +linguas_${lang}"
83 - done
84 -}
85 -
86 -if [[ ${CHROMIUM_LANGS} ]]; then
87 - _chromium_set_linguas_IUSE
88 -fi
89 -
90 -_chromium_crlang() {
91 - echo "${@/_/-}"
92 -}
93 -
94 -_chromium_syslang() {
95 - echo "${@/-/_}"
96 -}
97 -
98 -_chromium_strip_pak() {
99 - local x
100 - for x in "$@"; do
101 - echo "${x%.pak}"
102 - done
103 -}
104 -
105 -# @FUNCTION: chromium_remove_language_paks
106 -# @USAGE:
107 -# @DESCRIPTION:
108 -# Removes pak files from the current directory for languages that the user has
109 -# not selected via the LINGUAS variable.
110 -# Also performs QA checks to ensure CHROMIUM_LANGS has been set correctly.
111 -chromium_remove_language_paks() {
112 - local crlangs=$(_chromium_crlang ${CHROMIUM_LANGS})
113 - local present_crlangs=$(_chromium_strip_pak *.pak)
114 - local present_langs=$(_chromium_syslang ${present_crlangs})
115 - local lang
116 -
117 - # Look for missing pak files.
118 - for lang in ${crlangs}; do
119 - if ! has ${lang} ${present_crlangs}; then
120 - eqawarn "LINGUAS warning: no .pak file for ${lang} (${lang}.pak not found)"
121 - fi
122 - done
123 -
124 - # Look for extra pak files.
125 - # Remove pak files that the user does not want.
126 - for lang in ${present_langs}; do
127 - if [[ ${lang} == en_US ]]; then
128 - continue
129 - fi
130 - if ! has ${lang} ${CHROMIUM_LANGS}; then
131 - eqawarn "LINGUAS warning: no ${lang} in LANGS"
132 - continue
133 - fi
134 - if ! use linguas_${lang}; then
135 - rm "$(_chromium_crlang ${lang}).pak" || die
136 - fi
137 - done
138 -}
139 -
140 -chromium_pkg_preinst() {
141 - gnome2_icon_savelist
142 -}
143 -
144 -chromium_pkg_postinst() {
145 - fdo-mime_desktop_database_update
146 - gnome2_icon_cache_update
147 -
148 - # For more info see bug #292201, bug #352263, bug #361859.
149 - if ! has_version x11-themes/gnome-icon-theme &&
150 - ! has_version x11-themes/oxygen-icons ; then
151 - elog
152 - elog "Depending on your desktop environment, you may need"
153 - elog "to install additional packages to get icons on the Downloads page."
154 - elog
155 - elog "For KDE, the required package is kde-frameworks/oxygen-icons."
156 - elog
157 - elog "For other desktop environments, try one of the following:"
158 - elog " - x11-themes/gnome-icon-theme"
159 - elog " - x11-themes/tango-icon-theme"
160 - fi
161 -
162 - # For more info see bug #359153.
163 - elog
164 - elog "Some web pages may require additional fonts to display properly."
165 - elog "Try installing some of the following packages if some characters"
166 - elog "are not displayed properly:"
167 - elog " - media-fonts/arphicfonts"
168 - elog " - media-fonts/bitstream-cyberbit"
169 - elog " - media-fonts/droid"
170 - elog " - media-fonts/ipamonafont"
171 - elog " - media-fonts/ja-ipafonts"
172 - elog " - media-fonts/takao-fonts"
173 - elog " - media-fonts/wqy-microhei"
174 - elog " - media-fonts/wqy-zenhei"
175 -}
176 -
177 -chromium_pkg_postrm() {
178 - gnome2_icon_cache_update
179 -}
180 -
181 -chromium_pkg_die() {
182 - if [[ "${EBUILD_PHASE}" != "compile" ]]; then
183 - return
184 - fi
185 -
186 - # Prevent user problems like bug #348235.
187 - eshopts_push -s extglob
188 - if is-flagq '-g?(gdb)?([1-9])'; then
189 - ewarn
190 - ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
191 - ewarn "This produces very large build files causes the linker to consume large"
192 - ewarn "amounts of memory."
193 - ewarn
194 - ewarn "Please try removing -g{,gdb} before reporting a bug."
195 - ewarn
196 - fi
197 - eshopts_pop
198 -
199 - # ccache often causes bogus compile failures, especially when the cache gets
200 - # corrupted.
201 - if has ccache ${FEATURES}; then
202 - ewarn
203 - ewarn "You have enabled ccache. Please try disabling ccache"
204 - ewarn "before reporting a bug."
205 - ewarn
206 - fi
207 -
208 - # No ricer bugs.
209 - if use_if_iuse custom-cflags; then
210 - ewarn
211 - ewarn "You have enabled the custom-cflags USE flag."
212 - ewarn "Please disable it before reporting a bug."
213 - ewarn
214 - fi
215 -
216 - # If the system doesn't have enough memory, the compilation is known to
217 - # fail. Print info about memory to recognize this condition.
218 - einfo
219 - einfo "$(grep MemTotal /proc/meminfo)"
220 - einfo "$(grep SwapTotal /proc/meminfo)"
221 - einfo
222 -}
223 -
224 -# @VARIABLE: EGYP_CHROMIUM_COMMAND
225 -# @DESCRIPTION:
226 -# Path to the gyp_chromium script.
227 -: ${EGYP_CHROMIUM_COMMAND:=build/gyp_chromium}
228 -
229 -# @VARIABLE: EGYP_CHROMIUM_DEPTH
230 -# @DESCRIPTION:
231 -# Depth for egyp_chromium.
232 -: ${EGYP_CHROMIUM_DEPTH:=.}
233 -
234 -# @FUNCTION: egyp_chromium
235 -# @USAGE: [gyp arguments]
236 -# @DESCRIPTION:
237 -# Calls EGYP_CHROMIUM_COMMAND with depth EGYP_CHROMIUM_DEPTH and given
238 -# arguments. The full command line is echoed for logging.
239 -egyp_chromium() {
240 - set -- "${EGYP_CHROMIUM_COMMAND}" --depth="${EGYP_CHROMIUM_DEPTH}" "$@"
241 - echo "$@"
242 - "$@"
243 -}
244 -
245 -# @FUNCTION: gyp_use
246 -# @USAGE: <USE flag> [GYP flag] [true suffix] [false suffix]
247 -# @DESCRIPTION:
248 -# If USE flag is set, echo -D[GYP flag]=[true suffix].
249 -#
250 -# If USE flag is not set, echo -D[GYP flag]=[false suffix].
251 -#
252 -# [GYP flag] defaults to use_[USE flag] with hyphens converted to underscores.
253 -#
254 -# [true suffix] defaults to 1. [false suffix] defaults to 0.
255 -gyp_use() {
256 - local gypflag="-D${2:-use_${1//-/_}}="
257 - usex "$1" "${gypflag}" "${gypflag}" "${3-1}" "${4-0}"
258 -}
259 -
260 -# @FUNCTION: chromium_bundled_v8_version
261 -# @USAGE: [path to version.cc]
262 -# @DESCRIPTION:
263 -# Outputs the version of v8 parsed from a (bundled) copy of the source code.
264 -chromium_bundled_v8_version() {
265 - local vf=${1:-v8/src/version.cc}
266 - local major minor build patch
267 - major=$(sed -ne 's/#define MAJOR_VERSION *\([0-9]*\)/\1/p' "${vf}")
268 - minor=$(sed -ne 's/#define MINOR_VERSION *\([0-9]*\)/\1/p' "${vf}")
269 - build=$(sed -ne 's/#define BUILD_NUMBER *\([0-9]*\)/\1/p' "${vf}")
270 - patch=$(sed -ne 's/#define PATCH_LEVEL *\([0-9]*\)/\1/p' "${vf}")
271 - echo "${major}.${minor}.${build}.${patch}"
272 -}
273 -
274 -# @FUNCTION: chromium_installed_v8_version
275 -# @USAGE:
276 -# @DESCRIPTION:
277 -# Outputs the version of dev-lang/v8 currently installed on the host system.
278 -chromium_installed_v8_version() {
279 - local cpf=$(best_version dev-lang/v8)
280 - local pvr=${cpf#dev-lang/v8-}
281 - echo "${pvr%-r*}"
282 -}