Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr-util/
Date: Mon, 02 Apr 2018 11:42:22
Message-Id: 1522669333.01fc79f2f7b6c3493e8016adc36366d02651d406.pacho@gentoo
1 commit: 01fc79f2f7b6c3493e8016adc36366d02651d406
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 2 11:27:43 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 2 11:42:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01fc79f2
7
8 dev-libs/apr-util: Needs to follow apr subslot bumps (#525222)
9
10 Package-Manager: Portage-2.3.27, Repoman-2.3.9
11
12 dev-libs/apr-util/apr-util-1.6.1-r1.ebuild | 135 +++++++++++++++++++++++++++++
13 1 file changed, 135 insertions(+)
14
15 diff --git a/dev-libs/apr-util/apr-util-1.6.1-r1.ebuild b/dev-libs/apr-util/apr-util-1.6.1-r1.ebuild
16 new file mode 100644
17 index 00000000000..55ba63acefc
18 --- /dev/null
19 +++ b/dev-libs/apr-util/apr-util-1.6.1-r1.ebuild
20 @@ -0,0 +1,135 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
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.6.2"
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 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~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 gdbm ldap libressl mysql nss odbc openssl postgres sqlite static-libs"
40 +#RESTRICT="test"
41 +
42 +RDEPEND="
43 + dev-libs/expat
44 + >=dev-libs/apr-${APR_PV}:1=
45 + berkdb? ( >=sys-libs/db-4:= )
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 +"
58 +DEPEND="
59 + ${RDEPEND}
60 + >=sys-devel/libtool-2.4.2
61 + doc? ( app-doc/doxygen )
62 +"
63 +
64 +DOCS=(CHANGES NOTICE README)
65 +
66 +PATCHES=(
67 + "${FILESDIR}"/${PN}-1.5.3-sysroot.patch #385775
68 +)
69 +
70 +src_prepare() {
71 + default
72 +
73 + # Fix usage of libmysqlclient (bug #620230)
74 + grep -lrF "libmysqlclient_r" "${S}" \
75 + | xargs sed 's@libmysqlclient_r@libmysqlclient@g' -i \
76 + || die
77 +
78 + mv configure.{in,ac} || die
79 + eautoreconf
80 + elibtoolize
81 +}
82 +
83 +src_configure() {
84 + local myconf=(
85 + --datadir="${EPREFIX}"/usr/share/apr-util-1
86 + --with-apr="${SYSROOT}${EPREFIX}"/usr
87 + --with-expat="${EPREFIX}"/usr
88 + --without-sqlite2
89 + $(use_with gdbm)
90 + $(use_with ldap)
91 + $(use_with mysql)
92 + $(use_with nss)
93 + $(use_with odbc)
94 + $(use_with openssl)
95 + $(use_with postgres pgsql)
96 + $(use_with sqlite sqlite3)
97 + )
98 +
99 + tc-is-static-only && myconf+=( --disable-util-dso )
100 +
101 + if use berkdb; then
102 + local db_version
103 + db_version="$(db_findver sys-libs/db)" || die "Unable to find Berkeley DB version"
104 + db_version="$(db_ver_to_slot "${db_version}")"
105 + db_version="${db_version/\./}"
106 + myconf+=(
107 + --with-dbm=db${db_version}
108 + # We use $T for the libdir because otherwise it'd simply be the normal
109 + # system libdir. That's pointless as the compiler will search it for
110 + # us already. This makes cross-compiling and such easier.
111 + --with-berkeley-db="${SYSROOT}$(db_includedir 2>/dev/null):${T}"
112 + )
113 + else
114 + myconf+=( --without-berkeley-db )
115 + fi
116 +
117 + if use nss || use openssl ; then
118 + myconf+=( --with-crypto ) # 518708
119 + fi
120 +
121 + econf "${myconf[@]}"
122 + # Use the current env build settings rather than whatever apr was built with.
123 + sed -i -r \
124 + -e "/^(apr_builddir|apr_builders|top_builddir)=/s:=:=${SYSROOT}:" \
125 + -e "/^CC=/s:=.*:=$(tc-getCC):" \
126 + -e '/^(C|CPP|CXX|LD)FLAGS=/d' \
127 + -e '/^LTFLAGS/s:--silent::' \
128 + build/rules.mk || die
129 +}
130 +
131 +src_compile() {
132 + emake
133 + use doc && emake dox
134 +}
135 +
136 +src_install() {
137 + default
138 +
139 + find "${ED}" -name "*.la" -delete || die
140 + if [[ -d "${ED%/}/usr/$(get_libdir)/apr-util-${SLOT}" ]] ; then
141 + find "${ED%/}/usr/$(get_libdir)/apr-util-${SLOT}" -name "*.a" -delete || die
142 + fi
143 + if ! use static-libs ; then
144 + find "${ED}" -name "*.a" -not -name "*$(get_libname)" -delete || die
145 + fi
146 +
147 + if use doc ; then
148 + docinto html
149 + dodoc -r docs/dox/html/*
150 + fi
151 +
152 + # This file is only used on AIX systems, which Gentoo is not,
153 + # and causes collisions between the SLOTs, so remove it.
154 + rm "${ED%/}/usr/$(get_libdir)/aprutil.exp" || die
155 +}