1 |
commit: 0051fae8dd67a23063179ea21b09df6dc96c9656 |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 30 12:33:00 2016 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 30 12:33:00 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=0051fae8 |
7 |
|
8 |
initial version |
9 |
|
10 |
eclass/depend.apache.eclass | 317 ++++++++++++++++++++++++++++ |
11 |
www-apache/mod_mono/mod_mono-2.10-r1.ebuild | 9 +- |
12 |
2 files changed, 323 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass |
15 |
new file mode 100644 |
16 |
index 0000000..22a8216 |
17 |
--- /dev/null |
18 |
+++ b/eclass/depend.apache.eclass |
19 |
@@ -0,0 +1,317 @@ |
20 |
+# Copyright 1999-2012 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+# @ECLASS: depend.apache.eclass |
25 |
+# @MAINTAINER: |
26 |
+# apache-devs@g.o |
27 |
+# @BLURB: Functions to allow ebuilds to depend on apache |
28 |
+# @DESCRIPTION: |
29 |
+# This eclass handles depending on apache in a sane way and provides information |
30 |
+# about where certain binaries and configuration files are located. |
31 |
+# |
32 |
+# To make use of this eclass simply call one of the need/want_apache functions |
33 |
+# described below. Make sure you use the need/want_apache call after you have |
34 |
+# defined DEPEND and RDEPEND. Also note that you can not rely on the automatic |
35 |
+# RDEPEND=DEPEND that portage does if you use this eclass. |
36 |
+# |
37 |
+# See Bug 107127 for more information. |
38 |
+# |
39 |
+# @EXAMPLE: |
40 |
+# |
41 |
+# Here is an example of an ebuild depending on apache: |
42 |
+# |
43 |
+# @CODE |
44 |
+# DEPEND="virtual/Perl-CGI" |
45 |
+# RDEPEND="${DEPEND}" |
46 |
+# need_apache2 |
47 |
+# @CODE |
48 |
+# |
49 |
+# Another example which demonstrates non-standard IUSE options for optional |
50 |
+# apache support: |
51 |
+# |
52 |
+# @CODE |
53 |
+# DEPEND="server? ( virtual/Perl-CGI )" |
54 |
+# RDEPEND="${DEPEND}" |
55 |
+# want_apache2 server |
56 |
+# |
57 |
+# pkg_setup() { |
58 |
+# depend.apache_pkg_setup server |
59 |
+# } |
60 |
+# @CODE |
61 |
+ |
62 |
+inherit multilib |
63 |
+ |
64 |
+# ============================================================================== |
65 |
+# INTERNAL VARIABLES |
66 |
+# ============================================================================== |
67 |
+ |
68 |
+# @ECLASS-VARIABLE: APACHE_VERSION |
69 |
+# @DESCRIPTION: |
70 |
+# Stores the version of apache we are going to be ebuilding. |
71 |
+# This variable is set by the want/need_apache functions. |
72 |
+ |
73 |
+# @ECLASS-VARIABLE: APXS |
74 |
+# @DESCRIPTION: |
75 |
+# Path to the apxs tool. |
76 |
+# This variable is set by the want/need_apache functions. |
77 |
+ |
78 |
+# @ECLASS-VARIABLE: APACHE_BIN |
79 |
+# @DESCRIPTION: |
80 |
+# Path to the apache binary. |
81 |
+# This variable is set by the want/need_apache functions. |
82 |
+ |
83 |
+# @ECLASS-VARIABLE: APACHE_CTL |
84 |
+# @DESCRIPTION: |
85 |
+# Path to the apachectl tool. |
86 |
+# This variable is set by the want/need_apache functions. |
87 |
+ |
88 |
+# @ECLASS-VARIABLE: APACHE_BASEDIR |
89 |
+# @DESCRIPTION: |
90 |
+# Path to the server root directory. |
91 |
+# This variable is set by the want/need_apache functions. |
92 |
+ |
93 |
+# @ECLASS-VARIABLE: APACHE_CONFDIR |
94 |
+# @DESCRIPTION: |
95 |
+# Path to the configuration file directory. |
96 |
+# This variable is set by the want/need_apache functions. |
97 |
+ |
98 |
+# @ECLASS-VARIABLE: APACHE_MODULES_CONFDIR |
99 |
+# @DESCRIPTION: |
100 |
+# Path where module configuration files are kept. |
101 |
+# This variable is set by the want/need_apache functions. |
102 |
+ |
103 |
+# @ECLASS-VARIABLE: APACHE_VHOSTS_CONFDIR |
104 |
+# @DESCRIPTION: |
105 |
+# Path where virtual host configuration files are kept. |
106 |
+# This variable is set by the want/need_apache functions. |
107 |
+ |
108 |
+# @ECLASS-VARIABLE: APACHE_MODULESDIR |
109 |
+# @DESCRIPTION: |
110 |
+# Path where we install modules. |
111 |
+# This variable is set by the want/need_apache functions. |
112 |
+ |
113 |
+# @ECLASS-VARIABLE: APACHE_DEPEND |
114 |
+# @DESCRIPTION: |
115 |
+# Dependencies for Apache |
116 |
+APACHE_DEPEND="www-servers/apache" |
117 |
+ |
118 |
+# @ECLASS-VARIABLE: APACHE2_DEPEND |
119 |
+# @DESCRIPTION: |
120 |
+# Dependencies for Apache 2.x |
121 |
+APACHE2_DEPEND="=www-servers/apache-2*" |
122 |
+ |
123 |
+# @ECLASS-VARIABLE: APACHE2_2_DEPEND |
124 |
+# @DESCRIPTION: |
125 |
+# Dependencies for Apache 2.2.x |
126 |
+APACHE2_2_DEPEND="=www-servers/apache-2.2*" |
127 |
+ |
128 |
+# @ECLASS-VARIABLE: APACHE2_4_DEPEND |
129 |
+# @DESCRIPTION: |
130 |
+# Dependencies for Apache 2.4.x |
131 |
+APACHE2_4_DEPEND="=www-servers/apache-2.4*" |
132 |
+ |
133 |
+ |
134 |
+# ============================================================================== |
135 |
+# INTERNAL FUNCTIONS |
136 |
+# ============================================================================== |
137 |
+ |
138 |
+_init_apache2() { |
139 |
+ debug-print-function $FUNCNAME $* |
140 |
+ |
141 |
+ # WARNING: Do not use these variables with anything that is put |
142 |
+ # into the dependency cache (DEPEND/RDEPEND/etc) |
143 |
+ APACHE_VERSION="2" |
144 |
+ APXS="/usr/sbin/apxs2" |
145 |
+ APACHE_BIN="/usr/sbin/apache2" |
146 |
+ APACHE_CTL="/usr/sbin/apache2ctl" |
147 |
+ APACHE_INCLUDEDIR="/usr/include/apache2" |
148 |
+ APACHE_BASEDIR="/usr/$(get_libdir)/apache2" |
149 |
+ APACHE_CONFDIR="/etc/apache2" |
150 |
+ APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d" |
151 |
+ APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d" |
152 |
+ APACHE_MODULESDIR="${APACHE_BASEDIR}/modules" |
153 |
+} |
154 |
+ |
155 |
+_init_no_apache() { |
156 |
+ debug-print-function $FUNCNAME $* |
157 |
+ APACHE_VERSION="0" |
158 |
+} |
159 |
+ |
160 |
+# ============================================================================== |
161 |
+# PUBLIC FUNCTIONS |
162 |
+# ============================================================================== |
163 |
+ |
164 |
+# @FUNCTION: depend.apache_pkg_setup |
165 |
+# @USAGE: [myiuse] |
166 |
+# @DESCRIPTION: |
167 |
+# An ebuild calls this in pkg_setup() to initialize variables for optional |
168 |
+# apache-2.x support. If the myiuse parameter is not given it defaults to |
169 |
+# apache2. |
170 |
+depend.apache_pkg_setup() { |
171 |
+ debug-print-function $FUNCNAME $* |
172 |
+ |
173 |
+ if [[ "${EBUILD_PHASE}" != "setup" ]]; then |
174 |
+ die "$FUNCNAME() should be called in pkg_setup()" |
175 |
+ fi |
176 |
+ |
177 |
+ local myiuse=${1:-apache2} |
178 |
+ if has ${myiuse} ${IUSE}; then |
179 |
+ if use ${myiuse}; then |
180 |
+ _init_apache2 |
181 |
+ else |
182 |
+ _init_no_apache |
183 |
+ fi |
184 |
+ fi |
185 |
+} |
186 |
+ |
187 |
+# @FUNCTION: want_apache |
188 |
+# @USAGE: [myiuse] |
189 |
+# @DESCRIPTION: |
190 |
+# An ebuild calls this to get the dependency information for optional apache |
191 |
+# support. If the myiuse parameter is not given it defaults to apache2. |
192 |
+# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() |
193 |
+# with the same myiuse parameter. |
194 |
+want_apache() { |
195 |
+ debug-print-function $FUNCNAME $* |
196 |
+ want_apache2 "$@" |
197 |
+} |
198 |
+ |
199 |
+# @FUNCTION: want_apache2 |
200 |
+# @USAGE: [myiuse] |
201 |
+# @DESCRIPTION: |
202 |
+# An ebuild calls this to get the dependency information for optional apache-2.x |
203 |
+# support. If the myiuse parameter is not given it defaults to apache2. |
204 |
+# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() |
205 |
+# with the same myiuse parameter. |
206 |
+want_apache2() { |
207 |
+ debug-print-function $FUNCNAME $* |
208 |
+ |
209 |
+ local myiuse=${1:-apache2} |
210 |
+ IUSE="${IUSE} ${myiuse}" |
211 |
+ DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
212 |
+ RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
213 |
+} |
214 |
+ |
215 |
+# @FUNCTION: want_apache2_2 |
216 |
+# @USAGE: [myiuse] |
217 |
+# @DESCRIPTION: |
218 |
+# An ebuild calls this to get the dependency information for optional |
219 |
+# apache-2.2.x support. If the myiuse parameter is not given it defaults to |
220 |
+# apache2. |
221 |
+# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() |
222 |
+# with the same myiuse parameter. |
223 |
+want_apache2_2() { |
224 |
+ debug-print-function $FUNCNAME $* |
225 |
+ |
226 |
+ local myiuse=${1:-apache2} |
227 |
+ IUSE="${IUSE} ${myiuse}" |
228 |
+ DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
229 |
+ RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
230 |
+} |
231 |
+ |
232 |
+# @FUNCTION: need_apache |
233 |
+# @DESCRIPTION: |
234 |
+# An ebuild calls this to get the dependency information for apache. |
235 |
+need_apache() { |
236 |
+ debug-print-function $FUNCNAME $* |
237 |
+ need_apache2 |
238 |
+} |
239 |
+ |
240 |
+# @FUNCTION: need_apache2 |
241 |
+# @DESCRIPTION: |
242 |
+# An ebuild calls this to get the dependency information for apache-2.x. |
243 |
+need_apache2() { |
244 |
+ debug-print-function $FUNCNAME $* |
245 |
+ |
246 |
+ DEPEND="${DEPEND} ${APACHE2_DEPEND}" |
247 |
+ RDEPEND="${RDEPEND} ${APACHE2_DEPEND}" |
248 |
+ _init_apache2 |
249 |
+} |
250 |
+ |
251 |
+# @FUNCTION: need_apache2_2 |
252 |
+# @DESCRIPTION: |
253 |
+# An ebuild calls this to get the dependency information for apache-2.2.x. |
254 |
+need_apache2_2() { |
255 |
+ debug-print-function $FUNCNAME $* |
256 |
+ |
257 |
+ DEPEND="${DEPEND} ${APACHE2_2_DEPEND}" |
258 |
+ RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}" |
259 |
+ _init_apache2 |
260 |
+} |
261 |
+ |
262 |
+# @FUNCTION: need_apache2_4 |
263 |
+# @DESCRIPTION: |
264 |
+# An ebuild calls this to get the dependency information for apache-2.4.x. |
265 |
+need_apache2_4() { |
266 |
+ debug-print-function $FUNCNAME $* |
267 |
+ |
268 |
+ DEPEND="${DEPEND} ${APACHE2_4_DEPEND}" |
269 |
+ RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}" |
270 |
+ _init_apache2 |
271 |
+} |
272 |
+ |
273 |
+# @FUNCTION: has_apache |
274 |
+# @DESCRIPTION: |
275 |
+# An ebuild calls this to get runtime variables for an indirect apache |
276 |
+# dependency without USE-flag, in which case want_apache does not work. |
277 |
+# DO NOT call this function in global scope. |
278 |
+has_apache() { |
279 |
+ debug-print-function $FUNCNAME $* |
280 |
+ |
281 |
+ if has_version '>=www-servers/apache-2'; then |
282 |
+ _init_apache2 |
283 |
+ else |
284 |
+ _init_no_apache |
285 |
+ fi |
286 |
+} |
287 |
+ |
288 |
+# @FUNCTION: has_apache_threads |
289 |
+# @USAGE: [myflag] |
290 |
+# @DESCRIPTION: |
291 |
+# An ebuild calls this to make sure thread-safety is enabled if apache has been |
292 |
+# built with a threaded MPM. If the myflag parameter is not given it defaults to |
293 |
+# threads. |
294 |
+has_apache_threads() { |
295 |
+ debug-print-function $FUNCNAME $* |
296 |
+ |
297 |
+ if ! built_with_use www-servers/apache threads; then |
298 |
+ return |
299 |
+ fi |
300 |
+ |
301 |
+ local myflag="${1:-threads}" |
302 |
+ |
303 |
+ if ! use ${myflag}; then |
304 |
+ echo |
305 |
+ eerror "You need to enable USE flag '${myflag}' to build a thread-safe version" |
306 |
+ eerror "of ${CATEGORY}/${PN} for use with www-servers/apache" |
307 |
+ die "Need missing USE flag '${myflag}'" |
308 |
+ fi |
309 |
+} |
310 |
+ |
311 |
+# @FUNCTION: has_apache_threads_in |
312 |
+# @USAGE: <myforeign> [myflag] |
313 |
+# @DESCRIPTION: |
314 |
+# An ebuild calls this to make sure thread-safety is enabled in a foreign |
315 |
+# package if apache has been built with a threaded MPM. If the myflag parameter |
316 |
+# is not given it defaults to threads. |
317 |
+has_apache_threads_in() { |
318 |
+ debug-print-function $FUNCNAME $* |
319 |
+ |
320 |
+ if ! built_with_use www-servers/apache threads; then |
321 |
+ return |
322 |
+ fi |
323 |
+ |
324 |
+ local myforeign="$1" |
325 |
+ local myflag="${2:-threads}" |
326 |
+ |
327 |
+ if ! built_with_use ${myforeign} ${myflag}; then |
328 |
+ echo |
329 |
+ eerror "You need to enable USE flag '${myflag}' in ${myforeign} to" |
330 |
+ eerror "build a thread-safe version of ${CATEGORY}/${PN} for use" |
331 |
+ eerror "with www-servers/apache" |
332 |
+ die "Need missing USE flag '${myflag}' in ${myforeign}" |
333 |
+ fi |
334 |
+} |
335 |
+ |
336 |
+EXPORT_FUNCTIONS pkg_setup |
337 |
|
338 |
diff --git a/www-apache/mod_mono/mod_mono-2.10-r1.ebuild b/www-apache/mod_mono/mod_mono-2.10-r1.ebuild |
339 |
index b8cadf5..48caacb 100644 |
340 |
--- a/www-apache/mod_mono/mod_mono-2.10-r1.ebuild |
341 |
+++ b/www-apache/mod_mono/mod_mono-2.10-r1.ebuild |
342 |
@@ -5,7 +5,7 @@ |
343 |
EAPI=6 |
344 |
|
345 |
# Watch the order of these! |
346 |
-inherit autotools apache-module multilib eutils go-mono mono |
347 |
+inherit autotools apache-module eutils mono |
348 |
|
349 |
KEYWORDS="~amd64 ~x86" |
350 |
|
351 |
@@ -15,8 +15,11 @@ LICENSE="Apache-2.0" |
352 |
SLOT="0" |
353 |
IUSE="debug" |
354 |
|
355 |
-DEPEND="=dev-dotnet/xsp-${GO_MONO_REL_PV}*" |
356 |
-RDEPEND="${DEPEND}" |
357 |
+CDEPEND="" |
358 |
+DEPEND="${CDEPEND}" |
359 |
+RDEPEND="${CDEPEND} |
360 |
+ >=www-servers/xsp-2014.12-r2014120900 |
361 |
+ " |
362 |
|
363 |
APACHE2_MOD_CONF="2.2/70_${PN}" |
364 |
APACHE2_MOD_DEFINE="MONO" |