| 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.97 2008/05/09 07:18:19 dberkholz Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.101 2008/06/13 16:40:21 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. |
| … | |
… | |
| 43 | SRC_URI="" |
43 | SRC_URI="" |
| 44 | fi |
44 | fi |
| 45 | |
45 | |
| 46 | # Set up SRC_URI for individual modular releases |
46 | # Set up SRC_URI for individual modular releases |
| 47 | BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual" |
47 | BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual" |
| 48 | if [[ ${CATEGORY} = x11-apps ]] || [[ ${CATEGORY} = x11-wm ]]; then |
48 | # @ECLASS-VARIABLE: MODULE |
|
|
49 | # @DESCRIPTION: |
|
|
50 | # The subdirectory to download source from. Possible settings are app, |
|
|
51 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
|
|
52 | # inherit to override the default autoconfigured module. |
|
|
53 | if [[ -z ${MODULE} ]]; then |
| 49 | MODULE="app" |
54 | MODULE="" |
| 50 | elif [[ ${CATEGORY} = app-doc ]]; then |
55 | case ${CATEGORY} in |
| 51 | MODULE="doc" |
56 | app-doc) MODULE="doc" ;; |
| 52 | # x11-misc contains data and util, x11-themes contains data |
57 | media-fonts) MODULE="font" ;; |
| 53 | elif [[ ${CATEGORY} = x11-misc ]] || [[ ${CATEGORY} = x11-themes ]]; then |
58 | x11-apps|x11-wm) MODULE="app" ;; |
| 54 | if [[ ${PN} == xbitmaps || ${PN} == xcursor-themes || ${PN} == xkbdata ]]; then |
59 | x11-misc|x11-themes) MODULE="util" ;; |
| 55 | MODULE="data" |
60 | x11-drivers) MODULE="driver" ;; |
| 56 | else |
61 | x11-base) MODULE="xserver" ;; |
| 57 | MODULE="util" |
62 | x11-proto) MODULE="proto" ;; |
| 58 | fi |
63 | x11-libs) MODULE="lib" ;; |
| 59 | elif [[ ${CATEGORY} = x11-drivers ]]; then |
64 | esac |
| 60 | MODULE="driver" |
|
|
| 61 | elif [[ ${CATEGORY} = media-fonts ]]; then |
|
|
| 62 | MODULE="font" |
|
|
| 63 | elif [[ ${CATEGORY} = x11-libs ]]; then |
|
|
| 64 | MODULE="lib" |
|
|
| 65 | elif [[ ${CATEGORY} = x11-proto ]]; then |
|
|
| 66 | MODULE="proto" |
|
|
| 67 | elif [[ ${CATEGORY} = x11-base ]]; then |
|
|
| 68 | MODULE="xserver" |
|
|
| 69 | fi |
65 | fi |
| 70 | |
66 | |
| 71 | if [[ -n ${GIT_ECLASS} ]]; then |
67 | if [[ -n ${GIT_ECLASS} ]]; then |
| 72 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |
68 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |
| 73 | else |
69 | else |
| … | |
… | |
| 359 | x-modular_debug_setup |
355 | x-modular_debug_setup |
| 360 | |
356 | |
| 361 | # @VARIABLE: CONFIGURE_OPTIONS |
357 | # @VARIABLE: CONFIGURE_OPTIONS |
| 362 | # @DESCRIPTION: |
358 | # @DESCRIPTION: |
| 363 | # Any options to pass to configure |
359 | # Any options to pass to configure |
| 364 | [[ -n ${CONFIGURE_OPTIONTS} ]] |
360 | [[ -n ${CONFIGURE_OPTIONS} ]] |
| 365 | |
361 | |
| 366 | # If prefix isn't set here, .pc files cause problems |
362 | # If prefix isn't set here, .pc files cause problems |
| 367 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
363 | if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
| 368 | econf --prefix=${XDIR} \ |
364 | econf --prefix=${XDIR} \ |
| 369 | --datadir=${XDIR}/share \ |
365 | --datadir=${XDIR}/share \ |