Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: depend.apache.eclass
Date: Sat, 08 Sep 2007 14:13:00
Message-Id: E1IU0wu-0003Z0-JB@stork.gentoo.org
1 hollow 07/09/08 14:06:12
2
3 Modified: depend.apache.eclass
4 Log:
5 add functions to get the right apr/apu-config
6
7 Revision Changes Path
8 1.34 eclass/depend.apache.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.34&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.34&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?r1=1.33&r2=1.34
13
14 Index: depend.apache.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v
17 retrieving revision 1.33
18 retrieving revision 1.34
19 diff -u -r1.33 -r1.34
20 --- depend.apache.eclass 29 Jul 2007 16:36:23 -0000 1.33
21 +++ depend.apache.eclass 8 Sep 2007 14:06:12 -0000 1.34
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2007 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.33 2007/07/29 16:36:23 phreak Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.34 2007/09/08 14:06:12 hollow Exp $
27
28 inherit multilib
29
30 @@ -107,6 +107,52 @@
31 WANT_APACHE_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
32
33 ####
34 +## apr_config/apu_config
35 +##
36 +## Version magic to get the correct apr-config/apu-config
37 +## based on the (probably) installed version of apache.
38 +## This is needed to get modules to link to the same apr/apu
39 +## as apache (i.e. link 0.9 for 2.0, 1.x for 2.2)
40 +####
41 +apr_config() {
42 + local default="${1:-1}"
43 + if [[ "${USE_APACHE}" == "2" ]]; then
44 + if has_version ${APACHE2_0_DEPEND}; then
45 + echo apr-config
46 + else
47 + echo apr-1-config
48 + fi
49 + else
50 + if [[ "${default}" == "0" ]]; then
51 + echo apr-config
52 + elif [[ "${default}" == "1" ]]; then
53 + echo apr-1-config
54 + else
55 + die "Unknown version specifier: ${default}"
56 + fi
57 + fi
58 +}
59 +
60 +apu_config() {
61 + local default="${1:-1}"
62 + if [[ "${USE_APACHE}" == "2" ]]; then
63 + if has_version ${APACHE2_0_DEPEND}; then
64 + echo apu-config
65 + else
66 + echo apu-1-config
67 + fi
68 + else
69 + if [[ "${default}" == "0" ]]; then
70 + echo apu-config
71 + elif [[ "${default}" == "1" ]]; then
72 + echo apu-1-config
73 + else
74 + die "Unknown version specifier: ${default}"
75 + fi
76 + fi
77 +}
78 +
79 +####
80 # uses_apache1() - !!! DEPRECATED !!!
81 ####
82
83 @@ -116,7 +162,7 @@
84 # into the dependency cache (DEPEND/RDEPEND/etc)
85 APACHE_VERSION="1"
86 APXS="${APXS1}"
87 - USE_APACHE2=""
88 + USE_APACHE="1"
89 APACHECTL="${APACHECTL1}"
90 APACHE_BASEDIR="${APACHE1_BASEDIR}"
91 APACHE_CONFDIR="${APACHE1_CONFDIR}"
92 @@ -136,7 +182,7 @@
93 # WARNING: Do not use these variables with anything that is put
94 # into the dependency cache (DEPEND/RDEPEND/etc)
95 APACHE_VERSION="2"
96 - USE_APACHE2="2"
97 + USE_APACHE="2"
98 APXS="${APXS2}"
99 APACHECTL="${APACHECTL2}"
100 APACHE_BASEDIR="${APACHE2_BASEDIR}"
101 @@ -149,7 +195,7 @@
102 doesnt_use_apache() {
103 debug-print-function $FUNCNAME $*
104 APACHE_VERSION="0"
105 - USE_APACHE=""
106 + USE_APACHE="0"
107 }
108
109 ####
110
111
112
113 --
114 gentoo-commits@g.o mailing list