| 1 | # Copyright 1999-2010 Gentoo Foundation |
1 | # Copyright 1999-2010 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/xorg-2.eclass,v 1.1 2010/03/14 10:27:07 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.4 2010/06/08 20:22:12 remi Exp $ |
| 4 | # |
4 | # |
| 5 | # @ECLASS: xorg-2.eclass |
5 | # @ECLASS: xorg-2.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # x11@gentoo.org |
7 | # x11@gentoo.org |
| 8 | |
|
|
| 9 | # Author: Tomáš Chvátal <scarabeus@gentoo.org> |
|
|
| 10 | # Author: Donnie Berkholz <dberkholz@gentoo.org> |
|
|
| 11 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
8 | # @BLURB: Reduces code duplication in the modularized X11 ebuilds. |
| 12 | # @DESCRIPTION: |
9 | # @DESCRIPTION: |
| 13 | # This eclass makes trivial X ebuilds possible for apps, fonts, drivers, |
10 | # This eclass makes trivial X ebuilds possible for apps, fonts, drivers, |
| 14 | # and more. Many things that would normally be done in various functions |
11 | # and more. Many things that would normally be done in various functions |
| 15 | # can be accessed by setting variables instead, such as patching, |
12 | # can be accessed by setting variables instead, such as patching, |
| … | |
… | |
| 17 | # |
14 | # |
| 18 | # All you need to do in a basic ebuild is inherit this eclass and set |
15 | # All you need to do in a basic ebuild is inherit this eclass and set |
| 19 | # DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted |
16 | # DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted |
| 20 | # with the other X packages, you don't need to set SRC_URI. Pretty much |
17 | # with the other X packages, you don't need to set SRC_URI. Pretty much |
| 21 | # everything else should be automatic. |
18 | # everything else should be automatic. |
|
|
19 | |
|
|
20 | # Author: Tomáš Chvátal <scarabeus@gentoo.org> |
|
|
21 | # Author: Donnie Berkholz <dberkholz@gentoo.org> |
| 22 | |
22 | |
| 23 | GIT_ECLASS="" |
23 | GIT_ECLASS="" |
| 24 | if [[ ${PV} == *9999* ]]; then |
24 | if [[ ${PV} == *9999* ]]; then |
| 25 | GIT_ECLASS="git" |
25 | GIT_ECLASS="git" |
| 26 | XORG_EAUTORECONF="yes" |
26 | XORG_EAUTORECONF="yes" |
| … | |
… | |
| 89 | : ${SLOT:=0} |
89 | : ${SLOT:=0} |
| 90 | |
90 | |
| 91 | # Set the license for the package. This can be overridden by setting |
91 | # Set the license for the package. This can be overridden by setting |
| 92 | # LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages |
92 | # LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages |
| 93 | # are under the MIT license. (This is what Red Hat does in their rpms) |
93 | # are under the MIT license. (This is what Red Hat does in their rpms) |
| 94 | : ${LICENSE=MIT} |
94 | : ${LICENSE:=MIT} |
| 95 | |
95 | |
| 96 | # Set up shared dependencies |
96 | # Set up shared dependencies |
| 97 | if [[ ${XORG_EAUTORECONF} != no ]]; then |
97 | if [[ ${XORG_EAUTORECONF} != no ]]; then |
| 98 | DEPEND+=" |
98 | DEPEND+=" |
| 99 | >=sys-devel/libtool-2.2.6a |
99 | >=sys-devel/libtool-2.2.6a |
| 100 | sys-devel/m4" |
100 | sys-devel/m4" |
| 101 | # This MUST BE STABLE |
101 | # This MUST BE STABLE |
| 102 | if [[ ${PN} != util-macros ]] ; then |
102 | if [[ ${PN} != util-macros ]] ; then |
| 103 | DEPEND+=" >=x11-misc/util-macros-1.5.0" |
103 | DEPEND+=" >=x11-misc/util-macros-1.8.0" |
| 104 | # Required even by xorg-server |
104 | # Required even by xorg-server |
| 105 | [[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1" |
105 | [[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1" |
| 106 | fi |
106 | fi |
| 107 | WANT_AUTOCONF="latest" |
107 | WANT_AUTOCONF="latest" |
| 108 | WANT_AUTOMAKE="latest" |
108 | WANT_AUTOMAKE="latest" |
| … | |
… | |
| 135 | fi |
135 | fi |
| 136 | |
136 | |
| 137 | # If we're a driver package, then enable DRIVER case |
137 | # If we're a driver package, then enable DRIVER case |
| 138 | [[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes" |
138 | [[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes" |
| 139 | |
139 | |
|
|
140 | # @ECLASS-VARIABLE: XORG_STATIC |
|
|
141 | # @DESCRIPTION: |
|
|
142 | # Enables static-libs useflag. Set to no, if your package gets: |
|
|
143 | # |
|
|
144 | # QA: configure: WARNING: unrecognized options: --disable-static |
|
|
145 | : ${XORG_STATIC:="yes"} |
|
|
146 | |
| 140 | # Add static-libs useflag where usefull. |
147 | # Add static-libs useflag where usefull. |
|
|
148 | if [[ ${XORG_STATIC} == yes \ |
| 141 | if [[ ${FONT} != yes \ |
149 | && ${FONT} != yes \ |
| 142 | && ${CATEGORY} != app-doc \ |
150 | && ${CATEGORY} != app-doc \ |
| 143 | && ${CATEGORY} != x11-proto \ |
151 | && ${CATEGORY} != x11-proto \ |
| 144 | && ${CATEGORY} != x11-drivers \ |
152 | && ${CATEGORY} != x11-drivers \ |
| 145 | && ${CATEGORY} != media-fonts \ |
153 | && ${CATEGORY} != media-fonts \ |
| 146 | && ${PN} != util-macros \ |
154 | && ${PN} != util-macros \ |
| … | |
… | |
| 188 | # See epatch() in eutils.eclass for more documentation |
196 | # See epatch() in eutils.eclass for more documentation |
| 189 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
197 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
| 190 | |
198 | |
| 191 | [[ -d "${EPATCH_SOURCE}" ]] && epatch |
199 | [[ -d "${EPATCH_SOURCE}" ]] && epatch |
| 192 | base_src_prepare |
200 | base_src_prepare |
| 193 | epatch_user |
|
|
| 194 | } |
201 | } |
| 195 | |
202 | |
| 196 | # @FUNCTION: xorg-2_reconf_source |
203 | # @FUNCTION: xorg-2_reconf_source |
| 197 | # @USAGE: |
204 | # @USAGE: |
| 198 | # @DESCRIPTION: |
205 | # @DESCRIPTION: |