| 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.92 2008/02/22 05:10:03 dberkholz Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.96 2008/04/30 17:37:42 dberkholz 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. |
| … | |
… | |
| 38 | fi |
38 | fi |
| 39 | |
39 | |
| 40 | IUSE="" |
40 | IUSE="" |
| 41 | HOMEPAGE="http://xorg.freedesktop.org/" |
41 | HOMEPAGE="http://xorg.freedesktop.org/" |
| 42 | |
42 | |
|
|
43 | if [[ -z ${SNAPSHOT} ]]; then |
| 43 | # @ECLASS-VARIABLE: SNAPSHOT |
44 | # @ECLASS-VARIABLE: SNAPSHOT |
| 44 | # @DESCRIPTION: |
45 | # @DESCRIPTION: |
| 45 | # If set to 'yes' and configure.ac exists, eautoreconf will run. Set |
46 | # If set to 'yes' and configure.ac exists, eautoreconf will run. Set |
| 46 | # before inheriting this eclass. |
47 | # before inheriting this eclass. |
| 47 | SNAPSHOT="no" |
48 | SNAPSHOT="no" |
|
|
49 | fi |
| 48 | |
50 | |
| 49 | if [[ ${PV} = 9999* ]]; then |
51 | if [[ ${PV} = 9999* ]]; then |
| 50 | GIT_ECLASS="git" |
52 | GIT_ECLASS="git" |
| 51 | SNAPSHOT="yes" |
53 | SNAPSHOT="yes" |
| 52 | SRC_URI="" |
54 | SRC_URI="" |
| … | |
… | |
| 61 | # x11-misc contains data and util, x11-themes contains data |
63 | # x11-misc contains data and util, x11-themes contains data |
| 62 | elif [[ ${CATEGORY} = x11-misc ]] || [[ ${CATEGORY} = x11-themes ]]; then |
64 | elif [[ ${CATEGORY} = x11-misc ]] || [[ ${CATEGORY} = x11-themes ]]; then |
| 63 | if [[ ${PN} == xbitmaps || ${PN} == xcursor-themes || ${PN} == xkbdata ]]; then |
65 | if [[ ${PN} == xbitmaps || ${PN} == xcursor-themes || ${PN} == xkbdata ]]; then |
| 64 | MODULE="data" |
66 | MODULE="data" |
| 65 | else |
67 | else |
| 66 | MODULE="data" |
68 | MODULE="util" |
| 67 | fi |
69 | fi |
| 68 | elif [[ ${CATEGORY} = x11-drivers ]]; then |
70 | elif [[ ${CATEGORY} = x11-drivers ]]; then |
| 69 | MODULE="driver" |
71 | MODULE="driver" |
| 70 | elif [[ ${CATEGORY} = media-fonts ]]; then |
72 | elif [[ ${CATEGORY} = media-fonts ]]; then |
| 71 | MODULE="font" |
73 | MODULE="font" |
| … | |
… | |
| 141 | |
143 | |
| 142 | # Set up configure option |
144 | # Set up configure option |
| 143 | FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\"" |
145 | FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\"" |
| 144 | |
146 | |
| 145 | if [[ -n "${FONT}" ]]; then |
147 | if [[ -n "${FONT}" ]]; then |
| 146 | if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]]; then |
148 | if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then |
| 147 | IUSE="${IUSE} nls" |
149 | IUSE="${IUSE} nls" |
| 148 | fi |
150 | fi |
| 149 | fi |
151 | fi |
| 150 | fi |
152 | fi |
| 151 | |
153 | |
| … | |
… | |
| 278 | # @VARIABLE: PATCHES |
280 | # @VARIABLE: PATCHES |
| 279 | # @DESCRIPTION: |
281 | # @DESCRIPTION: |
| 280 | # If you have any patches to apply, set PATCHES to their locations and epatch |
282 | # If you have any patches to apply, set PATCHES to their locations and epatch |
| 281 | # will apply them. It also handles epatch-style bulk patches, if you know how to |
283 | # will apply them. It also handles epatch-style bulk patches, if you know how to |
| 282 | # use them and set the correct variables. If you don't, read eutils.eclass. |
284 | # use them and set the correct variables. If you don't, read eutils.eclass. |
|
|
285 | if [[ ${#PATCHES[@]} -gt 1 ]]; then |
|
|
286 | for x in "${PATCHES[@]}"; do |
|
|
287 | epatch "${x}" |
|
|
288 | done |
| 283 | if [[ -n "${PATCHES}" ]] ; then |
289 | elif [[ -n "${PATCHES}" ]]; then |
| 284 | for PATCH in ${PATCHES} |
290 | for x in ${PATCHES}; do |
| 285 | do |
|
|
| 286 | epatch ${PATCH} |
291 | epatch "${x}" |
| 287 | done |
292 | done |
| 288 | # For non-default directory bulk patching |
293 | # For non-default directory bulk patching |
| 289 | elif [[ -n "${PATCH_LOC}" ]] ; then |
294 | elif [[ -n "${PATCH_LOC}" ]] ; then |
| 290 | epatch ${PATCH_LOC} |
295 | epatch ${PATCH_LOC} |
| 291 | # For standard bulk patching |
296 | # For standard bulk patching |