2022-04-05 13:33:08 +02:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
2010-10-21 21:07:23 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2023-07-20 20:28:34 +02:00
|
|
|
EAPI=8
|
2010-10-21 21:07:23 +02:00
|
|
|
|
2023-07-20 20:28:34 +02:00
|
|
|
inherit db-use
|
2010-10-21 21:07:23 +02:00
|
|
|
|
|
|
|
DESCRIPTION="Yet Another Passwd 2 LDIF Converter"
|
|
|
|
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
2022-04-05 13:33:08 +02:00
|
|
|
HOMEPAGE="https://sourceforge.net/projects/yap2lc/"
|
2010-10-21 21:07:23 +02:00
|
|
|
|
|
|
|
RDEPEND="berkdb? ( >=sys-libs/db-4 )"
|
|
|
|
|
|
|
|
SLOT="0"
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE="berkdb"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
epatch "${FILESDIR}"/yap2lc-0.5.9-asneeded-1.patch
|
|
|
|
}
|
2010-10-21 21:09:19 +02:00
|
|
|
|
2010-10-21 21:07:23 +02:00
|
|
|
src_configure() {
|
2010-10-21 21:09:19 +02:00
|
|
|
local myconf
|
|
|
|
|
|
|
|
if use berkdb; then
|
|
|
|
local db_version
|
|
|
|
db_version="$(db_findver sys-libs/db)" || die "Unable to find Berkeley DB version"
|
|
|
|
db_version="$(db_ver_to_slot "${db_version}")"
|
|
|
|
db_version="${db_version/\./}"
|
|
|
|
myconf+=" --with-bdb --with-bdb-lib=/usr/$(get_libdir) --with-bdb-inc=$(db_includedir 2> /dev/null)"
|
|
|
|
#sed -i "s!-ldb!-ldb${db_version}!" configure
|
|
|
|
else
|
|
|
|
myconf+=" --without-bdb"
|
|
|
|
fi
|
|
|
|
|
|
|
|
econf ${myconf}
|
2010-10-21 21:07:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2010-10-21 21:09:19 +02:00
|
|
|
dobin ${PN} || die "dobin failed"
|
|
|
|
dodoc CHANGELOG README
|
|
|
|
docinto samples
|
|
|
|
dodoc samples/*
|
2010-10-21 21:07:23 +02:00
|
|
|
}
|
|
|
|
|