From 7f9729886ba8f62b2c485be26df84aa8025e00f2 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 3 Jun 2010 20:13:55 +0000 Subject: Support installation for multiple Python ABIs (bug #316951). (Portage version: HEAD/cvs/Linux x86_64) --- sys-libs/cracklib/cracklib-2.8.16.ebuild | 63 ++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 16 deletions(-) (limited to 'sys-libs/cracklib/cracklib-2.8.16.ebuild') diff --git a/sys-libs/cracklib/cracklib-2.8.16.ebuild b/sys-libs/cracklib/cracklib-2.8.16.ebuild index 43a8899081cc..650240569354 100644 --- a/sys-libs/cracklib/cracklib-2.8.16.ebuild +++ b/sys-libs/cracklib/cracklib-2.8.16.ebuild @@ -1,8 +1,13 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.8.16.ebuild,v 1.1 2010/04/30 13:02:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.8.16.ebuild,v 1.2 2010/06/03 20:13:55 arfrever Exp $ -inherit eutils toolchain-funcs multilib libtool +EAPI="3" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit distutils libtool toolchain-funcs MY_P=${P/_} DESCRIPTION="Password Checking Library" @@ -14,10 +19,14 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="nls python" -DEPEND="python? ( /dev/null + distutils_src_prepare + popd > /dev/null + fi } -src_compile() { +src_configure() { econf \ --with-default-dict='$(libdir)/cracklib_dict' \ - $(use_enable nls) \ - $(use_with python) \ - || die - emake || die + --without-python \ + $(use_enable nls) +} + +src_compile() { + default + + if use python; then + pushd python > /dev/null + distutils_src_compile + popd > /dev/null + fi } src_install() { - emake DESTDIR="${D}" install || die "make install failed" - rm -r "${D}"/usr/share/cracklib + emake DESTDIR="${D}" install || die "emake install failed" + rm -r "${ED}"/usr/share/cracklib - find "${D}" -name '_cracklibmodule.*a' -exec rm {} + #316495 + if use python; then + pushd python > /dev/null + distutils_src_install + popd > /dev/null + fi # move shared libs to / gen_usr_ldscript -a crack @@ -65,4 +90,10 @@ pkg_postinst() { create-cracklib-dict /usr/share/dict/* > /dev/null eend $? fi + + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm } -- cgit v1.2.3-65-gdbad