| 1 |
aballier |
1.2 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
neurogeek |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
aballier |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.4.1.ebuild,v 1.1 2011/12/27 23:35:41 neurogeek Exp $
|
| 4 |
neurogeek |
1.1 |
|
| 5 |
|
|
EAPI="4"
|
| 6 |
|
|
|
| 7 |
|
|
# Usually apr-util has the same PV as apr, but in case of security fixes, this may change.
|
| 8 |
|
|
# APR_PV="${PV}"
|
| 9 |
|
|
APR_PV="1.4.5"
|
| 10 |
|
|
|
| 11 |
|
|
inherit autotools db-use eutils libtool multilib
|
| 12 |
|
|
|
| 13 |
|
|
DESCRIPTION="Apache Portable Runtime Utility Library"
|
| 14 |
|
|
HOMEPAGE="http://apr.apache.org/"
|
| 15 |
|
|
SRC_URI="mirror://apache/apr/${P}.tar.bz2"
|
| 16 |
|
|
|
| 17 |
|
|
LICENSE="Apache-2.0"
|
| 18 |
|
|
SLOT="1"
|
| 19 |
aballier |
1.2 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
| 20 |
neurogeek |
1.1 |
IUSE="berkdb doc freetds gdbm ldap mysql nss odbc openssl postgres sqlite static-libs"
|
| 21 |
|
|
RESTRICT="test"
|
| 22 |
|
|
|
| 23 |
|
|
RDEPEND="dev-libs/expat
|
| 24 |
|
|
>=dev-libs/apr-${APR_PV}:1
|
| 25 |
|
|
berkdb? ( >=sys-libs/db-4 )
|
| 26 |
|
|
freetds? ( dev-db/freetds )
|
| 27 |
|
|
gdbm? ( sys-libs/gdbm )
|
| 28 |
|
|
ldap? ( =net-nds/openldap-2* )
|
| 29 |
|
|
mysql? ( =virtual/mysql-5* )
|
| 30 |
|
|
nss? ( dev-libs/nss )
|
| 31 |
|
|
odbc? ( dev-db/unixODBC )
|
| 32 |
|
|
openssl? ( dev-libs/openssl )
|
| 33 |
|
|
postgres? ( dev-db/postgresql-base )
|
| 34 |
|
|
sqlite? ( dev-db/sqlite:3 )"
|
| 35 |
|
|
DEPEND="${RDEPEND}
|
| 36 |
|
|
doc? ( app-doc/doxygen )"
|
| 37 |
|
|
|
| 38 |
|
|
DOCS=(CHANGES NOTICE README)
|
| 39 |
|
|
|
| 40 |
|
|
src_prepare() {
|
| 41 |
|
|
epatch "${FILESDIR}/${PN}-1.3.12-bdb-5.2.patch"
|
| 42 |
|
|
eautoreconf
|
| 43 |
|
|
|
| 44 |
|
|
elibtoolize
|
| 45 |
|
|
}
|
| 46 |
|
|
|
| 47 |
|
|
src_configure() {
|
| 48 |
|
|
local myconf
|
| 49 |
|
|
|
| 50 |
|
|
if use berkdb; then
|
| 51 |
|
|
local db_version
|
| 52 |
|
|
db_version="$(db_findver sys-libs/db)" || die "Unable to find Berkeley DB version"
|
| 53 |
|
|
db_version="$(db_ver_to_slot "${db_version}")"
|
| 54 |
|
|
db_version="${db_version/\./}"
|
| 55 |
|
|
myconf+=" --with-dbm=db${db_version} --with-berkeley-db=$(db_includedir 2> /dev/null):/usr/$(get_libdir)"
|
| 56 |
|
|
else
|
| 57 |
|
|
myconf+=" --without-berkeley-db"
|
| 58 |
|
|
fi
|
| 59 |
|
|
|
| 60 |
|
|
econf \
|
| 61 |
|
|
--datadir=/usr/share/apr-util-1 \
|
| 62 |
|
|
--with-apr=/usr \
|
| 63 |
|
|
--with-expat=/usr \
|
| 64 |
|
|
--without-sqlite2 \
|
| 65 |
|
|
$(use_with freetds) \
|
| 66 |
|
|
$(use_with gdbm) \
|
| 67 |
|
|
$(use_with ldap) \
|
| 68 |
|
|
$(use_with mysql) \
|
| 69 |
|
|
$(use_with nss) \
|
| 70 |
|
|
$(use_with odbc) \
|
| 71 |
|
|
$(use_with openssl) \
|
| 72 |
|
|
$(use_with postgres pgsql) \
|
| 73 |
|
|
$(use_with sqlite sqlite3) \
|
| 74 |
|
|
${myconf}
|
| 75 |
|
|
}
|
| 76 |
|
|
|
| 77 |
|
|
src_compile() {
|
| 78 |
|
|
emake CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
| 79 |
|
|
|
| 80 |
|
|
if use doc; then
|
| 81 |
|
|
emake dox
|
| 82 |
|
|
fi
|
| 83 |
|
|
}
|
| 84 |
|
|
|
| 85 |
|
|
src_install() {
|
| 86 |
|
|
default
|
| 87 |
|
|
|
| 88 |
|
|
find "${ED}" -name "*.la" -exec rm -f {} +
|
| 89 |
|
|
find "${ED}usr/$(get_libdir)/apr-util-${SLOT}" -name "*.a" -exec rm -f {} +
|
| 90 |
|
|
|
| 91 |
|
|
if use doc; then
|
| 92 |
|
|
dohtml -r docs/dox/html/*
|
| 93 |
|
|
fi
|
| 94 |
|
|
|
| 95 |
|
|
if ! use static-libs; then
|
| 96 |
|
|
find "${ED}" -name "*.a" -exec rm -f {} +
|
| 97 |
|
|
fi
|
| 98 |
|
|
|
| 99 |
|
|
# This file is only used on AIX systems, which Gentoo is not,
|
| 100 |
|
|
# and causes collisions between the SLOTs, so remove it.
|
| 101 |
|
|
rm -f "${ED}usr/$(get_libdir)/aprutil.exp"
|
| 102 |
|
|
}
|