| 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.99 2008/05/27 18:42:33 dberkholz Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.103 2008/11/26 23:13:24 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 [[ -z ${MODULE} ]]; then |
|
|
| 49 | # @ECLASS-VARIABLE: MODULE |
48 | # @ECLASS-VARIABLE: MODULE |
| 50 | # @DESCRIPTION: |
49 | # @DESCRIPTION: |
| 51 | # The subdirectory to download source from. Possible settings are app, |
50 | # The subdirectory to download source from. Possible settings are app, |
| 52 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
51 | # doc, data, util, driver, font, lib, proto, xserver. Set above the |
| 53 | # inherit to override the default autoconfigured module. |
52 | # inherit to override the default autoconfigured module. |
|
|
53 | if [[ -z ${MODULE} ]]; then |
| 54 | MODULE="" |
54 | MODULE="" |
| 55 | if [[ ${CATEGORY} = x11-apps ]] || [[ ${CATEGORY} = x11-wm ]]; then |
55 | case ${CATEGORY} in |
| 56 | MODULE="app" |
56 | app-doc) MODULE="doc" ;; |
| 57 | elif [[ ${CATEGORY} = app-doc ]]; then |
57 | media-fonts) MODULE="font" ;; |
| 58 | MODULE="doc" |
58 | x11-apps|x11-wm) MODULE="app" ;; |
| 59 | # x11-misc contains data and util, x11-themes contains data |
59 | x11-misc|x11-themes) MODULE="util" ;; |
| 60 | elif [[ ${CATEGORY} = x11-misc ]] || [[ ${CATEGORY} = x11-themes ]]; then |
60 | x11-drivers) MODULE="driver" ;; |
| 61 | if [[ ${PN} == xbitmaps || ${PN} == xcursor-themes || ${PN} == xkbdata ]]; then |
61 | x11-base) MODULE="xserver" ;; |
| 62 | MODULE="data" |
62 | x11-proto) MODULE="proto" ;; |
| 63 | else |
63 | x11-libs) MODULE="lib" ;; |
| 64 | MODULE="util" |
64 | esac |
| 65 | fi |
|
|
| 66 | elif [[ ${CATEGORY} = x11-drivers ]]; then |
|
|
| 67 | MODULE="driver" |
|
|
| 68 | elif [[ ${CATEGORY} = media-fonts ]]; then |
|
|
| 69 | MODULE="font" |
|
|
| 70 | elif [[ ${CATEGORY} = x11-libs ]]; then |
|
|
| 71 | MODULE="lib" |
|
|
| 72 | elif [[ ${CATEGORY} = x11-proto ]]; then |
|
|
| 73 | MODULE="proto" |
|
|
| 74 | elif [[ ${CATEGORY} = x11-base ]]; then |
|
|
| 75 | MODULE="xserver" |
|
|
| 76 | fi |
|
|
| 77 | fi |
65 | fi |
| 78 | |
66 | |
| 79 | if [[ -n ${GIT_ECLASS} ]]; then |
67 | if [[ -n ${GIT_ECLASS} ]]; then |
| 80 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |
68 | EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |
| 81 | else |
69 | else |
| … | |
… | |
| 205 | # (#120057) Enabling DRI in drivers requires that the server was built with |
193 | # (#120057) Enabling DRI in drivers requires that the server was built with |
| 206 | # support for it |
194 | # support for it |
| 207 | if [[ -n "${DRIVER}" ]]; then |
195 | if [[ -n "${DRIVER}" ]]; then |
| 208 | if has dri ${IUSE} && use dri; then |
196 | if has dri ${IUSE} && use dri; then |
| 209 | einfo "Checking for direct rendering capabilities ..." |
197 | einfo "Checking for direct rendering capabilities ..." |
| 210 | if ! built_with_use x11-base/xorg-server dri; then |
198 | if ! built_with_use --missing true x11-base/xorg-server dri; then |
| 211 | die "You must build x11-base/xorg-server with USE=dri." |
199 | die "You must build x11-base/xorg-server with USE=dri." |
| 212 | fi |
200 | fi |
| 213 | fi |
201 | fi |
| 214 | fi |
202 | fi |
| 215 | } |
203 | } |
| … | |
… | |
| 405 | # Creates a ChangeLog from git if using live ebuilds. |
393 | # Creates a ChangeLog from git if using live ebuilds. |
| 406 | x-modular_src_install() { |
394 | x-modular_src_install() { |
| 407 | # Install everything to ${XDIR} |
395 | # Install everything to ${XDIR} |
| 408 | make \ |
396 | make \ |
| 409 | DESTDIR="${D}" \ |
397 | DESTDIR="${D}" \ |
| 410 | install |
398 | install \ |
|
|
399 | || die |
| 411 | # Shouldn't be necessary in XDIR=/usr |
400 | # Shouldn't be necessary in XDIR=/usr |
| 412 | # einstall forces datadir, so we need to re-force it |
401 | # einstall forces datadir, so we need to re-force it |
| 413 | # datadir=${XDIR}/share \ |
402 | # datadir=${XDIR}/share \ |
| 414 | # mandir=${XDIR}/share/man \ |
403 | # mandir=${XDIR}/share/man \ |
| 415 | |
404 | |