Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 29 Jan 2018 07:10:52
Message-Id: 1517209639.2fb466d07fe55ef21a2d96e6bbea93deadd2ae06.ulm@gentoo
1 commit: 2fb466d07fe55ef21a2d96e6bbea93deadd2ae06
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 29 07:07:19 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 29 07:07:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fb466d0
7
8 x-modular.eclass: Delete unused eclass.
9
10 Closes: https://bugs.gentoo.org/551912
11
12 eclass/x-modular.eclass | 622 ------------------------------------------------
13 1 file changed, 622 deletions(-)
14
15 diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass
16 deleted file mode 100644
17 index 7c5ea3fbd90..00000000000
18 --- a/eclass/x-modular.eclass
19 +++ /dev/null
20 @@ -1,622 +0,0 @@
21 -# Copyright 1999-2017 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -# @DEAD
25 -# Removal on 2018-02-01.
26 -#
27 -# DEPRECATED
28 -# This eclass has been superseded by xorg-2
29 -# Please modify your ebuilds to use that instead
30 -#
31 -# @ECLASS: x-modular.eclass
32 -# @MAINTAINER:
33 -# x11@g.o
34 -# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
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 -if [[ ${PV} = 9999* ]]; then
47 - GIT_ECLASS="git"
48 - SNAPSHOT="yes"
49 - SRC_URI=""
50 -fi
51 -
52 -# If we're a font package, but not the font.alias one
53 -FONT_ECLASS=""
54 -if [[ "${PN/#font-}" != "${PN}" ]] \
55 - && [[ "${CATEGORY}" = "media-fonts" ]] \
56 - && [[ "${PN}" != "font-alias" ]] \
57 - && [[ "${PN}" != "font-util" ]]; then
58 - # Activate font code in the rest of the eclass
59 - FONT="yes"
60 -
61 - # Whether to inherit the font eclass
62 - FONT_ECLASS="font"
63 -fi
64 -
65 -inherit eutils libtool multilib toolchain-funcs flag-o-matic autotools \
66 - ${FONT_ECLASS} ${GIT_ECLASS}
67 -
68 -EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm"
69 -
70 -case "${EAPI:-0}" in
71 - 0|1)
72 - ;;
73 - 2)
74 - EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure"
75 - ;;
76 - *)
77 - die "Unknown EAPI ${EAPI}"
78 - ;;
79 -esac
80 -
81 -# exports must be ALWAYS after inherit
82 -EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
83 -
84 -# @ECLASS-VARIABLE: XDIR
85 -# @DESCRIPTION:
86 -# Directory prefix to use for everything. If you want to install to a
87 -# non-default prefix (e.g., /opt/xorg), change XDIR. This has not been
88 -# recently tested. You may need to uncomment the setting of datadir and
89 -# mandir in x-modular_src_install() or add it back in if it's no longer
90 -# there. You may also want to change the SLOT.
91 -XDIR="/usr"
92 -
93 -IUSE=""
94 -HOMEPAGE="https://www.x.org/wiki/"
95 -
96 -# @ECLASS-VARIABLE: SNAPSHOT
97 -# @DESCRIPTION:
98 -# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
99 -# before inheriting this eclass.
100 -: ${SNAPSHOT:=no}
101 -
102 -# Set up SRC_URI for individual modular releases
103 -BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"
104 -# @ECLASS-VARIABLE: MODULE
105 -# @DESCRIPTION:
106 -# The subdirectory to download source from. Possible settings are app,
107 -# doc, data, util, driver, font, lib, proto, xserver. Set above the
108 -# inherit to override the default autoconfigured module.
109 -if [[ -z ${MODULE} ]]; then
110 - case ${CATEGORY} in
111 - app-doc) MODULE="doc" ;;
112 - media-fonts) MODULE="font" ;;
113 - x11-apps|x11-wm) MODULE="app" ;;
114 - x11-misc|x11-themes) MODULE="util" ;;
115 - x11-drivers) MODULE="driver" ;;
116 - x11-base) MODULE="xserver" ;;
117 - x11-proto) MODULE="proto" ;;
118 - x11-libs) MODULE="lib" ;;
119 - esac
120 -fi
121 -
122 -if [[ -n ${GIT_ECLASS} ]]; then
123 - EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}.git"
124 -else
125 - SRC_URI="${SRC_URI} ${BASE_INDIVIDUAL_URI}/${MODULE}/${P}.tar.bz2"
126 -fi
127 -
128 -SLOT="0"
129 -
130 -# Set the license for the package. This can be overridden by setting
131 -# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
132 -# are under the MIT license. (This is what Red Hat does in their rpms)
133 -LICENSE="MIT"
134 -
135 -# Set up shared dependencies
136 -if [[ -n "${SNAPSHOT}" ]]; then
137 -# FIXME: What's the minimal libtool version supporting arbitrary versioning?
138 - DEPEND="${DEPEND}
139 - >=sys-devel/libtool-1.5
140 - >=sys-devel/m4-1.4"
141 - WANT_AUTOCONF="latest"
142 - WANT_AUTOMAKE="latest"
143 -fi
144 -
145 -if [[ -n "${FONT}" ]]; then
146 - RDEPEND="${RDEPEND}
147 - media-fonts/encodings
148 - x11-apps/mkfontscale
149 - x11-apps/mkfontdir"
150 - PDEPEND="${PDEPEND}
151 - media-fonts/font-alias"
152 -
153 - # Starting with 7.0RC3, we can specify the font directory
154 - # But oddly, we can't do the same for encodings or font-alias
155 -
156 -# @ECLASS-VARIABLE: FONT_DIR
157 -# @DESCRIPTION:
158 -# If you're creating a font package and the suffix of PN is not equal to
159 -# the subdirectory of /usr/share/fonts/ it should install into, set
160 -# FONT_DIR to that directory or directories. Set before inheriting this
161 -# eclass.
162 - : ${FONT_DIR:=${PN##*-}}
163 -
164 - # Fix case of font directories
165 - FONT_DIR=${FONT_DIR/ttf/TTF}
166 - FONT_DIR=${FONT_DIR/otf/OTF}
167 - FONT_DIR=${FONT_DIR/type1/Type1}
168 - FONT_DIR=${FONT_DIR/speedo/Speedo}
169 -
170 - # Set up configure options, wrapped so ebuilds can override if need be
171 - if [[ -z ${FONT_OPTIONS} ]]; then
172 - FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\""
173 - fi
174 -
175 - if [[ -n "${FONT}" ]]; then
176 - if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then
177 - IUSE="${IUSE} nls"
178 - fi
179 - fi
180 -fi
181 -
182 -# If we're a driver package
183 -if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then
184 - # Enable driver code in the rest of the eclass
185 - DRIVER="yes"
186 -fi
187 -
188 -# Debugging -- ignore packages that can't be built with debugging
189 -if [[ -z "${FONT}" ]] \
190 - && [[ "${CATEGORY/app-doc}" = "${CATEGORY}" ]] \
191 - && [[ "${CATEGORY/x11-proto}" = "${CATEGORY}" ]] \
192 - && [[ "${PN/util-macros}" = "${PN}" ]] \
193 - && [[ "${PN/xbitmaps}" = "${PN}" ]] \
194 - && [[ "${PN/xkbdata}" = "${PN}" ]] \
195 - && [[ "${PN/xorg-cf-files}" = "${PN}" ]] \
196 - && [[ "${PN/xcursor}" = "${PN}" ]] \
197 - ; then
198 - DEBUGGABLE="yes"
199 - IUSE="${IUSE} debug"
200 -fi
201 -
202 -DEPEND="${DEPEND}
203 - virtual/pkgconfig"
204 -
205 -if [[ "${PN/util-macros}" = "${PN}" ]]; then
206 - DEPEND="${DEPEND}
207 - >=x11-misc/util-macros-1.3.0"
208 -fi
209 -
210 -RDEPEND="${RDEPEND}
211 - !<=x11-base/xorg-x11-6.9"
212 -# Provides virtual/x11 for temporary use until packages are ported
213 -# x11-base/x11-env"
214 -
215 -# @FUNCTION: x-modular_specs_check
216 -# @USAGE:
217 -# @DESCRIPTION:
218 -# Make any necessary changes related to gcc specs (generally hardened)
219 -x-modular_specs_check() {
220 - if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then
221 - append-ldflags -Wl,-z,lazy
222 - # (#116698) breaks loading
223 - filter-ldflags -Wl,-z,now
224 - fi
225 -}
226 -
227 -# @FUNCTION: x-modular_dri_check
228 -# @USAGE:
229 -# @DESCRIPTION:
230 -# Ensures the server supports DRI if building a driver with DRI support
231 -x-modular_dri_check() {
232 - # (#120057) Enabling DRI in drivers requires that the server was built with
233 - # support for it
234 - # Starting with xorg-server 1.5.3, DRI support is always enabled unless
235 - # USE=minimal is set (see bug #252084)
236 - if [[ -n "${DRIVER}" ]]; then
237 - if has dri ${IUSE} && use dri; then
238 - einfo "Checking for direct rendering capabilities ..."
239 - if has_version '>=x11-base/xorg-server-1.5.3'; then
240 - if built_with_use x11-base/xorg-server minimal; then
241 - die "You must build x11-base/xorg-server with USE=-minimal."
242 - fi
243 - else
244 - if ! built_with_use x11-base/xorg-server dri; then
245 - die "You must build x11-base/xorg-server with USE=dri."
246 - fi
247 - fi
248 - fi
249 - fi
250 -}
251 -
252 -# @FUNCTION: x-modular_server_supports_drivers_check
253 -# @USAGE:
254 -# @DESCRIPTION:
255 -# Ensures the server SDK is installed if a driver is being built
256 -x-modular_server_supports_drivers_check() {
257 - # (#135873) Only certain servers will actually use or be capable of
258 - # building external drivers, including binary drivers.
259 - if [[ -n "${DRIVER}" ]]; then
260 - if has_version '>=x11-base/xorg-server-1.1'; then
261 - if ! built_with_use x11-base/xorg-server xorg; then
262 - eerror "x11-base/xorg-server is not built with support for external drivers."
263 - die "You must build x11-base/xorg-server with USE=xorg."
264 - fi
265 - fi
266 - fi
267 -}
268 -
269 -# @FUNCTION: x-modular_unpack_source
270 -# @USAGE:
271 -# @DESCRIPTION:
272 -# Simply unpack source code. Nothing else.
273 -x-modular_unpack_source() {
274 - if [[ -n ${GIT_ECLASS} ]]; then
275 - git_src_unpack
276 - else
277 - unpack ${A}
278 - fi
279 - cd "${S}"
280 -
281 - if [[ -n ${FONT_OPTIONS} ]]; then
282 - einfo "Detected font directory: ${FONT_DIR}"
283 - fi
284 -}
285 -
286 -# @FUNCTION: x-modular_patch_source
287 -# @USAGE:
288 -# @DESCRIPTION:
289 -# Apply all patches
290 -x-modular_patch_source() {
291 - # Use standardized names and locations with bulk patching
292 - # Patch directory is ${WORKDIR}/patch
293 - # See epatch() in eutils.eclass for more documentation
294 - if [[ -z "${EPATCH_SUFFIX}" ]] ; then
295 - EPATCH_SUFFIX="patch"
296 - fi
297 -
298 -# @VARIABLE: PATCHES
299 -# @DESCRIPTION:
300 -# If you have any patches to apply, set PATCHES to their locations and epatch
301 -# will apply them. It also handles epatch-style bulk patches, if you know how to
302 -# use them and set the correct variables. If you don't, read eutils.eclass.
303 - if [[ ${#PATCHES[@]} -gt 1 ]]; then
304 - for x in "${PATCHES[@]}"; do
305 - epatch "${x}"
306 - done
307 - elif [[ -n "${PATCHES}" ]]; then
308 - for x in ${PATCHES}; do
309 - epatch "${x}"
310 - done
311 - # For non-default directory bulk patching
312 - elif [[ -n "${PATCH_LOC}" ]] ; then
313 - epatch ${PATCH_LOC}
314 - # For standard bulk patching
315 - elif [[ -d "${EPATCH_SOURCE}" ]] ; then
316 - epatch
317 - fi
318 -}
319 -
320 -# @FUNCTION: x-modular_reconf_source
321 -# @USAGE:
322 -# @DESCRIPTION:
323 -# Run eautoreconf if necessary, and run elibtoolize.
324 -x-modular_reconf_source() {
325 - if [[ "${SNAPSHOT}" = "yes" ]]
326 - then
327 - # If possible, generate configure if it doesn't exist
328 - if [ -f "./configure.ac" ]
329 - then
330 - eautoreconf
331 - fi
332 - fi
333 -
334 - # Joshua Baergen - October 23, 2005
335 - # Fix shared lib issues on MIPS, FBSD, etc etc
336 - elibtoolize
337 -}
338 -
339 -# @FUNCTION: x-modular_src_prepare
340 -# @USAGE:
341 -# @DESCRIPTION:
342 -# Prepare a package after unpacking, performing all X-related tasks.
343 -x-modular_src_prepare() {
344 - [[ -n ${GIT_ECLASS} ]] && has src_prepare ${EXPORTED_FUNCTIONS} \
345 - && git_src_prepare
346 - x-modular_patch_source
347 - x-modular_reconf_source
348 -}
349 -
350 -# @FUNCTION: x-modular_src_unpack
351 -# @USAGE:
352 -# @DESCRIPTION:
353 -# Unpack a package, performing all X-related tasks.
354 -x-modular_src_unpack() {
355 - x-modular_specs_check
356 - x-modular_server_supports_drivers_check
357 - x-modular_dri_check
358 - x-modular_unpack_source
359 - has src_prepare ${EXPORTED_FUNCTIONS} || x-modular_src_prepare
360 -}
361 -
362 -# @FUNCTION: x-modular_font_configure
363 -# @USAGE:
364 -# @DESCRIPTION:
365 -# If a font package, perform any necessary configuration steps
366 -x-modular_font_configure() {
367 - if [[ -n "${FONT}" ]]; then
368 - # Might be worth adding an option to configure your desired font
369 - # and exclude all others. Also, should this USE be nls or minimal?
370 - if has nls ${IUSE//+} && ! use nls; then
371 - FONT_OPTIONS="${FONT_OPTIONS}
372 - --disable-iso8859-2
373 - --disable-iso8859-3
374 - --disable-iso8859-4
375 - --disable-iso8859-5
376 - --disable-iso8859-6
377 - --disable-iso8859-7
378 - --disable-iso8859-8
379 - --disable-iso8859-9
380 - --disable-iso8859-10
381 - --disable-iso8859-11
382 - --disable-iso8859-12
383 - --disable-iso8859-13
384 - --disable-iso8859-14
385 - --disable-iso8859-15
386 - --disable-iso8859-16
387 - --disable-jisx0201
388 - --disable-koi8-r"
389 - fi
390 - fi
391 -}
392 -
393 -# @FUNCTION: x-modular_debug_setup
394 -# @USAGE:
395 -# @DESCRIPTION:
396 -# Set up CFLAGS for a debug build
397 -x-modular_debug_setup() {
398 - if [[ -n "${DEBUGGABLE}" ]]; then
399 - if use debug; then
400 - strip-flags
401 - append-flags -g
402 - fi
403 - fi
404 -}
405 -
406 -# @FUNCTION: x-modular_src_configure
407 -# @USAGE:
408 -# @DESCRIPTION:
409 -# Perform any necessary pre-configuration steps, then run configure
410 -x-modular_src_configure() {
411 - x-modular_font_configure
412 - x-modular_debug_setup
413 -
414 -# @VARIABLE: CONFIGURE_OPTIONS
415 -# @DESCRIPTION:
416 -# Any extra options to pass to configure
417 -
418 - # If prefix isn't set here, .pc files cause problems
419 - if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
420 - econf --prefix=${XDIR} \
421 - --datadir=${XDIR}/share \
422 - ${FONT_OPTIONS} \
423 - ${DRIVER_OPTIONS} \
424 - ${CONFIGURE_OPTIONS}
425 - fi
426 -}
427 -
428 -# @FUNCTION: x-modular_src_make
429 -# @USAGE:
430 -# @DESCRIPTION:
431 -# Run make.
432 -x-modular_src_make() {
433 - emake || die "emake failed"
434 -}
435 -
436 -# @FUNCTION: x-modular_src_compile
437 -# @USAGE:
438 -# @DESCRIPTION:
439 -# Compile a package, performing all X-related tasks.
440 -x-modular_src_compile() {
441 - has src_configure ${EXPORTED_FUNCTIONS} || x-modular_src_configure
442 - x-modular_src_make
443 -}
444 -
445 -# @FUNCTION: x-modular_src_install
446 -# @USAGE:
447 -# @DESCRIPTION:
448 -# Install a built package to ${D}, performing any necessary steps.
449 -# Creates a ChangeLog from git if using live ebuilds.
450 -x-modular_src_install() {
451 - # Install everything to ${XDIR}
452 - if [[ ${CATEGORY} = x11-proto ]]; then
453 - make \
454 - ${PN/proto/}docdir=/usr/share/doc/${PF} \
455 - DESTDIR="${D}" \
456 - install \
457 - || die
458 - else
459 - make \
460 - docdir=/usr/share/doc/${PF} \
461 - DESTDIR="${D}" \
462 - install \
463 - || die
464 - fi
465 -# Shouldn't be necessary in XDIR=/usr
466 -# einstall forces datadir, so we need to re-force it
467 -# datadir=${XDIR}/share \
468 -# mandir=${XDIR}/share/man \
469 -
470 - if [[ -n ${GIT_ECLASS} ]]; then
471 - pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
472 - git log ${GIT_TREE} > "${S}"/ChangeLog
473 - popd
474 - fi
475 -
476 - if [[ -e ${S}/ChangeLog ]]; then
477 - dodoc "${S}"/ChangeLog
478 - fi
479 -# @VARIABLE: DOCS
480 -# @DESCRIPTION:
481 -# Any documentation to install via dodoc
482 - [[ -n ${DOCS} ]] && dodoc ${DOCS}
483 -
484 - # Don't install libtool archives for server modules
485 - if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
486 - find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
487 - | xargs rm -f
488 - fi
489 -
490 - if [[ -n "${FONT}" ]]; then
491 - remove_font_metadata
492 - fi
493 -
494 - if [[ -n "${DRIVER}" ]]; then
495 - install_driver_hwdata
496 - fi
497 -}
498 -
499 -# @FUNCTION: x-modular_pkg_preinst
500 -# @USAGE:
501 -# @DESCRIPTION:
502 -# This function doesn't do anything right now, but it may in the future.
503 -x-modular_pkg_preinst() {
504 - # We no longer do anything here, but we can't remove it from the API
505 - :
506 -}
507 -
508 -# @FUNCTION: x-modular_pkg_postinst
509 -# @USAGE:
510 -# @DESCRIPTION:
511 -# Run X-specific post-installation tasks on the live filesystem. The
512 -# only task right now is some setup for font packages.
513 -x-modular_pkg_postinst() {
514 - if [[ -n "${FONT}" ]]; then
515 - setup_fonts
516 - fi
517 -}
518 -
519 -# @FUNCTION: x-modular_pkg_postrm
520 -# @USAGE:
521 -# @DESCRIPTION:
522 -# Run X-specific post-removal tasks on the live filesystem. The only
523 -# task right now is some cleanup for font packages.
524 -x-modular_pkg_postrm() {
525 - if [[ -n "${FONT}" ]]; then
526 - font_pkg_postrm
527 - fi
528 -}
529 -
530 -# @FUNCTION: setup_fonts
531 -# @USAGE:
532 -# @DESCRIPTION:
533 -# Generates needed files for fonts and fixes font permissions
534 -setup_fonts() {
535 - if [[ ! -n "${FONT_DIR}" ]]; then
536 - msg="FONT_DIR is empty. The ebuild should set it to at least one subdir of /usr/share/fonts."
537 - eerror "${msg}"
538 - die "${msg}"
539 - fi
540 -
541 - create_fonts_scale
542 - create_fonts_dir
543 - create_font_cache
544 -}
545 -
546 -# @FUNCTION: remove_font_metadata
547 -# @USAGE:
548 -# @DESCRIPTION:
549 -# Don't let the package install generated font files that may overlap
550 -# with other packages. Instead, they're generated in pkg_postinst().
551 -remove_font_metadata() {
552 - local DIR
553 - for DIR in ${FONT_DIR}; do
554 - if [[ "${DIR}" != "Speedo" ]] && \
555 - [[ "${DIR}" != "CID" ]] ; then
556 - # Delete font metadata files
557 - # fonts.scale, fonts.dir, fonts.cache-1
558 - rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
559 - fi
560 - done
561 -}
562 -
563 -# @FUNCTION: install_driver_hwdata
564 -# @USAGE:
565 -# @DESCRIPTION:
566 -# Installs device-to-driver mappings for system-config-display and
567 -# anything else that uses hwdata.
568 -install_driver_hwdata() {
569 - insinto /usr/share/hwdata/videoaliases
570 - for i in "${FILESDIR}"/*.xinf; do
571 - # We need this for the case when none exist,
572 - # so *.xinf doesn't expand
573 - if [[ -e $i ]]; then
574 - doins $i
575 - fi
576 - done
577 -}
578 -
579 -# @FUNCTION: discover_font_dirs
580 -# @USAGE:
581 -# @DESCRIPTION:
582 -# Deprecated. Sets up the now-unused FONT_DIRS variable.
583 -discover_font_dirs() {
584 - FONT_DIRS="${FONT_DIR}"
585 -}
586 -
587 -# @FUNCTION: create_fonts_scale
588 -# @USAGE:
589 -# @DESCRIPTION:
590 -# Create fonts.scale file, used by the old server-side fonts subsystem.
591 -create_fonts_scale() {
592 - ebegin "Creating fonts.scale files"
593 - local x
594 - for DIR in ${FONT_DIR}; do
595 - x=${ROOT}/usr/share/fonts/${DIR}
596 - [[ -z "$(ls ${x}/)" ]] && continue
597 - [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
598 -
599 - # Only generate .scale files if truetype, opentype or type1
600 - # fonts are present ...
601 -
602 - # NOTE: There is no way to regenerate Speedo/CID fonts.scale
603 - # <dberkholz@g.o> 2 August 2004
604 - if [[ "${x/encodings}" = "${x}" ]] \
605 - && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
606 - mkfontscale \
607 - -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
608 - -- ${x}
609 - fi
610 - done
611 - eend 0
612 -}
613 -
614 -# @FUNCTION: create_fonts_dir
615 -# @USAGE:
616 -# @DESCRIPTION:
617 -# Create fonts.dir file, used by the old server-side fonts subsystem.
618 -create_fonts_dir() {
619 - ebegin "Generating fonts.dir files"
620 - for DIR in ${FONT_DIR}; do
621 - x=${ROOT}/usr/share/fonts/${DIR}
622 - [[ -z "$(ls ${x}/)" ]] && continue
623 - [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
624 -
625 - if [[ "${x/encodings}" = "${x}" ]]; then
626 - mkfontdir \
627 - -e "${ROOT}"/usr/share/fonts/encodings \
628 - -e "${ROOT}"/usr/share/fonts/encodings/large \
629 - -- ${x}
630 - fi
631 - done
632 - eend 0
633 -}
634 -
635 -# @FUNCTION: create_font_cache
636 -# @USAGE:
637 -# @DESCRIPTION:
638 -# Create fonts.cache-1 files, used by the new client-side fonts
639 -# subsystem.
640 -create_font_cache() {
641 - font_pkg_postinst
642 -}