1 |
commit: a03c50b93c3dd62e8b59a694656ac1d5e6652cb9 |
2 |
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 2 16:09:13 2015 +0000 |
4 |
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 2 16:16:11 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a03c50b9 |
7 |
|
8 |
dev-libs/apr-util: add libressl support |
9 |
|
10 |
dev-libs/apr-util/apr-util-1.5.4-r1.ebuild | 116 +++++++++++++++++++++++++++++ |
11 |
dev-libs/apr-util/metadata.xml | 2 + |
12 |
2 files changed, 118 insertions(+) |
13 |
|
14 |
diff --git a/dev-libs/apr-util/apr-util-1.5.4-r1.ebuild b/dev-libs/apr-util/apr-util-1.5.4-r1.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..75e9129 |
17 |
--- /dev/null |
18 |
+++ b/dev-libs/apr-util/apr-util-1.5.4-r1.ebuild |
19 |
@@ -0,0 +1,116 @@ |
20 |
+# Copyright 1999-2015 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI="4" |
25 |
+ |
26 |
+# Usually apr-util has the same PV as apr, but in case of security fixes, this may change. |
27 |
+# APR_PV="${PV}" |
28 |
+APR_PV="1.4.6" |
29 |
+ |
30 |
+inherit autotools db-use eutils libtool multilib toolchain-funcs |
31 |
+ |
32 |
+DESCRIPTION="Apache Portable Runtime Utility Library" |
33 |
+HOMEPAGE="http://apr.apache.org/" |
34 |
+SRC_URI="mirror://apache/apr/${P}.tar.bz2" |
35 |
+ |
36 |
+LICENSE="Apache-2.0" |
37 |
+SLOT="1" |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
39 |
+IUSE="berkdb doc freetds gdbm ldap libressl mysql nss odbc openssl postgres sqlite static-libs" |
40 |
+#RESTRICT="test" |
41 |
+ |
42 |
+RDEPEND="dev-libs/expat |
43 |
+ >=dev-libs/apr-${APR_PV}:1 |
44 |
+ berkdb? ( >=sys-libs/db-4 ) |
45 |
+ freetds? ( dev-db/freetds ) |
46 |
+ gdbm? ( sys-libs/gdbm ) |
47 |
+ ldap? ( =net-nds/openldap-2* ) |
48 |
+ mysql? ( =virtual/mysql-5* ) |
49 |
+ nss? ( dev-libs/nss ) |
50 |
+ odbc? ( dev-db/unixODBC ) |
51 |
+ openssl? ( |
52 |
+ !libressl? ( dev-libs/openssl:0 ) |
53 |
+ libressl? ( dev-libs/libressl ) |
54 |
+ ) |
55 |
+ postgres? ( dev-db/postgresql ) |
56 |
+ sqlite? ( dev-db/sqlite:3 )" |
57 |
+DEPEND="${RDEPEND} |
58 |
+ >=sys-devel/libtool-2.4.2 |
59 |
+ doc? ( app-doc/doxygen )" |
60 |
+ |
61 |
+DOCS=(CHANGES NOTICE README) |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ epatch "${FILESDIR}"/${PN}-1.5.3-sysroot.patch #385775 |
65 |
+ eautoreconf |
66 |
+ elibtoolize |
67 |
+} |
68 |
+ |
69 |
+src_configure() { |
70 |
+ local myconf=() |
71 |
+ |
72 |
+ tc-is-static-only && myconf+=( --disable-util-dso ) |
73 |
+ |
74 |
+ if use berkdb; then |
75 |
+ local db_version |
76 |
+ db_version="$(db_findver sys-libs/db)" || die "Unable to find Berkeley DB version" |
77 |
+ db_version="$(db_ver_to_slot "${db_version}")" |
78 |
+ db_version="${db_version/\./}" |
79 |
+ myconf+=( |
80 |
+ --with-dbm=db${db_version} |
81 |
+ # We use $T for the libdir because otherwise it'd simply be the normal |
82 |
+ # system libdir. That's pointless as the compiler will search it for |
83 |
+ # us already. This makes cross-compiling and such easier. |
84 |
+ --with-berkeley-db="${SYSROOT}$(db_includedir 2>/dev/null):${T}" |
85 |
+ ) |
86 |
+ else |
87 |
+ myconf+=( --without-berkeley-db ) |
88 |
+ fi |
89 |
+ |
90 |
+ if use nss || use openssl ; then |
91 |
+ myconf+=( --with-crypto ) # 518708 |
92 |
+ fi |
93 |
+ |
94 |
+ econf \ |
95 |
+ --datadir="${EPREFIX}"/usr/share/apr-util-1 \ |
96 |
+ --with-apr="${SYSROOT}${EPREFIX}"/usr \ |
97 |
+ --with-expat="${EPREFIX}"/usr \ |
98 |
+ --without-sqlite2 \ |
99 |
+ $(use_with freetds) \ |
100 |
+ $(use_with gdbm) \ |
101 |
+ $(use_with ldap) \ |
102 |
+ $(use_with mysql) \ |
103 |
+ $(use_with nss) \ |
104 |
+ $(use_with odbc) \ |
105 |
+ $(use_with openssl) \ |
106 |
+ $(use_with postgres pgsql) \ |
107 |
+ $(use_with sqlite sqlite3) \ |
108 |
+ "${myconf[@]}" |
109 |
+ # Use the current env build settings rather than whatever apr was built with. |
110 |
+ sed -i -r \ |
111 |
+ -e "/^(apr_builddir|apr_builders|top_builddir)=/s:=:=${SYSROOT}:" \ |
112 |
+ -e "/^CC=/s:=.*:=$(tc-getCC):" \ |
113 |
+ -e '/^(C|CPP|CXX|LD)FLAGS=/d' \ |
114 |
+ -e '/^LTFLAGS/s:--silent::' \ |
115 |
+ build/rules.mk || die |
116 |
+} |
117 |
+ |
118 |
+src_compile() { |
119 |
+ emake |
120 |
+ use doc && emake dox |
121 |
+} |
122 |
+ |
123 |
+src_install() { |
124 |
+ default |
125 |
+ |
126 |
+ find "${ED}" -name "*.la" -delete |
127 |
+ find "${ED}usr/$(get_libdir)/apr-util-${SLOT}" -name "*.a" -delete |
128 |
+ use static-libs || find "${ED}" -name "*.a" -delete |
129 |
+ |
130 |
+ use doc && dohtml -r docs/dox/html/* |
131 |
+ |
132 |
+ # This file is only used on AIX systems, which Gentoo is not, |
133 |
+ # and causes collisions between the SLOTs, so remove it. |
134 |
+ rm -f "${ED}usr/$(get_libdir)/aprutil.exp" |
135 |
+} |
136 |
|
137 |
diff --git a/dev-libs/apr-util/metadata.xml b/dev-libs/apr-util/metadata.xml |
138 |
index 5847a73..442a814 100644 |
139 |
--- a/dev-libs/apr-util/metadata.xml |
140 |
+++ b/dev-libs/apr-util/metadata.xml |
141 |
@@ -6,6 +6,8 @@ |
142 |
<name>Lars Wendler</name> |
143 |
</maintainer> |
144 |
<use> |
145 |
+ <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> instead of |
146 |
+ <pkg>dev-libs/openssl</pkg> for 'openssl' USE flag</flag> |
147 |
<flag name="nss">Install apr_crypto_nss module</flag> |
148 |
<flag name="openssl">Install apr_crypto_openssl module</flag> |
149 |
</use> |