| 1 | # Copyright 1999-2010 Gentoo Foundation |
1 | # Copyright 1999-2010 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/xorg-2.eclass,v 1.18 2010/11/01 12:37:58 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.22 2011/01/15 17:55:21 scarabeus Exp $ |
| 4 | # |
4 | # |
| 5 | # @ECLASS: xorg-2.eclass |
5 | # @ECLASS: xorg-2.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # x11@gentoo.org |
7 | # x11@gentoo.org |
| 8 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
8 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
| … | |
… | |
| 41 | inherit eutils base libtool multilib toolchain-funcs flag-o-matic autotools \ |
41 | inherit eutils base libtool multilib toolchain-funcs flag-o-matic autotools \ |
| 42 | ${FONT_ECLASS} ${GIT_ECLASS} |
42 | ${FONT_ECLASS} ${GIT_ECLASS} |
| 43 | |
43 | |
| 44 | EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" |
44 | EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" |
| 45 | case "${EAPI:-0}" in |
45 | case "${EAPI:-0}" in |
| 46 | 3) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; |
46 | 3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; |
| 47 | *) die "EAPI-UNSUPPORTED" ;; |
47 | *) die "EAPI-UNSUPPORTED" ;; |
| 48 | esac |
48 | esac |
| 49 | |
49 | |
| 50 | # exports must be ALWAYS after inherit |
50 | # exports must be ALWAYS after inherit |
| 51 | EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} |
51 | EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} |
| … | |
… | |
| 65 | # @DESCRIPTION: |
65 | # @DESCRIPTION: |
| 66 | # The subdirectory to download source from. Possible settings are app, |
66 | # The subdirectory to download source from. Possible settings are app, |
| 67 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
67 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
| 68 | # inherit to override the default autoconfigured module. |
68 | # inherit to override the default autoconfigured module. |
| 69 | if [[ -z ${MODULE} ]]; then |
69 | if [[ -z ${MODULE} ]]; then |
| 70 | MODULE="" |
|
|
| 71 | case ${CATEGORY} in |
70 | case ${CATEGORY} in |
| 72 | app-doc) MODULE="doc" ;; |
71 | app-doc) MODULE="doc" ;; |
| 73 | media-fonts) MODULE="font" ;; |
72 | media-fonts) MODULE="font" ;; |
| 74 | x11-apps|x11-wm) MODULE="app" ;; |
73 | x11-apps|x11-wm) MODULE="app" ;; |
| 75 | x11-misc|x11-themes) MODULE="util" ;; |
74 | x11-misc|x11-themes) MODULE="util" ;; |
| 76 | x11-drivers) MODULE="driver" ;; |
75 | x11-drivers) MODULE="driver" ;; |
| 77 | x11-base) MODULE="xserver" ;; |
76 | x11-base) MODULE="xserver" ;; |
| 78 | x11-proto) MODULE="proto" ;; |
77 | x11-proto) MODULE="proto" ;; |
| 79 | x11-libs) MODULE="lib" ;; |
78 | x11-libs) MODULE="lib" ;; |
|
|
79 | *) MODULE="" ;; |
| 80 | esac |
80 | esac |
| 81 | fi |
81 | fi |
| 82 | |
82 | |
|
|
83 | # @ECLASS-VARIABLE: PACKAGE_NAME |
|
|
84 | # @DESCRIPTION: |
|
|
85 | # For git checkout the git repository migth differ from package name. |
|
|
86 | # This variable can be used for proper directory specification |
|
|
87 | : ${PACKAGE_NAME:=${PN}} |
|
|
88 | |
| 83 | if [[ -n ${GIT_ECLASS} ]]; then |
89 | if [[ -n ${GIT_ECLASS} ]]; then |
| 84 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |
90 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PACKAGE_NAME}" |
| 85 | else |
91 | else |
| 86 | SRC_URI+=" ${BASE_INDIVIDUAL_URI}/${MODULE}/${P}.tar.bz2" |
92 | SRC_URI+=" ${BASE_INDIVIDUAL_URI}/${MODULE}/${P}.tar.bz2" |
| 87 | fi |
93 | fi |
| 88 | |
94 | |
| 89 | : ${SLOT:=0} |
95 | : ${SLOT:=0} |
| … | |
… | |
| 91 | # Set the license for the package. This can be overridden by setting |
97 | # Set the license for the package. This can be overridden by setting |
| 92 | # LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages |
98 | # LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages |
| 93 | # are under the MIT license. (This is what Red Hat does in their rpms) |
99 | # are under the MIT license. (This is what Red Hat does in their rpms) |
| 94 | : ${LICENSE:=MIT} |
100 | : ${LICENSE:=MIT} |
| 95 | |
101 | |
| 96 | # Set up shared dependencies |
102 | # Set up autotools shared dependencies |
| 97 | if [[ ${XORG_EAUTORECONF} != no ]]; then |
103 | # Remember that all versions here MUST be stable |
| 98 | DEPEND+=" |
104 | XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt" |
|
|
105 | EAUTORECONF_DEPEND+=" |
| 99 | >=sys-devel/libtool-2.2.6a |
106 | >=sys-devel/libtool-2.2.6a |
| 100 | sys-devel/m4" |
107 | sys-devel/m4" |
| 101 | # This MUST BE STABLE |
|
|
| 102 | if [[ ${PN} != util-macros ]] ; then |
108 | if [[ ${PN} != util-macros ]] ; then |
| 103 | DEPEND+=" >=x11-misc/util-macros-1.11.0" |
109 | EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.11.0" |
| 104 | # Required even by xorg-server |
110 | # Required even by xorg-server |
| 105 | [[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1" |
111 | [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.1.1-r1" |
| 106 | fi |
112 | fi |
| 107 | WANT_AUTOCONF="latest" |
113 | WANT_AUTOCONF="latest" |
| 108 | WANT_AUTOMAKE="latest" |
114 | WANT_AUTOMAKE="latest" |
| 109 | fi |
115 | for arch in ${XORG_EAUTORECONF_ARCHES}; do |
|
|
116 | EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )" |
|
|
117 | done |
|
|
118 | DEPEND+=" ${EAUTORECONF_DEPENDS}" |
|
|
119 | [[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}" |
|
|
120 | unset EAUTORECONF_DEPENDS |
|
|
121 | unset EAUTORECONF_DEPEND |
| 110 | |
122 | |
| 111 | if [[ ${FONT} == yes ]]; then |
123 | if [[ ${FONT} == yes ]]; then |
| 112 | RDEPEND+=" media-fonts/encodings |
124 | RDEPEND+=" media-fonts/encodings |
| 113 | x11-apps/mkfontscale |
125 | x11-apps/mkfontscale |
| 114 | x11-apps/mkfontdir" |
126 | x11-apps/mkfontdir" |
| … | |
… | |
| 168 | |
180 | |
| 169 | # @FUNCTION: xorg-2_pkg_setup |
181 | # @FUNCTION: xorg-2_pkg_setup |
| 170 | # @DESCRIPTION: |
182 | # @DESCRIPTION: |
| 171 | # Setup prefix compat |
183 | # Setup prefix compat |
| 172 | xorg-2_pkg_setup() { |
184 | xorg-2_pkg_setup() { |
|
|
185 | debug-print-function ${FUNCNAME} "$@" |
|
|
186 | |
| 173 | [[ ${FONT} == yes ]] && font_pkg_setup |
187 | [[ ${FONT} == yes ]] && font_pkg_setup "$@" |
| 174 | } |
188 | } |
| 175 | |
189 | |
| 176 | # @FUNCTION: xorg-2_src_unpack |
190 | # @FUNCTION: xorg-2_src_unpack |
| 177 | # @DESCRIPTION: |
191 | # @DESCRIPTION: |
| 178 | # Simply unpack source code. |
192 | # Simply unpack source code. |
| 179 | xorg-2_src_unpack() { |
193 | xorg-2_src_unpack() { |
|
|
194 | debug-print-function ${FUNCNAME} "$@" |
|
|
195 | |
| 180 | if [[ -n ${GIT_ECLASS} ]]; then |
196 | if [[ -n ${GIT_ECLASS} ]]; then |
| 181 | git_src_unpack |
197 | git_src_unpack |
| 182 | else |
198 | else |
| 183 | unpack ${A} |
199 | unpack ${A} |
| 184 | fi |
200 | fi |
| … | |
… | |
| 188 | |
204 | |
| 189 | # @FUNCTION: xorg-2_patch_source |
205 | # @FUNCTION: xorg-2_patch_source |
| 190 | # @DESCRIPTION: |
206 | # @DESCRIPTION: |
| 191 | # Apply all patches |
207 | # Apply all patches |
| 192 | xorg-2_patch_source() { |
208 | xorg-2_patch_source() { |
|
|
209 | debug-print-function ${FUNCNAME} "$@" |
|
|
210 | |
| 193 | # Use standardized names and locations with bulk patching |
211 | # Use standardized names and locations with bulk patching |
| 194 | # Patch directory is ${WORKDIR}/patch |
212 | # Patch directory is ${WORKDIR}/patch |
| 195 | # See epatch() in eutils.eclass for more documentation |
213 | # See epatch() in eutils.eclass for more documentation |
| 196 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
214 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
| 197 | |
215 | |
| 198 | [[ -d "${EPATCH_SOURCE}" ]] && epatch |
216 | [[ -d "${EPATCH_SOURCE}" ]] && epatch |
| 199 | base_src_prepare |
217 | base_src_prepare "$@" |
| 200 | } |
218 | } |
| 201 | |
219 | |
| 202 | # @FUNCTION: xorg-2_reconf_source |
220 | # @FUNCTION: xorg-2_reconf_source |
| 203 | # @DESCRIPTION: |
221 | # @DESCRIPTION: |
| 204 | # Run eautoreconf if necessary, and run elibtoolize. |
222 | # Run eautoreconf if necessary, and run elibtoolize. |
| 205 | xorg-2_reconf_source() { |
223 | xorg-2_reconf_source() { |
|
|
224 | debug-print-function ${FUNCNAME} "$@" |
|
|
225 | |
| 206 | case ${CHOST} in |
226 | case ${CHOST} in |
| 207 | *-interix* | *-aix* | *-winnt*) |
227 | *-interix* | *-aix* | *-winnt*) |
| 208 | # some hosts need full eautoreconf |
228 | # some hosts need full eautoreconf |
| 209 | [[ -e "./configure.ac" || -e "./configure.in" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail." |
229 | [[ -e "./configure.ac" || -e "./configure.in" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail." |
| 210 | ;; |
230 | ;; |
| … | |
… | |
| 217 | |
237 | |
| 218 | # @FUNCTION: xorg-2_src_prepare |
238 | # @FUNCTION: xorg-2_src_prepare |
| 219 | # @DESCRIPTION: |
239 | # @DESCRIPTION: |
| 220 | # Prepare a package after unpacking, performing all X-related tasks. |
240 | # Prepare a package after unpacking, performing all X-related tasks. |
| 221 | xorg-2_src_prepare() { |
241 | xorg-2_src_prepare() { |
|
|
242 | debug-print-function ${FUNCNAME} "$@" |
|
|
243 | |
| 222 | [[ -n ${GIT_ECLASS} ]] && git_src_prepare |
244 | [[ -n ${GIT_ECLASS} ]] && git_src_prepare |
| 223 | xorg-2_patch_source |
245 | xorg-2_patch_source |
| 224 | xorg-2_reconf_source |
246 | xorg-2_reconf_source |
| 225 | } |
247 | } |
| 226 | |
248 | |
| 227 | # @FUNCTION: xorg-2_font_configure |
249 | # @FUNCTION: xorg-2_font_configure |
| 228 | # @DESCRIPTION: |
250 | # @DESCRIPTION: |
| 229 | # If a font package, perform any necessary configuration steps |
251 | # If a font package, perform any necessary configuration steps |
| 230 | xorg-2_font_configure() { |
252 | xorg-2_font_configure() { |
|
|
253 | debug-print-function ${FUNCNAME} "$@" |
|
|
254 | |
| 231 | if has nls ${IUSE//+} && ! use nls; then |
255 | if has nls ${IUSE//+} && ! use nls; then |
| 232 | FONT_OPTIONS+=" |
256 | FONT_OPTIONS+=" |
| 233 | --disable-iso8859-2 |
257 | --disable-iso8859-2 |
| 234 | --disable-iso8859-3 |
258 | --disable-iso8859-3 |
| 235 | --disable-iso8859-4 |
259 | --disable-iso8859-4 |
| … | |
… | |
| 252 | |
276 | |
| 253 | # @FUNCTION: xorg-2_flags_setup |
277 | # @FUNCTION: xorg-2_flags_setup |
| 254 | # @DESCRIPTION: |
278 | # @DESCRIPTION: |
| 255 | # Set up CFLAGS for a debug build |
279 | # Set up CFLAGS for a debug build |
| 256 | xorg-2_flags_setup() { |
280 | xorg-2_flags_setup() { |
|
|
281 | debug-print-function ${FUNCNAME} "$@" |
|
|
282 | |
| 257 | # Win32 require special define |
283 | # Win32 require special define |
| 258 | [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ |
284 | [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ |
| 259 | # hardened ldflags |
285 | # hardened ldflags |
| 260 | [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy |
286 | [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy |
| 261 | |
287 | |
| … | |
… | |
| 269 | |
295 | |
| 270 | # @FUNCTION: xorg-2_src_configure |
296 | # @FUNCTION: xorg-2_src_configure |
| 271 | # @DESCRIPTION: |
297 | # @DESCRIPTION: |
| 272 | # Perform any necessary pre-configuration steps, then run configure |
298 | # Perform any necessary pre-configuration steps, then run configure |
| 273 | xorg-2_src_configure() { |
299 | xorg-2_src_configure() { |
|
|
300 | debug-print-function ${FUNCNAME} "$@" |
| 274 | local myopts="" |
301 | local myopts="" |
| 275 | |
302 | |
| 276 | xorg-2_flags_setup |
303 | xorg-2_flags_setup |
| 277 | [[ -n "${FONT}" ]] && xorg-2_font_configure |
304 | [[ -n "${FONT}" ]] && xorg-2_font_configure |
| 278 | |
305 | |
| … | |
… | |
| 284 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
311 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
| 285 | if has static-libs ${IUSE//+}; then |
312 | if has static-libs ${IUSE//+}; then |
| 286 | myopts+=" $(use_enable static-libs static)" |
313 | myopts+=" $(use_enable static-libs static)" |
| 287 | fi |
314 | fi |
| 288 | econf \ |
315 | econf \ |
|
|
316 | --disable-dependency-tracking \ |
| 289 | ${FONT_OPTIONS} \ |
317 | ${FONT_OPTIONS} \ |
| 290 | ${CONFIGURE_OPTIONS} \ |
318 | ${CONFIGURE_OPTIONS} \ |
| 291 | ${myopts} |
319 | ${myopts} |
| 292 | fi |
320 | fi |
| 293 | } |
321 | } |
| 294 | |
322 | |
| 295 | # @FUNCTION: xorg-2_src_compile |
323 | # @FUNCTION: xorg-2_src_compile |
| 296 | # @DESCRIPTION: |
324 | # @DESCRIPTION: |
| 297 | # Compile a package, performing all X-related tasks. |
325 | # Compile a package, performing all X-related tasks. |
| 298 | xorg-2_src_compile() { |
326 | xorg-2_src_compile() { |
|
|
327 | debug-print-function ${FUNCNAME} "$@" |
|
|
328 | |
| 299 | base_src_compile |
329 | base_src_compile "$@" |
| 300 | } |
330 | } |
| 301 | |
331 | |
| 302 | # @FUNCTION: xorg-2_src_install |
332 | # @FUNCTION: xorg-2_src_install |
| 303 | # @DESCRIPTION: |
333 | # @DESCRIPTION: |
| 304 | # Install a built package to ${D}, performing any necessary steps. |
334 | # Install a built package to ${D}, performing any necessary steps. |
| 305 | # Creates a ChangeLog from git if using live ebuilds. |
335 | # Creates a ChangeLog from git if using live ebuilds. |
| 306 | xorg-2_src_install() { |
336 | xorg-2_src_install() { |
|
|
337 | debug-print-function ${FUNCNAME} "$@" |
|
|
338 | |
| 307 | if [[ ${CATEGORY} == x11-proto ]]; then |
339 | if [[ ${CATEGORY} == x11-proto ]]; then |
| 308 | emake \ |
340 | emake \ |
| 309 | ${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \ |
341 | ${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \ |
| 310 | docdir=${EPREFIX}/usr/share/doc/${PF} \ |
342 | docdir=${EPREFIX}/usr/share/doc/${PF} \ |
| 311 | DESTDIR="${D}" \ |
343 | DESTDIR="${D}" \ |
| … | |
… | |
| 322 | git log ${EGIT_COMMIT} > "${S}"/ChangeLog |
354 | git log ${EGIT_COMMIT} > "${S}"/ChangeLog |
| 323 | popd > /dev/null |
355 | popd > /dev/null |
| 324 | fi |
356 | fi |
| 325 | |
357 | |
| 326 | if [[ -e "${S}"/ChangeLog ]]; then |
358 | if [[ -e "${S}"/ChangeLog ]]; then |
| 327 | dodoc "${S}"/ChangeLog |
359 | dodoc "${S}"/ChangeLog || die "dodoc failed" |
| 328 | fi |
360 | fi |
| 329 | # @VARIABLE: DOCS |
361 | # @VARIABLE: DOCS |
| 330 | # @DESCRIPTION: |
362 | # @DESCRIPTION: |
| 331 | # Any documentation to install |
363 | # Any documentation to install |
| 332 | # @DEFAULT_UNSET |
364 | # @DEFAULT_UNSET |
| … | |
… | |
| 346 | # @FUNCTION: xorg-2_pkg_postinst |
378 | # @FUNCTION: xorg-2_pkg_postinst |
| 347 | # @DESCRIPTION: |
379 | # @DESCRIPTION: |
| 348 | # Run X-specific post-installation tasks on the live filesystem. The |
380 | # Run X-specific post-installation tasks on the live filesystem. The |
| 349 | # only task right now is some setup for font packages. |
381 | # only task right now is some setup for font packages. |
| 350 | xorg-2_pkg_postinst() { |
382 | xorg-2_pkg_postinst() { |
|
|
383 | debug-print-function ${FUNCNAME} "$@" |
|
|
384 | |
| 351 | [[ -n ${FONT} ]] && setup_fonts |
385 | [[ -n ${FONT} ]] && setup_fonts "$@" |
| 352 | } |
386 | } |
| 353 | |
387 | |
| 354 | # @FUNCTION: xorg-2_pkg_postrm |
388 | # @FUNCTION: xorg-2_pkg_postrm |
| 355 | # @DESCRIPTION: |
389 | # @DESCRIPTION: |
| 356 | # Run X-specific post-removal tasks on the live filesystem. The only |
390 | # Run X-specific post-removal tasks on the live filesystem. The only |
| 357 | # task right now is some cleanup for font packages. |
391 | # task right now is some cleanup for font packages. |
| 358 | xorg-2_pkg_postrm() { |
392 | xorg-2_pkg_postrm() { |
| 359 | if [[ -n ${FONT} ]]; then |
393 | debug-print-function ${FUNCNAME} "$@" |
| 360 | font_pkg_postrm |
394 | |
| 361 | fi |
395 | [[ -n ${FONT} ]] && font_pkg_postrm "$@" |
| 362 | } |
396 | } |
| 363 | |
397 | |
| 364 | # @FUNCTION: setup_fonts |
398 | # @FUNCTION: setup_fonts |
| 365 | # @DESCRIPTION: |
399 | # @DESCRIPTION: |
| 366 | # Generates needed files for fonts and fixes font permissions |
400 | # Generates needed files for fonts and fixes font permissions |
| 367 | setup_fonts() { |
401 | setup_fonts() { |
|
|
402 | debug-print-function ${FUNCNAME} "$@" |
|
|
403 | |
| 368 | create_fonts_scale |
404 | create_fonts_scale |
| 369 | create_fonts_dir |
405 | create_fonts_dir |
| 370 | font_pkg_postinst |
406 | font_pkg_postinst |
| 371 | } |
407 | } |
| 372 | |
408 | |
| 373 | # @FUNCTION: remove_font_metadata |
409 | # @FUNCTION: remove_font_metadata |
| 374 | # @DESCRIPTION: |
410 | # @DESCRIPTION: |
| 375 | # Don't let the package install generated font files that may overlap |
411 | # Don't let the package install generated font files that may overlap |
| 376 | # with other packages. Instead, they're generated in pkg_postinst(). |
412 | # with other packages. Instead, they're generated in pkg_postinst(). |
| 377 | remove_font_metadata() { |
413 | remove_font_metadata() { |
|
|
414 | debug-print-function ${FUNCNAME} "$@" |
|
|
415 | |
| 378 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
416 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
| 379 | einfo "Removing font metadata" |
417 | einfo "Removing font metadata" |
| 380 | rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} |
418 | rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} |
| 381 | fi |
419 | fi |
| 382 | } |
420 | } |
| 383 | |
421 | |
| 384 | # @FUNCTION: create_fonts_scale |
422 | # @FUNCTION: create_fonts_scale |
| 385 | # @DESCRIPTION: |
423 | # @DESCRIPTION: |
| 386 | # Create fonts.scale file, used by the old server-side fonts subsystem. |
424 | # Create fonts.scale file, used by the old server-side fonts subsystem. |
| 387 | create_fonts_scale() { |
425 | create_fonts_scale() { |
|
|
426 | debug-print-function ${FUNCNAME} "$@" |
|
|
427 | |
| 388 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
428 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
| 389 | ebegin "Generating font.scale" |
429 | ebegin "Generating font.scale" |
| 390 | mkfontscale \ |
430 | mkfontscale \ |
| 391 | -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ |
431 | -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ |
| 392 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
432 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
| … | |
… | |
| 396 | |
436 | |
| 397 | # @FUNCTION: create_fonts_dir |
437 | # @FUNCTION: create_fonts_dir |
| 398 | # @DESCRIPTION: |
438 | # @DESCRIPTION: |
| 399 | # Create fonts.dir file, used by the old server-side fonts subsystem. |
439 | # Create fonts.dir file, used by the old server-side fonts subsystem. |
| 400 | create_fonts_dir() { |
440 | create_fonts_dir() { |
|
|
441 | debug-print-function ${FUNCNAME} "$@" |
|
|
442 | |
| 401 | ebegin "Generating fonts.dir" |
443 | ebegin "Generating fonts.dir" |
| 402 | mkfontdir \ |
444 | mkfontdir \ |
| 403 | -e "${EROOT}"/usr/share/fonts/encodings \ |
445 | -e "${EROOT}"/usr/share/fonts/encodings \ |
| 404 | -e "${EROOT}"/usr/share/fonts/encodings/large \ |
446 | -e "${EROOT}"/usr/share/fonts/encodings/large \ |
| 405 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
447 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |