1 |
pesa 11/12/26 11:47:47 |
2 |
|
3 |
Modified: qt4-r2.eclass |
4 |
Log: |
5 |
Improve eclass doc. |
6 |
|
7 |
Revision Changes Path |
8 |
1.15 eclass/qt4-r2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?rev=1.15&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?rev=1.15&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?r1=1.14&r2=1.15 |
13 |
|
14 |
Index: qt4-r2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v |
17 |
retrieving revision 1.14 |
18 |
retrieving revision 1.15 |
19 |
diff -u -r1.14 -r1.15 |
20 |
--- qt4-r2.eclass 12 Nov 2011 20:46:39 -0000 1.14 |
21 |
+++ qt4-r2.eclass 26 Dec 2011 11:47:47 -0000 1.15 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.14 2011/11/12 20:46:39 pesa Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.15 2011/12/26 11:47:47 pesa Exp $ |
27 |
|
28 |
# @ECLASS: qt4-r2.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -11,8 +11,8 @@ |
31 |
# dealing with packages using Qt4 libraries. Requires EAPI=2 or later. |
32 |
|
33 |
case ${EAPI} in |
34 |
- 2|3|4) : ;; |
35 |
- *) die "EAPI=${EAPI} is not supported by ${ECLASS} eclass." ;; |
36 |
+ 2|3|4) : ;; |
37 |
+ *) die "EAPI=${EAPI} is not supported by ${ECLASS} eclass." ;; |
38 |
esac |
39 |
|
40 |
inherit base eutils multilib toolchain-funcs |
41 |
@@ -20,19 +20,24 @@ |
42 |
export XDG_CONFIG_HOME="${T}" |
43 |
|
44 |
# @ECLASS-VARIABLE: LANGS |
45 |
+# @DEFAULT_UNSET |
46 |
# @DESCRIPTION: |
47 |
# In case your Qt4 application provides various translations, use this variable |
48 |
# to specify them in order to populate "linguas_*" IUSE automatically. Make sure |
49 |
-# that you set this variable BEFORE inheriting qt4-r2 eclass. |
50 |
-# example: LANGS="en el de" |
51 |
+# that you set this variable before inheriting qt4-r2 eclass. |
52 |
+# Example: |
53 |
+# @CODE |
54 |
+# LANGS="en el de" |
55 |
+# @CODE |
56 |
for x in ${LANGS}; do |
57 |
IUSE="${IUSE} linguas_${x}" |
58 |
done |
59 |
|
60 |
# @ECLASS-VARIABLE: LANGSLONG |
61 |
+# @DEFAULT_UNSET |
62 |
# @DESCRIPTION: |
63 |
# Same as above, but this variable is for LINGUAS that must be in long format. |
64 |
-# Remember to set this variable BEFORE inheriting qt4-r2 eclass. |
65 |
+# Remember to set this variable before inheriting qt4-r2 eclass. |
66 |
# Look at ${PORTDIR}/profiles/desc/linguas.desc for details. |
67 |
for x in ${LANGSLONG}; do |
68 |
IUSE="${IUSE} linguas_${x%_*}" |
69 |
@@ -63,12 +68,15 @@ |
70 |
} |
71 |
|
72 |
# @ECLASS-VARIABLE: PATCHES |
73 |
+# @DEFAULT_UNSET |
74 |
# @DESCRIPTION: |
75 |
-# In case you have patches to apply, specify them in PATCHES variable. Make sure |
76 |
-# to specify the full path. This variable is used in src_prepare phase. |
77 |
-# example: |
78 |
-# PATCHES=( "${FILESDIR}"/mypatch.patch |
79 |
-# "${FILESDIR}"/mypatch2.patch ) |
80 |
+# In case you have patches to apply, specify them here. Make sure to |
81 |
+# specify the full path. This variable is used in src_prepare phase. |
82 |
+# Example: |
83 |
+# @CODE |
84 |
+# PATCHES=( "${FILESDIR}"/mypatch.patch |
85 |
+# "${FILESDIR}"/mypatch2.patch ) |
86 |
+# @CODE |
87 |
|
88 |
# @FUNCTION: qt4-r2_src_prepare |
89 |
# @DESCRIPTION: |
90 |
@@ -109,32 +117,33 @@ |
91 |
} |
92 |
|
93 |
# @ECLASS-VARIABLE: DOCS |
94 |
+# @DEFAULT_UNSET |
95 |
# @DESCRIPTION: |
96 |
# Use this variable if you want to install any documentation. |
97 |
-# example: DOCS="README AUTHORS" |
98 |
+# Example: |
99 |
+# @CODE |
100 |
+# DOCS="README AUTHORS" |
101 |
+# @CODE |
102 |
|
103 |
# @ECLASS-VARIABLE: DOCSDIR |
104 |
# @DESCRIPTION: |
105 |
-# Directory containing documentation. If not specified, ${S} will be used |
106 |
-# instead. |
107 |
+# Directory containing documentation, defaults to ${S}. |
108 |
+DOCSDIR="${DOCSDIR:-${S}}" |
109 |
|
110 |
# @FUNCTION: qt4-r2_src_install |
111 |
# @DESCRIPTION: |
112 |
-# Default src_install function for qt4-based packages. Installs compiled code, |
113 |
-# documentation (via DOCS variable) and translations (via LANGS and |
114 |
-# LANGSLONG variables). |
115 |
+# Default src_install function for qt4-based packages. Installs compiled code |
116 |
+# and misc documentation (via DOCS variable). |
117 |
qt4-r2_src_install() { |
118 |
debug-print-function $FUNCNAME "$@" |
119 |
|
120 |
emake INSTALL_ROOT="${D}" DESTDIR="${D}" install || die "emake install failed" |
121 |
|
122 |
# install documentation |
123 |
- if [[ -n ${DOCS} ]]; then |
124 |
- local dir=${DOCSDIR:-${S}} |
125 |
- for doc in ${DOCS}; do |
126 |
- dodoc "${dir}/${doc}" || die "dodoc failed" |
127 |
- done |
128 |
- fi |
129 |
+ local doc |
130 |
+ for doc in ${DOCS}; do |
131 |
+ dodoc "${DOCSDIR}/${doc}" || die "dodoc failed" |
132 |
+ done |
133 |
} |
134 |
|
135 |
# Internal function, used by eqmake4 and qt4-r2_src_configure |
136 |
@@ -167,19 +176,19 @@ |
137 |
} |
138 |
|
139 |
# @FUNCTION: eqmake4 |
140 |
-# @USAGE: [project file] [parameters to qmake] |
141 |
+# @USAGE: [project_file] [parameters to qmake] |
142 |
# @DESCRIPTION: |
143 |
-# Wrapper for Qt4's qmake. If project file isn't specified eqmake4 will |
144 |
-# look for it in current directory (${S}, non-recursively). If more than |
145 |
-# one project file is found, the ${PN}.pro is processed, provided that it |
146 |
-# exists. Otherwise eqmake4 fails. |
147 |
-# All the arguments are appended unmodified to qmake command line. For |
148 |
+# Wrapper for Qt4's qmake. If project_file isn't specified, eqmake4 will |
149 |
+# look for it in the current directory (${S}, non-recursively). If more |
150 |
+# than one project file are found, then ${PN}.pro is processed, provided |
151 |
+# that it exists. Otherwise eqmake4 fails. |
152 |
+# |
153 |
+# All other arguments are appended unmodified to qmake command line. For |
154 |
# recursive build systems, i.e. those based on the subdirs template, you |
155 |
# should run eqmake4 on the top-level project file only, unless you have |
156 |
# strong reasons to do things differently. During the building, qmake |
157 |
# will be automatically re-invoked with the right arguments on every |
158 |
-# directory specified inside the top-level project file by the SUBDIRS |
159 |
-# variable. |
160 |
+# directory specified inside the top-level project file. |
161 |
eqmake4() { |
162 |
ebegin "Running qmake" |