| 1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 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/x-modular.eclass,v 1.117 2009/11/28 10:25:37 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.118 2009/12/09 10:21:49 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # @ECLASS: x-modular.eclass |
5 | # @ECLASS: x-modular.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org |
7 | # Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org |
| 8 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
8 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
| … | |
… | |
| 65 | XDIR="/usr" |
65 | XDIR="/usr" |
| 66 | |
66 | |
| 67 | IUSE="" |
67 | IUSE="" |
| 68 | HOMEPAGE="http://xorg.freedesktop.org/" |
68 | HOMEPAGE="http://xorg.freedesktop.org/" |
| 69 | |
69 | |
| 70 | if [[ -z ${SNAPSHOT} ]]; then |
|
|
| 71 | # @ECLASS-VARIABLE: SNAPSHOT |
70 | # @ECLASS-VARIABLE: SNAPSHOT |
| 72 | # @DESCRIPTION: |
71 | # @DESCRIPTION: |
| 73 | # If set to 'yes' and configure.ac exists, eautoreconf will run. Set |
72 | # If set to 'yes' and configure.ac exists, eautoreconf will run. Set |
| 74 | # before inheriting this eclass. |
73 | # before inheriting this eclass. |
| 75 | SNAPSHOT="no" |
74 | : ${SNAPSHOT:=no} |
| 76 | fi |
|
|
| 77 | |
75 | |
| 78 | # Set up SRC_URI for individual modular releases |
76 | # Set up SRC_URI for individual modular releases |
| 79 | BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual" |
77 | BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual" |
| 80 | # @ECLASS-VARIABLE: MODULE |
78 | # @ECLASS-VARIABLE: MODULE |
| 81 | # @DESCRIPTION: |
79 | # @DESCRIPTION: |
| 82 | # The subdirectory to download source from. Possible settings are app, |
80 | # The subdirectory to download source from. Possible settings are app, |
| 83 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
81 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
| 84 | # inherit to override the default autoconfigured module. |
82 | # inherit to override the default autoconfigured module. |
| 85 | if [[ -z ${MODULE} ]]; then |
83 | if [[ -z ${MODULE} ]]; then |
| 86 | MODULE="" |
|
|
| 87 | case ${CATEGORY} in |
84 | case ${CATEGORY} in |
| 88 | app-doc) MODULE="doc" ;; |
85 | app-doc) MODULE="doc" ;; |
| 89 | media-fonts) MODULE="font" ;; |
86 | media-fonts) MODULE="font" ;; |
| 90 | x11-apps|x11-wm) MODULE="app" ;; |
87 | x11-apps|x11-wm) MODULE="app" ;; |
| 91 | x11-misc|x11-themes) MODULE="util" ;; |
88 | x11-misc|x11-themes) MODULE="util" ;; |
| … | |
… | |
| 128 | media-fonts/font-alias" |
125 | media-fonts/font-alias" |
| 129 | |
126 | |
| 130 | # Starting with 7.0RC3, we can specify the font directory |
127 | # Starting with 7.0RC3, we can specify the font directory |
| 131 | # But oddly, we can't do the same for encodings or font-alias |
128 | # But oddly, we can't do the same for encodings or font-alias |
| 132 | |
129 | |
| 133 | # Wrap in `if` so ebuilds can set it too |
|
|
| 134 | if [[ -z ${FONT_DIR} ]]; then |
|
|
| 135 | # @ECLASS-VARIABLE: FONT_DIR |
130 | # @ECLASS-VARIABLE: FONT_DIR |
| 136 | # @DESCRIPTION: |
131 | # @DESCRIPTION: |
| 137 | # If you're creating a font package and the suffix of PN is not equal to |
132 | # If you're creating a font package and the suffix of PN is not equal to |
| 138 | # the subdirectory of /usr/share/fonts/ it should install into, set |
133 | # the subdirectory of /usr/share/fonts/ it should install into, set |
| 139 | # FONT_DIR to that directory or directories. Set before inheriting this |
134 | # FONT_DIR to that directory or directories. Set before inheriting this |
| 140 | # eclass. |
135 | # eclass. |
| 141 | FONT_DIR=${PN##*-} |
136 | : ${FONT_DIR:=${PN##*-}} |
| 142 | |
|
|
| 143 | fi |
|
|
| 144 | |
137 | |
| 145 | # Fix case of font directories |
138 | # Fix case of font directories |
| 146 | FONT_DIR=${FONT_DIR/ttf/TTF} |
139 | FONT_DIR=${FONT_DIR/ttf/TTF} |
| 147 | FONT_DIR=${FONT_DIR/otf/OTF} |
140 | FONT_DIR=${FONT_DIR/otf/OTF} |
| 148 | FONT_DIR=${FONT_DIR/type1/Type1} |
141 | FONT_DIR=${FONT_DIR/type1/Type1} |
| … | |
… | |
| 393 | x-modular_font_configure |
386 | x-modular_font_configure |
| 394 | x-modular_debug_setup |
387 | x-modular_debug_setup |
| 395 | |
388 | |
| 396 | # @VARIABLE: CONFIGURE_OPTIONS |
389 | # @VARIABLE: CONFIGURE_OPTIONS |
| 397 | # @DESCRIPTION: |
390 | # @DESCRIPTION: |
| 398 | # Any options to pass to configure |
391 | # Any extra options to pass to configure |
| 399 | [[ -n ${CONFIGURE_OPTIONS} ]] |
|
|
| 400 | |
392 | |
| 401 | # If prefix isn't set here, .pc files cause problems |
393 | # If prefix isn't set here, .pc files cause problems |
| 402 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
394 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
| 403 | econf --prefix=${XDIR} \ |
395 | econf --prefix=${XDIR} \ |
| 404 | --datadir=${XDIR}/share \ |
396 | --datadir=${XDIR}/share \ |
| … | |
… | |
| 459 | if [[ -e ${S}/ChangeLog ]]; then |
451 | if [[ -e ${S}/ChangeLog ]]; then |
| 460 | dodoc "${S}"/ChangeLog |
452 | dodoc "${S}"/ChangeLog |
| 461 | fi |
453 | fi |
| 462 | # @VARIABLE: DOCS |
454 | # @VARIABLE: DOCS |
| 463 | # @DESCRIPTION: |
455 | # @DESCRIPTION: |
| 464 | # Any documentation to install |
456 | # Any documentation to install via dodoc |
| 465 | [[ -n ${DOCS} ]] && dodoc ${DOCS} |
457 | [[ -n ${DOCS} ]] && dodoc ${DOCS} |
| 466 | |
458 | |
| 467 | # Don't install libtool archives for server modules |
459 | # Don't install libtool archives for server modules |
| 468 | if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then |
460 | if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then |
| 469 | find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \ |
461 | find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \ |