--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ --- cracklib-2.8.16.ebuild +++ cracklib-2.8.16.ebuild @@ -2,7 +2,12 @@ # 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 $ -inherit eutils toolchain-funcs multilib libtool +EAPI="3" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit distutils toolchain-funcs MY_P=${P/_} DESCRIPTION="Password Checking Library" @@ -14,10 +19,14 @@ 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 +88,10 @@ create-cracklib-dict /usr/share/dict/* > /dev/null eend $? fi + + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm }