1 |
vapier 14/01/31 08:29:39 |
2 |
|
3 |
Modified: apache-2.eclass |
4 |
Log: |
5 |
fix pcre-config/pkg-config/apr/apr-util handling when cross-compiling by leveraging SYSROOT #385783 by Bertrand Jacquin |
6 |
|
7 |
Revision Changes Path |
8 |
1.34 eclass/apache-2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.34&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.34&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.33&r2=1.34 |
13 |
|
14 |
Index: apache-2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v |
17 |
retrieving revision 1.33 |
18 |
retrieving revision 1.34 |
19 |
diff -u -r1.33 -r1.34 |
20 |
--- apache-2.eclass 8 Jan 2014 08:38:10 -0000 1.33 |
21 |
+++ apache-2.eclass 31 Jan 2014 08:29:39 -0000 1.34 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2014 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.33 2014/01/08 08:38:10 patrick Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.34 2014/01/31 08:29:39 vapier Exp $ |
27 |
|
28 |
# @ECLASS: apache-2.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -10,7 +10,7 @@ |
31 |
# This eclass handles apache-2.x ebuild functions such as LoadModule generation |
32 |
# and inter-module dependency checking. |
33 |
|
34 |
-inherit autotools eutils flag-o-matic multilib ssl-cert user |
35 |
+inherit autotools eutils flag-o-matic multilib ssl-cert user toolchain-funcs |
36 |
|
37 |
# ============================================================================== |
38 |
# INTERNAL VARIABLES |
39 |
@@ -424,6 +424,14 @@ |
40 |
# patched-in MPMs need the build environment rebuilt |
41 |
sed -i -e '/sinclude/d' configure.in |
42 |
AT_M4DIR=build eautoreconf |
43 |
+ |
44 |
+ # This package really should upgrade to using pcre's .pc file. |
45 |
+ cat <<-\EOF >"${T}"/pcre-config |
46 |
+ #!/bin/sh |
47 |
+ [ "${flag}" = "--version" ] && set -- --modversion |
48 |
+ exec ${PKG_CONFIG} libpcre "$@" |
49 |
+ EOF |
50 |
+ chmod a+x "${T}"/pcre-config |
51 |
} |
52 |
|
53 |
# @FUNCTION: apache-2_src_configure |
54 |
@@ -431,6 +439,8 @@ |
55 |
# This function adds compiler flags and runs econf and emake based on MY_MPM and |
56 |
# MY_CONF |
57 |
apache-2_src_configure() { |
58 |
+ tc-export PKG_CONFIG |
59 |
+ |
60 |
# Instead of filtering --as-needed (bug #128505), append --no-as-needed |
61 |
# Thanks to Harald van Dijk |
62 |
append-ldflags $(no-as-needed) |
63 |
@@ -442,6 +452,7 @@ |
64 |
|
65 |
# econf overwrites the stuff from config.layout, so we have to put them into |
66 |
# our myconf line too |
67 |
+ ac_cv_path_PKGCONFIG=${PKG_CONFIG} \ |
68 |
econf \ |
69 |
--includedir=/usr/include/apache2 \ |
70 |
--libexecdir=/usr/$(get_libdir)/apache2/modules \ |
71 |
@@ -449,9 +460,9 @@ |
72 |
--sysconfdir=/etc/apache2 \ |
73 |
--localstatedir=/var \ |
74 |
--with-mpm=${MY_MPM} \ |
75 |
- --with-apr=/usr \ |
76 |
- --with-apr-util=/usr \ |
77 |
- --with-pcre=/usr \ |
78 |
+ --with-apr="${SYSROOT}"/usr \ |
79 |
+ --with-apr-util="${SYSROOT}"/usr \ |
80 |
+ --with-pcre="${T}"/pcre-config \ |
81 |
--with-z=/usr \ |
82 |
--with-port=80 \ |
83 |
--with-program-name=apache2 \ |