diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2008-05-28 01:48:10 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2008-05-28 01:48:10 +0000 |
commit | 69bb9035702955cc97d93f1dd299a236bc14d1b2 (patch) | |
tree | 2ce5b64f2b4f2534bf90c6584b201daeb5a57281 /eclass | |
parent | Fix RDEPEND on pkgconfig; bug #217278 (diff) | |
download | gentoo-2-69bb9035702955cc97d93f1dd299a236bc14d1b2.tar.gz gentoo-2-69bb9035702955cc97d93f1dd299a236bc14d1b2.tar.bz2 gentoo-2-69bb9035702955cc97d93f1dd299a236bc14d1b2.zip |
Change the MODULE setup to a case statement. Thanks to Bo Ørsted Andresen, who finally got me to do it.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/x-modular.eclass | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass index 2329bc65241f..271d31520870 100644 --- a/eclass/x-modular.eclass +++ b/eclass/x-modular.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.99 2008/05/27 18:42:33 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.100 2008/05/28 01:48:10 dberkholz Exp $ # # @ECLASS: x-modular.eclass # @MAINTAINER: @@ -45,36 +45,22 @@ fi # Set up SRC_URI for individual modular releases BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual" -if [[ -z ${MODULE} ]]; then # @ECLASS-VARIABLE: MODULE # @DESCRIPTION: # The subdirectory to download source from. Possible settings are app, # doc, data, util, driver, font, lib, proto, xserver. Set above the # inherit to override the default autoconfigured module. - MODULE="" - if [[ ${CATEGORY} = x11-apps ]] || [[ ${CATEGORY} = x11-wm ]]; then - MODULE="app" - elif [[ ${CATEGORY} = app-doc ]]; then - MODULE="doc" - # x11-misc contains data and util, x11-themes contains data - elif [[ ${CATEGORY} = x11-misc ]] || [[ ${CATEGORY} = x11-themes ]]; then - if [[ ${PN} == xbitmaps || ${PN} == xcursor-themes || ${PN} == xkbdata ]]; then - MODULE="data" - else - MODULE="util" - fi - elif [[ ${CATEGORY} = x11-drivers ]]; then - MODULE="driver" - elif [[ ${CATEGORY} = media-fonts ]]; then - MODULE="font" - elif [[ ${CATEGORY} = x11-libs ]]; then - MODULE="lib" - elif [[ ${CATEGORY} = x11-proto ]]; then - MODULE="proto" - elif [[ ${CATEGORY} = x11-base ]]; then - MODULE="xserver" - fi -fi +[[ -z ${MODULE} ]] && MODULE="" +case ${CATEGORY} in + app-doc) MODULE="doc" ;; + media-fonts) MODULE="font" ;; + x11-apps|x11-wm) MODULE="app" ;; + x11-misc|x11-themes) MODULE="util" ;; + x11-drivers) MODULE="driver" ;; + x11-base) MODULE="xserver" ;; + x11-proto) MODULE="proto" ;; + x11-libs) MODULE="lib" ;; +esac if [[ -n ${GIT_ECLASS} ]]; then EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}" |