-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
-inherit autotools db-use eutils
+inherit autotools db-use
DESCRIPTION="libhome is a library providing a getpwnam() emulation"
HOMEPAGE="http://pll.sourceforge.net"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="berkdb ldap mysql pam postgres"
+IUSE="berkdb ldap mysql pam postgres static-libs"
DEPEND="berkdb? ( >=sys-libs/db-4 )
ldap? ( net-nds/openldap )
- mysql? ( virtual/mysql )
+ mysql? ( dev-db/mysql-connector-c:= )
pam? ( virtual/pam )
postgres? ( dev-db/postgresql[server] )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.10.2-Makefile.patch
+ "${FILESDIR}"/${PN}-0.10.2-ldap_deprecated.patch
+)
+
src_prepare() {
rm -f aclocal.m4
- epatch "${FILESDIR}"/${PN}-0.10.2-Makefile.patch
- epatch "${FILESDIR}"/${PN}-0.10.2-ldap_deprecated.patch
+ default
# bug 225579
sed -i -e 's:\<VERSION\>:__PKG_VERSION:' configure.in
$(use_with mysql) \
$(use_with pam) \
$(use_with postgres pgsql) \
- || die "econf failed"
-}
-
-src_compile() {
- emake || die "emake failed"
+ $(use_enable static-libs static)
}
src_install() {
- emake DESTDIR="${D}" install || die "make install failed"
+ default
+ use static-libs || find "${D}" -name '*.la' -delete
}