1 |
commit: 406f2ddec626ca257c5e0f3baba6c1b258d945cd |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 20:26:40 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 20:27:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406f2dde |
7 |
|
8 |
xorg-2.eclass: Remove last-rited eclass |
9 |
|
10 |
Closes: https://bugs.gentoo.org/778818 |
11 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
12 |
|
13 |
eclass/xorg-2.eclass | 567 --------------------------------------------------- |
14 |
1 file changed, 567 deletions(-) |
15 |
|
16 |
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass |
17 |
deleted file mode 100644 |
18 |
index e6ec80523ae..00000000000 |
19 |
--- a/eclass/xorg-2.eclass |
20 |
+++ /dev/null |
21 |
@@ -1,567 +0,0 @@ |
22 |
-# Copyright 1999-2021 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-# @DEAD |
26 |
-# @ECLASS: xorg-2.eclass |
27 |
-# @MAINTAINER: |
28 |
-# x11@g.o |
29 |
-# @AUTHOR: |
30 |
-# Author: Tomáš Chvátal <scarabeus@g.o> |
31 |
-# Author: Donnie Berkholz <dberkholz@g.o> |
32 |
-# @SUPPORTED_EAPIS: 4 5 |
33 |
-# @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
34 |
-# @DEPRECATED: xorg-3.eclass |
35 |
-# @DESCRIPTION: |
36 |
-# This eclass makes trivial X ebuilds possible for apps, fonts, drivers, |
37 |
-# and more. Many things that would normally be done in various functions |
38 |
-# can be accessed by setting variables instead, such as patching, |
39 |
-# running eautoreconf, passing options to configure and installing docs. |
40 |
-# |
41 |
-# All you need to do in a basic ebuild is inherit this eclass and set |
42 |
-# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted |
43 |
-# with the other X packages, you don't need to set SRC_URI. Pretty much |
44 |
-# everything else should be automatic. |
45 |
- |
46 |
-GIT_ECLASS="" |
47 |
-if [[ ${PV} == *9999* ]]; then |
48 |
- GIT_ECLASS="git-r3" |
49 |
- XORG_EAUTORECONF="yes" |
50 |
-fi |
51 |
- |
52 |
-# If we're a font package, but not the font.alias one |
53 |
-FONT_ECLASS="" |
54 |
-if [[ ${CATEGORY} = media-fonts ]]; then |
55 |
- case ${PN} in |
56 |
- font-alias|font-util) |
57 |
- ;; |
58 |
- font*) |
59 |
- # Activate font code in the rest of the eclass |
60 |
- FONT="yes" |
61 |
- FONT_ECLASS="font" |
62 |
- ;; |
63 |
- esac |
64 |
-fi |
65 |
- |
66 |
-# @ECLASS-VARIABLE: XORG_MULTILIB |
67 |
-# @PRE_INHERIT |
68 |
-# @DESCRIPTION: |
69 |
-# If set to 'yes', the multilib support for package will be enabled. Set |
70 |
-# before inheriting this eclass. |
71 |
-: ${XORG_MULTILIB:="no"} |
72 |
- |
73 |
-# we need to inherit autotools first to get the deps |
74 |
-inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \ |
75 |
- flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS} |
76 |
- |
77 |
-if [[ ${XORG_MULTILIB} == yes ]]; then |
78 |
- inherit autotools-multilib |
79 |
-fi |
80 |
- |
81 |
-EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" |
82 |
-case "${EAPI:-0}" in |
83 |
- 4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; |
84 |
- *) die "EAPI=${EAPI} is not supported" ;; |
85 |
-esac |
86 |
- |
87 |
-# exports must be ALWAYS after inherit |
88 |
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} |
89 |
- |
90 |
-IUSE="" |
91 |
- |
92 |
-# @ECLASS-VARIABLE: XORG_EAUTORECONF |
93 |
-# @PRE_INHERIT |
94 |
-# @DESCRIPTION: |
95 |
-# If set to 'yes' and configure.ac exists, eautoreconf will run. Set |
96 |
-# before inheriting this eclass. |
97 |
-: ${XORG_EAUTORECONF:="no"} |
98 |
- |
99 |
-# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI |
100 |
-# @PRE_INHERIT |
101 |
-# @DESCRIPTION: |
102 |
-# Set up SRC_URI for individual modular releases. If set to an empty |
103 |
-# string, no SRC_URI will be provided by the eclass. |
104 |
-: ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"} |
105 |
- |
106 |
-# @ECLASS-VARIABLE: XORG_MODULE |
107 |
-# @PRE_INHERIT |
108 |
-# @DESCRIPTION: |
109 |
-# The subdirectory to download source from. Possible settings are app, |
110 |
-# doc, data, util, driver, font, lib, proto, xserver. Set above the |
111 |
-# inherit to override the default autoconfigured module. |
112 |
-: ${XORG_MODULE:="auto"} |
113 |
-if [[ ${XORG_MODULE} == auto ]]; then |
114 |
- case ${CATEGORY} in |
115 |
- app-doc) XORG_MODULE=doc/ ;; |
116 |
- media-fonts) XORG_MODULE=font/ ;; |
117 |
- x11-apps|x11-wm) XORG_MODULE=app/ ;; |
118 |
- x11-misc|x11-themes) XORG_MODULE=util/ ;; |
119 |
- x11-base) XORG_MODULE=xserver/ ;; |
120 |
- x11-drivers) XORG_MODULE=driver/ ;; |
121 |
- x11-libs) XORG_MODULE=lib/ ;; |
122 |
- *) XORG_MODULE= ;; |
123 |
- esac |
124 |
-fi |
125 |
- |
126 |
-# @ECLASS-VARIABLE: XORG_PACKAGE_NAME |
127 |
-# @PRE_INHERIT |
128 |
-# @DESCRIPTION: |
129 |
-# For git checkout the git repository might differ from package name. |
130 |
-# This variable can be used for proper directory specification |
131 |
-: ${XORG_PACKAGE_NAME:=${PN}} |
132 |
- |
133 |
-HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" |
134 |
- |
135 |
-if [[ -n ${GIT_ECLASS} ]]; then |
136 |
- : ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"} |
137 |
-elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then |
138 |
- SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" |
139 |
-fi |
140 |
- |
141 |
-: ${SLOT:=0} |
142 |
- |
143 |
-# Set the license for the package. This can be overridden by setting |
144 |
-# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages |
145 |
-# are under the MIT license. (This is what Red Hat does in their rpms) |
146 |
-: ${LICENSE:=MIT} |
147 |
- |
148 |
-# Set up autotools shared dependencies |
149 |
-# Remember that all versions here MUST be stable |
150 |
-XORG_EAUTORECONF_ARCHES="x86-winnt" |
151 |
-EAUTORECONF_DEPEND+=" |
152 |
- >=sys-devel/libtool-2.2.6a |
153 |
- sys-devel/m4" |
154 |
-if [[ ${PN} != util-macros ]] ; then |
155 |
- EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18" |
156 |
- # Required even by xorg-server |
157 |
- [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" |
158 |
-fi |
159 |
-WANT_AUTOCONF="latest" |
160 |
-WANT_AUTOMAKE="latest" |
161 |
-for arch in ${XORG_EAUTORECONF_ARCHES}; do |
162 |
- EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )" |
163 |
-done |
164 |
-DEPEND+=" ${EAUTORECONF_DEPENDS}" |
165 |
-[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}" |
166 |
-unset EAUTORECONF_DEPENDS |
167 |
-unset EAUTORECONF_DEPEND |
168 |
- |
169 |
-if [[ ${FONT} == yes ]]; then |
170 |
- RDEPEND+=" media-fonts/encodings |
171 |
- >=x11-apps/mkfontscale-1.2.0" |
172 |
- PDEPEND+=" media-fonts/font-alias" |
173 |
- DEPEND+=" >=media-fonts/font-util-1.2.0 |
174 |
- >=x11-apps/mkfontscale-1.2.0" |
175 |
- |
176 |
- # @ECLASS-VARIABLE: FONT_DIR |
177 |
- # @PRE_INHERIT |
178 |
- # @DESCRIPTION: |
179 |
- # If you're creating a font package and the suffix of PN is not equal to |
180 |
- # the subdirectory of /usr/share/fonts/ it should install into, set |
181 |
- # FONT_DIR to that directory or directories. Set before inheriting this |
182 |
- # eclass. |
183 |
- [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-} |
184 |
- |
185 |
- # Fix case of font directories |
186 |
- FONT_DIR=${FONT_DIR/ttf/TTF} |
187 |
- FONT_DIR=${FONT_DIR/otf/OTF} |
188 |
- FONT_DIR=${FONT_DIR/type1/Type1} |
189 |
- FONT_DIR=${FONT_DIR/speedo/Speedo} |
190 |
- |
191 |
- # Set up configure options, wrapped so ebuilds can override if need be |
192 |
- [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\"" |
193 |
- |
194 |
- [[ ${PN} = font-misc-misc || ${PN} = font-schumacher-misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls" |
195 |
-fi |
196 |
- |
197 |
-# If we're a driver package, then enable DRIVER case |
198 |
-[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes" |
199 |
- |
200 |
-DEPEND+=" virtual/pkgconfig" |
201 |
- |
202 |
-# @ECLASS-VARIABLE: XORG_DRI |
203 |
-# @DESCRIPTION: |
204 |
-# Possible values are "always" or the value of the useflag DRI capabilities |
205 |
-# are required for. Default value is "no" |
206 |
-# |
207 |
-# Eg. XORG_DRI="opengl" will pull all dri dependant deps for opengl useflag |
208 |
-: ${XORG_DRI:="no"} |
209 |
- |
210 |
-DRI_COMMON_DEPEND=" |
211 |
- x11-base/xorg-server[-minimal] |
212 |
- x11-libs/libdrm |
213 |
-" |
214 |
-case ${XORG_DRI} in |
215 |
- no) |
216 |
- ;; |
217 |
- always) |
218 |
- COMMON_DEPEND+=" ${DRI_COMMON_DEPEND}" |
219 |
- ;; |
220 |
- *) |
221 |
- COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )" |
222 |
- IUSE+=" ${XORG_DRI}" |
223 |
- ;; |
224 |
-esac |
225 |
-unset DRI_COMMON_DEPEND |
226 |
- |
227 |
-if [[ -n "${DRIVER}" ]]; then |
228 |
- COMMON_DEPEND+=" |
229 |
- x11-base/xorg-server[xorg] |
230 |
- " |
231 |
-fi |
232 |
-if [[ -n "${DRIVER}" && ${PN} == xf86-input-* ]]; then |
233 |
- DEPEND+=" x11-base/xorg-proto" |
234 |
-fi |
235 |
-if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then |
236 |
- COMMON_DEPEND+=" |
237 |
- x11-libs/libpciaccess |
238 |
- " |
239 |
- DEPEND+=" x11-base/xorg-proto" |
240 |
-fi |
241 |
- |
242 |
-# @ECLASS-VARIABLE: XORG_DOC |
243 |
-# @DESCRIPTION: |
244 |
-# Possible values are "always" or the value of the useflag doc packages |
245 |
-# are required for. Default value is "no" |
246 |
-# |
247 |
-# Eg. XORG_DOC="manual" will pull all doc dependant deps for manual useflag |
248 |
-: ${XORG_DOC:="no"} |
249 |
- |
250 |
-DOC_DEPEND=" |
251 |
- doc? ( |
252 |
- || ( app-text/asciidoc dev-ruby/asciidoctor ) |
253 |
- app-text/xmlto |
254 |
- app-doc/doxygen |
255 |
- app-text/docbook-xml-dtd:4.1.2 |
256 |
- app-text/docbook-xml-dtd:4.2 |
257 |
- app-text/docbook-xml-dtd:4.3 |
258 |
- ) |
259 |
-" |
260 |
-case ${XORG_DOC} in |
261 |
- no) |
262 |
- ;; |
263 |
- always) |
264 |
- DEPEND+=" ${DOC_DEPEND}" |
265 |
- ;; |
266 |
- *) |
267 |
- DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )" |
268 |
- IUSE+=" ${XORG_DOC}" |
269 |
- ;; |
270 |
-esac |
271 |
-unset DOC_DEPEND |
272 |
- |
273 |
-if [[ ${DRIVER} == yes ]]; then |
274 |
- case ${EAPI} in |
275 |
- 4) |
276 |
- ;; |
277 |
- *) |
278 |
- RDEPEND+=" x11-base/xorg-server:=" |
279 |
- ;; |
280 |
- esac |
281 |
-fi |
282 |
- |
283 |
-DEPEND+=" ${COMMON_DEPEND}" |
284 |
-RDEPEND+=" ${COMMON_DEPEND}" |
285 |
-unset COMMON_DEPEND |
286 |
- |
287 |
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}" |
288 |
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}" |
289 |
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}" |
290 |
- |
291 |
-# @FUNCTION: xorg-2_pkg_setup |
292 |
-# @DESCRIPTION: |
293 |
-# Setup prefix compat |
294 |
-xorg-2_pkg_setup() { |
295 |
- debug-print-function ${FUNCNAME} "$@" |
296 |
- |
297 |
- [[ ${FONT} == yes ]] && font_pkg_setup "$@" |
298 |
-} |
299 |
- |
300 |
-# @FUNCTION: xorg-2_src_unpack |
301 |
-# @DESCRIPTION: |
302 |
-# Simply unpack source code. |
303 |
-xorg-2_src_unpack() { |
304 |
- debug-print-function ${FUNCNAME} "$@" |
305 |
- |
306 |
- if [[ -n ${GIT_ECLASS} ]]; then |
307 |
- git-r3_src_unpack |
308 |
- else |
309 |
- unpack ${A} |
310 |
- fi |
311 |
- |
312 |
- [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}" |
313 |
-} |
314 |
- |
315 |
-# @FUNCTION: xorg-2_patch_source |
316 |
-# @DESCRIPTION: |
317 |
-# Apply all patches |
318 |
-xorg-2_patch_source() { |
319 |
- debug-print-function ${FUNCNAME} "$@" |
320 |
- |
321 |
- # Use standardized names and locations with bulk patching |
322 |
- # Patch directory is ${WORKDIR}/patch |
323 |
- # See epatch() in eutils.eclass for more documentation |
324 |
- EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
325 |
- |
326 |
- [[ -d "${EPATCH_SOURCE}" ]] && epatch |
327 |
-} |
328 |
- |
329 |
-# @FUNCTION: xorg-2_reconf_source |
330 |
-# @DESCRIPTION: |
331 |
-# Run eautoreconf if necessary, and run elibtoolize. |
332 |
-xorg-2_reconf_source() { |
333 |
- debug-print-function ${FUNCNAME} "$@" |
334 |
- |
335 |
- case ${CHOST} in |
336 |
- *-aix* | *-winnt*) |
337 |
- # some hosts need full eautoreconf |
338 |
- [[ -e "./configure.ac" || -e "./configure.in" ]] \ |
339 |
- && AUTOTOOLS_AUTORECONF=1 |
340 |
- ;; |
341 |
- *) |
342 |
- # elibtoolize required for BSD |
343 |
- [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] \ |
344 |
- && AUTOTOOLS_AUTORECONF=1 |
345 |
- ;; |
346 |
- esac |
347 |
-} |
348 |
- |
349 |
-# @FUNCTION: xorg-2_src_prepare |
350 |
-# @DESCRIPTION: |
351 |
-# Prepare a package after unpacking, performing all X-related tasks. |
352 |
-xorg-2_src_prepare() { |
353 |
- debug-print-function ${FUNCNAME} "$@" |
354 |
- |
355 |
- xorg-2_patch_source |
356 |
- xorg-2_reconf_source |
357 |
- autotools-utils_src_prepare "$@" |
358 |
-} |
359 |
- |
360 |
-# @FUNCTION: xorg-2_font_configure |
361 |
-# @DESCRIPTION: |
362 |
-# If a font package, perform any necessary configuration steps |
363 |
-xorg-2_font_configure() { |
364 |
- debug-print-function ${FUNCNAME} "$@" |
365 |
- |
366 |
- if has nls ${IUSE//+} && ! use nls; then |
367 |
- if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then |
368 |
- FONT_OPTIONS+=" |
369 |
- --disable-all-encodings |
370 |
- --enable-iso8859-1" |
371 |
- else |
372 |
- FONT_OPTIONS+=" |
373 |
- --disable-iso8859-2 |
374 |
- --disable-iso8859-3 |
375 |
- --disable-iso8859-4 |
376 |
- --disable-iso8859-5 |
377 |
- --disable-iso8859-6 |
378 |
- --disable-iso8859-7 |
379 |
- --disable-iso8859-8 |
380 |
- --disable-iso8859-9 |
381 |
- --disable-iso8859-10 |
382 |
- --disable-iso8859-11 |
383 |
- --disable-iso8859-12 |
384 |
- --disable-iso8859-13 |
385 |
- --disable-iso8859-14 |
386 |
- --disable-iso8859-15 |
387 |
- --disable-iso8859-16 |
388 |
- --disable-jisx0201 |
389 |
- --disable-koi8-r" |
390 |
- fi |
391 |
- fi |
392 |
-} |
393 |
- |
394 |
-# @FUNCTION: xorg-2_flags_setup |
395 |
-# @DESCRIPTION: |
396 |
-# Set up CFLAGS for a debug build |
397 |
-xorg-2_flags_setup() { |
398 |
- debug-print-function ${FUNCNAME} "$@" |
399 |
- |
400 |
- # Win32 require special define |
401 |
- [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ |
402 |
- # hardened ldflags |
403 |
- [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy |
404 |
- |
405 |
- # Quite few libraries fail on runtime without these: |
406 |
- if has static-libs ${IUSE//+}; then |
407 |
- filter-flags -Wl,-Bdirect |
408 |
- filter-ldflags -Bdirect |
409 |
- filter-ldflags -Wl,-Bdirect |
410 |
- fi |
411 |
-} |
412 |
- |
413 |
-# @FUNCTION: xorg-2_src_configure |
414 |
-# @DESCRIPTION: |
415 |
-# Perform any necessary pre-configuration steps, then run configure |
416 |
-xorg-2_src_configure() { |
417 |
- debug-print-function ${FUNCNAME} "$@" |
418 |
- |
419 |
- xorg-2_flags_setup |
420 |
- |
421 |
- # @VARIABLE: XORG_CONFIGURE_OPTIONS |
422 |
- # @DESCRIPTION: |
423 |
- # Array of an additional options to pass to configure. |
424 |
- # @DEFAULT_UNSET |
425 |
- if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then |
426 |
- # fallback to CONFIGURE_OPTIONS, deprecated. |
427 |
- if [[ -n "${CONFIGURE_OPTIONS}" ]]; then |
428 |
- eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS" |
429 |
- eqawarn "to preserve namespace." |
430 |
- fi |
431 |
- |
432 |
- local xorgconfadd=(${CONFIGURE_OPTIONS} ${XORG_CONFIGURE_OPTIONS}) |
433 |
- else |
434 |
- local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") |
435 |
- fi |
436 |
- |
437 |
- [[ -n "${FONT}" ]] && xorg-2_font_configure |
438 |
- |
439 |
- # Check if package supports disabling of dep tracking |
440 |
- # Fixes warnings like: |
441 |
- # WARNING: unrecognized options: --disable-dependency-tracking |
442 |
- if grep -q -s "disable-depencency-tracking" ${ECONF_SOURCE:-.}/configure; then |
443 |
- local dep_track="--disable-dependency-tracking" |
444 |
- fi |
445 |
- |
446 |
- # Check if package supports disabling of selective -Werror=... |
447 |
- if grep -q -s "disable-selective-werror" ${ECONF_SOURCE:-.}/configure; then |
448 |
- local selective_werror="--disable-selective-werror" |
449 |
- fi |
450 |
- |
451 |
- # Check if package supports disabling of static libraries |
452 |
- if grep -q -s "able-static" ${ECONF_SOURCE:-.}/configure; then |
453 |
- local no_static="--disable-static" |
454 |
- fi |
455 |
- |
456 |
- local myeconfargs=( |
457 |
- ${dep_track} |
458 |
- ${selective_werror} |
459 |
- ${no_static} |
460 |
- ${FONT_OPTIONS} |
461 |
- "${xorgconfadd[@]}" |
462 |
- ) |
463 |
- |
464 |
- if [[ ${XORG_MULTILIB} == yes ]]; then |
465 |
- autotools-multilib_src_configure "$@" |
466 |
- else |
467 |
- autotools-utils_src_configure "$@" |
468 |
- fi |
469 |
-} |
470 |
- |
471 |
-# @FUNCTION: xorg-2_src_compile |
472 |
-# @DESCRIPTION: |
473 |
-# Compile a package, performing all X-related tasks. |
474 |
-xorg-2_src_compile() { |
475 |
- debug-print-function ${FUNCNAME} "$@" |
476 |
- |
477 |
- if [[ ${XORG_MULTILIB} == yes ]]; then |
478 |
- autotools-multilib_src_compile "$@" |
479 |
- else |
480 |
- autotools-utils_src_compile "$@" |
481 |
- fi |
482 |
-} |
483 |
- |
484 |
-# @FUNCTION: xorg-2_src_install |
485 |
-# @DESCRIPTION: |
486 |
-# Install a built package to ${D}, performing any necessary steps. |
487 |
-# Creates a ChangeLog from git if using live ebuilds. |
488 |
-xorg-2_src_install() { |
489 |
- debug-print-function ${FUNCNAME} "$@" |
490 |
- |
491 |
- local install_args=( docdir="${EPREFIX}/usr/share/doc/${PF}" ) |
492 |
- |
493 |
- if [[ ${XORG_MULTILIB} == yes ]]; then |
494 |
- autotools-multilib_src_install "${install_args[@]}" |
495 |
- else |
496 |
- autotools-utils_src_install "${install_args[@]}" |
497 |
- fi |
498 |
- |
499 |
- if [[ -n ${GIT_ECLASS} ]]; then |
500 |
- pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null || die |
501 |
- git log ${EGIT_COMMIT} > "${S}"/ChangeLog |
502 |
- popd > /dev/null || die |
503 |
- fi |
504 |
- |
505 |
- if [[ -e "${S}"/ChangeLog ]]; then |
506 |
- dodoc "${S}"/ChangeLog || die "dodoc failed" |
507 |
- fi |
508 |
- |
509 |
- # Don't install libtool archives (even for modules) |
510 |
- find "${D}" -type f -name '*.la' -delete || die |
511 |
- |
512 |
- [[ -n ${FONT} ]] && remove_font_metadata |
513 |
-} |
514 |
- |
515 |
-# @FUNCTION: xorg-2_pkg_postinst |
516 |
-# @DESCRIPTION: |
517 |
-# Run X-specific post-installation tasks on the live filesystem. The |
518 |
-# only task right now is some setup for font packages. |
519 |
-xorg-2_pkg_postinst() { |
520 |
- debug-print-function ${FUNCNAME} "$@" |
521 |
- |
522 |
- if [[ -n ${FONT} ]]; then |
523 |
- create_fonts_scale |
524 |
- create_fonts_dir |
525 |
- font_pkg_postinst "$@" |
526 |
- |
527 |
- ewarn "Installed fonts changed. Run 'xset fp rehash' if you are using non-fontconfig applications." |
528 |
- fi |
529 |
-} |
530 |
- |
531 |
-# @FUNCTION: xorg-2_pkg_postrm |
532 |
-# @DESCRIPTION: |
533 |
-# Run X-specific post-removal tasks on the live filesystem. The only |
534 |
-# task right now is some cleanup for font packages. |
535 |
-xorg-2_pkg_postrm() { |
536 |
- debug-print-function ${FUNCNAME} "$@" |
537 |
- |
538 |
- if [[ -n ${FONT} ]]; then |
539 |
- # if we're doing an upgrade, postinst will do |
540 |
- if [[ -z ${REPLACED_BY_VERSION} ]]; then |
541 |
- create_fonts_scale |
542 |
- create_fonts_dir |
543 |
- font_pkg_postrm "$@" |
544 |
- fi |
545 |
- fi |
546 |
-} |
547 |
- |
548 |
-# @FUNCTION: remove_font_metadata |
549 |
-# @DESCRIPTION: |
550 |
-# Don't let the package install generated font files that may overlap |
551 |
-# with other packages. Instead, they're generated in pkg_postinst(). |
552 |
-remove_font_metadata() { |
553 |
- debug-print-function ${FUNCNAME} "$@" |
554 |
- |
555 |
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
556 |
- einfo "Removing font metadata" |
557 |
- rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} |
558 |
- fi |
559 |
-} |
560 |
- |
561 |
-# @FUNCTION: create_fonts_scale |
562 |
-# @DESCRIPTION: |
563 |
-# Create fonts.scale file, used by the old server-side fonts subsystem. |
564 |
-create_fonts_scale() { |
565 |
- debug-print-function ${FUNCNAME} "$@" |
566 |
- |
567 |
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
568 |
- ebegin "Generating fonts.scale" |
569 |
- mkfontscale \ |
570 |
- -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ |
571 |
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
572 |
- eend $? |
573 |
- fi |
574 |
-} |
575 |
- |
576 |
-# @FUNCTION: create_fonts_dir |
577 |
-# @DESCRIPTION: |
578 |
-# Create fonts.dir file, used by the old server-side fonts subsystem. |
579 |
-create_fonts_dir() { |
580 |
- debug-print-function ${FUNCNAME} "$@" |
581 |
- |
582 |
- ebegin "Generating fonts.dir" |
583 |
- mkfontdir \ |
584 |
- -e "${EROOT}"/usr/share/fonts/encodings \ |
585 |
- -e "${EROOT}"/usr/share/fonts/encodings/large \ |
586 |
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
587 |
- eend $? |
588 |
-} |