| 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.28 2005/12/09 19:21:28 spyderous Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.29 2005/12/09 23:32:27 joshuabaergen Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Donnie Berkholz <spyderous@gentoo.org> |
5 | # Author: Donnie Berkholz <spyderous@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass is designed to reduce code duplication in the modularized X11 |
7 | # This eclass is designed to reduce code duplication in the modularized X11 |
| 8 | # ebuilds. |
8 | # ebuilds. |
| … | |
… | |
| 14 | |
14 | |
| 15 | inherit eutils libtool toolchain-funcs |
15 | inherit eutils libtool toolchain-funcs |
| 16 | |
16 | |
| 17 | # Directory prefix to use for everything |
17 | # Directory prefix to use for everything |
| 18 | XDIR="/usr" |
18 | XDIR="/usr" |
|
|
19 | |
|
|
20 | # Set up default patchset version(s) if necessary |
|
|
21 | # x11-driver-patches |
|
|
22 | if [[ -z "${XDPVER}" ]]; then |
|
|
23 | XDPVER="1" |
|
|
24 | fi |
| 19 | |
25 | |
| 20 | IUSE="" |
26 | IUSE="" |
| 21 | HOMEPAGE="http://xorg.freedesktop.org/" |
27 | HOMEPAGE="http://xorg.freedesktop.org/" |
| 22 | SRC_URI="http://xorg.freedesktop.org/releases/X11R7.0-RC3/everything/${P}.tar.bz2 |
28 | SRC_URI="http://xorg.freedesktop.org/releases/X11R7.0-RC3/everything/${P}.tar.bz2 |
| 23 | http://xorg.freedesktop.org/releases/X11R7.0-RC2/everything/${P}.tar.bz2 |
29 | http://xorg.freedesktop.org/releases/X11R7.0-RC2/everything/${P}.tar.bz2 |
| … | |
… | |
| 75 | |
81 | |
| 76 | # If we're a driver package |
82 | # If we're a driver package |
| 77 | if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then |
83 | if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then |
| 78 | # Don't build static driver modules |
84 | # Don't build static driver modules |
| 79 | DRIVER_OPTIONS="--disable-static" |
85 | DRIVER_OPTIONS="--disable-static" |
|
|
86 | |
|
|
87 | # Enable driver code in the rest of the eclass |
|
|
88 | DRIVER="yes" |
|
|
89 | |
|
|
90 | # Add driver patchset to SRC_URI |
|
|
91 | SRC_URI="${SRC_URI} |
|
|
92 | http://dev.gentoo.org/~joshuabaergen/distfiles/x11-driver-patches-${XDPVER}.tar.bz2" |
| 80 | fi |
93 | fi |
| 81 | |
94 | |
| 82 | DEPEND="${DEPEND} |
95 | DEPEND="${DEPEND} |
| 83 | >=dev-util/pkgconfig-0.18 |
96 | >=dev-util/pkgconfig-0.18 |
| 84 | >=x11-misc/util-macros-0.99.2" |
97 | >=x11-misc/util-macros-0.99.2" |
| … | |
… | |
| 103 | # Use standardized names and locations with bulk patching |
116 | # Use standardized names and locations with bulk patching |
| 104 | # Patch directory is ${WORKDIR}/patch |
117 | # Patch directory is ${WORKDIR}/patch |
| 105 | # See epatch() in eutils.eclass for more documentation |
118 | # See epatch() in eutils.eclass for more documentation |
| 106 | if [[ -z "${EPATCH_SUFFIX}" ]] ; then |
119 | if [[ -z "${EPATCH_SUFFIX}" ]] ; then |
| 107 | EPATCH_SUFFIX="patch" |
120 | EPATCH_SUFFIX="patch" |
|
|
121 | fi |
|
|
122 | |
|
|
123 | # If this is a driver package we need to fix man page install location. |
|
|
124 | # Running autoreconf will use the patched util-macros to make the |
|
|
125 | # change for us, so we only need to patch if it is not going to run. |
|
|
126 | if [[ -n "${DRIVER}" ]] && [[ "${SNAPSHOT}" != "yes" ]]; then |
|
|
127 | PATCHES="${PATCHES} ${DISTDIR}/x11-driver-patches-${XDPVER}.tar.bz2" |
| 108 | fi |
128 | fi |
| 109 | |
129 | |
| 110 | # For specific list of patches |
130 | # For specific list of patches |
| 111 | if [[ -n "${PATCHES}" ]] ; then |
131 | if [[ -n "${PATCHES}" ]] ; then |
| 112 | for PATCH in ${PATCHES} |
132 | for PATCH in ${PATCHES} |
| … | |
… | |
| 135 | fi |
155 | fi |
| 136 | |
156 | |
| 137 | } |
157 | } |
| 138 | |
158 | |
| 139 | x-modular_src_unpack() { |
159 | x-modular_src_unpack() { |
| 140 | for x in xorg-server xf86-video- xf86-input- ; do |
160 | if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then |
| 141 | if [[ ${PN:0:11} = $x ]] && gcc-specs-now; then |
161 | if gcc-specs-now; then |
| 142 | msg="Do not emerge ${PN} without vanilla gcc!" |
162 | msg="Do not emerge ${PN} without vanilla gcc!" |
| 143 | eerror "$msg" |
163 | eerror "$msg" |
| 144 | die "$msg" |
164 | die "$msg" |
| 145 | fi |
165 | fi |
| 146 | done |
166 | fi |
| 147 | |
167 | |
| 148 | x-modular_unpack_source |
168 | x-modular_unpack_source |
| 149 | x-modular_patch_source |
169 | x-modular_patch_source |
| 150 | x-modular_reconf_source |
170 | x-modular_reconf_source |
| 151 | |
171 | |