1 |
scarabeus 11/01/06 11:02:00 |
2 |
|
3 |
Modified: xorg-2.eclass |
4 |
Log: |
5 |
Add debug-print sections, Fix typo in variable description, add eapi=4 as basically supported by this eclass. |
6 |
|
7 |
Revision Changes Path |
8 |
1.21 eclass/xorg-2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/xorg-2.eclass?rev=1.21&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/xorg-2.eclass?rev=1.21&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/xorg-2.eclass?r1=1.20&r2=1.21 |
13 |
|
14 |
Index: xorg-2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v |
17 |
retrieving revision 1.20 |
18 |
retrieving revision 1.21 |
19 |
diff -u -r1.20 -r1.21 |
20 |
--- xorg-2.eclass 9 Nov 2010 18:25:00 -0000 1.20 |
21 |
+++ xorg-2.eclass 6 Jan 2011 11:01:59 -0000 1.21 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2010 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.20 2010/11/09 18:25:00 scarabeus Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.21 2011/01/06 11:01:59 scarabeus Exp $ |
27 |
# |
28 |
# @ECLASS: xorg-2.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -43,7 +43,7 @@ |
31 |
|
32 |
EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" |
33 |
case "${EAPI:-0}" in |
34 |
- 3) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; |
35 |
+ 3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; |
36 |
*) die "EAPI-UNSUPPORTED" ;; |
37 |
esac |
38 |
|
39 |
@@ -67,7 +67,6 @@ |
40 |
# doc, data, util, driver, font, lib, proto, xserver. Set above the |
41 |
# inherit to override the default autoconfigured module. |
42 |
if [[ -z ${MODULE} ]]; then |
43 |
- MODULE="" |
44 |
case ${CATEGORY} in |
45 |
app-doc) MODULE="doc" ;; |
46 |
media-fonts) MODULE="font" ;; |
47 |
@@ -77,13 +76,14 @@ |
48 |
x11-base) MODULE="xserver" ;; |
49 |
x11-proto) MODULE="proto" ;; |
50 |
x11-libs) MODULE="lib" ;; |
51 |
+ *) MODULE="" ;; |
52 |
esac |
53 |
fi |
54 |
|
55 |
# @ECLASS-VARIABLE: PACKAGE_NAME |
56 |
# @DESCRIPTION: |
57 |
-# For git checkout git repository migth differ from package name |
58 |
-# so it can be overriden via this variable. |
59 |
+# For git checkout the git repository migth differ from package name. |
60 |
+# This variable can be used for proper directory specification |
61 |
: ${PACKAGE_NAME:=${PN}} |
62 |
|
63 |
if [[ -n ${GIT_ECLASS} ]]; then |
64 |
@@ -182,13 +182,17 @@ |
65 |
# @DESCRIPTION: |
66 |
# Setup prefix compat |
67 |
xorg-2_pkg_setup() { |
68 |
- [[ ${FONT} == yes ]] && font_pkg_setup |
69 |
+ debug-print-function ${FUNCNAME} "$@" |
70 |
+ |
71 |
+ [[ ${FONT} == yes ]] && font_pkg_setup "$@" |
72 |
} |
73 |
|
74 |
# @FUNCTION: xorg-2_src_unpack |
75 |
# @DESCRIPTION: |
76 |
# Simply unpack source code. |
77 |
xorg-2_src_unpack() { |
78 |
+ debug-print-function ${FUNCNAME} "$@" |
79 |
+ |
80 |
if [[ -n ${GIT_ECLASS} ]]; then |
81 |
git_src_unpack |
82 |
else |
83 |
@@ -202,19 +206,23 @@ |
84 |
# @DESCRIPTION: |
85 |
# Apply all patches |
86 |
xorg-2_patch_source() { |
87 |
+ debug-print-function ${FUNCNAME} "$@" |
88 |
+ |
89 |
# Use standardized names and locations with bulk patching |
90 |
# Patch directory is ${WORKDIR}/patch |
91 |
# See epatch() in eutils.eclass for more documentation |
92 |
EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
93 |
|
94 |
[[ -d "${EPATCH_SOURCE}" ]] && epatch |
95 |
- base_src_prepare |
96 |
+ base_src_prepare "$@" |
97 |
} |
98 |
|
99 |
# @FUNCTION: xorg-2_reconf_source |
100 |
# @DESCRIPTION: |
101 |
# Run eautoreconf if necessary, and run elibtoolize. |
102 |
xorg-2_reconf_source() { |
103 |
+ debug-print-function ${FUNCNAME} "$@" |
104 |
+ |
105 |
case ${CHOST} in |
106 |
*-interix* | *-aix* | *-winnt*) |
107 |
# some hosts need full eautoreconf |
108 |
@@ -231,6 +239,8 @@ |
109 |
# @DESCRIPTION: |
110 |
# Prepare a package after unpacking, performing all X-related tasks. |
111 |
xorg-2_src_prepare() { |
112 |
+ debug-print-function ${FUNCNAME} "$@" |
113 |
+ |
114 |
[[ -n ${GIT_ECLASS} ]] && git_src_prepare |
115 |
xorg-2_patch_source |
116 |
xorg-2_reconf_source |
117 |
@@ -240,6 +250,8 @@ |
118 |
# @DESCRIPTION: |
119 |
# If a font package, perform any necessary configuration steps |
120 |
xorg-2_font_configure() { |
121 |
+ debug-print-function ${FUNCNAME} "$@" |
122 |
+ |
123 |
if has nls ${IUSE//+} && ! use nls; then |
124 |
FONT_OPTIONS+=" |
125 |
--disable-iso8859-2 |
126 |
@@ -266,6 +278,8 @@ |
127 |
# @DESCRIPTION: |
128 |
# Set up CFLAGS for a debug build |
129 |
xorg-2_flags_setup() { |
130 |
+ debug-print-function ${FUNCNAME} "$@" |
131 |
+ |
132 |
# Win32 require special define |
133 |
[[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ |
134 |
# hardened ldflags |
135 |
@@ -283,6 +297,7 @@ |
136 |
# @DESCRIPTION: |
137 |
# Perform any necessary pre-configuration steps, then run configure |
138 |
xorg-2_src_configure() { |
139 |
+ debug-print-function ${FUNCNAME} "$@" |
140 |
local myopts="" |
141 |
|
142 |
xorg-2_flags_setup |
143 |
@@ -308,7 +323,9 @@ |
144 |
# @DESCRIPTION: |
145 |
# Compile a package, performing all X-related tasks. |
146 |
xorg-2_src_compile() { |
147 |
- base_src_compile |
148 |
+ debug-print-function ${FUNCNAME} "$@" |
149 |
+ |
150 |
+ base_src_compile "$@" |
151 |
} |
152 |
|
153 |
# @FUNCTION: xorg-2_src_install |
154 |
@@ -316,6 +333,8 @@ |
155 |
# Install a built package to ${D}, performing any necessary steps. |
156 |
# Creates a ChangeLog from git if using live ebuilds. |
157 |
xorg-2_src_install() { |
158 |
+ debug-print-function ${FUNCNAME} "$@" |
159 |
+ |
160 |
if [[ ${CATEGORY} == x11-proto ]]; then |
161 |
emake \ |
162 |
${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \ |
163 |
@@ -336,7 +355,7 @@ |
164 |
fi |
165 |
|
166 |
if [[ -e "${S}"/ChangeLog ]]; then |
167 |
- dodoc "${S}"/ChangeLog |
168 |
+ dodoc "${S}"/ChangeLog || die "dodoc failed" |
169 |
fi |
170 |
# @VARIABLE: DOCS |
171 |
# @DESCRIPTION: |
172 |
@@ -360,7 +379,9 @@ |
173 |
# Run X-specific post-installation tasks on the live filesystem. The |
174 |
# only task right now is some setup for font packages. |
175 |
xorg-2_pkg_postinst() { |
176 |
- [[ -n ${FONT} ]] && setup_fonts |
177 |
+ debug-print-function ${FUNCNAME} "$@" |
178 |
+ |
179 |
+ [[ -n ${FONT} ]] && setup_fonts "$@" |
180 |
} |
181 |
|
182 |
# @FUNCTION: xorg-2_pkg_postrm |
183 |
@@ -368,15 +389,17 @@ |
184 |
# Run X-specific post-removal tasks on the live filesystem. The only |
185 |
# task right now is some cleanup for font packages. |
186 |
xorg-2_pkg_postrm() { |
187 |
- if [[ -n ${FONT} ]]; then |
188 |
- font_pkg_postrm |
189 |
- fi |
190 |
+ debug-print-function ${FUNCNAME} "$@" |
191 |
+ |
192 |
+ [[ -n ${FONT} ]] && font_pkg_postrm "$@" |
193 |
} |
194 |
|
195 |
# @FUNCTION: setup_fonts |
196 |
# @DESCRIPTION: |
197 |
# Generates needed files for fonts and fixes font permissions |
198 |
setup_fonts() { |
199 |
+ debug-print-function ${FUNCNAME} "$@" |
200 |
+ |
201 |
create_fonts_scale |
202 |
create_fonts_dir |
203 |
font_pkg_postinst |
204 |
@@ -387,6 +410,8 @@ |
205 |
# Don't let the package install generated font files that may overlap |
206 |
# with other packages. Instead, they're generated in pkg_postinst(). |
207 |
remove_font_metadata() { |
208 |
+ debug-print-function ${FUNCNAME} "$@" |
209 |
+ |
210 |
if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
211 |
einfo "Removing font metadata" |
212 |
rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} |
213 |
@@ -397,6 +422,8 @@ |
214 |
# @DESCRIPTION: |
215 |
# Create fonts.scale file, used by the old server-side fonts subsystem. |
216 |
create_fonts_scale() { |
217 |
+ debug-print-function ${FUNCNAME} "$@" |
218 |
+ |
219 |
if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
220 |
ebegin "Generating font.scale" |
221 |
mkfontscale \ |
222 |
@@ -410,6 +437,8 @@ |
223 |
# @DESCRIPTION: |
224 |
# Create fonts.dir file, used by the old server-side fonts subsystem. |
225 |
create_fonts_dir() { |
226 |
+ debug-print-function ${FUNCNAME} "$@" |
227 |
+ |
228 |
ebegin "Generating fonts.dir" |
229 |
mkfontdir \ |
230 |
-e "${EROOT}"/usr/share/fonts/encodings \ |