summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-06-03 20:13:55 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-06-03 20:13:55 +0000
commit7f9729886ba8f62b2c485be26df84aa8025e00f2 (patch)
tree76160825ee95d7034720c2575d30a62f89de1204 /sys-libs/cracklib/cracklib-2.8.16.ebuild
parentCLisp supports db:4.7, update dependency. (diff)
downloadgentoo-2-7f9729886ba8f62b2c485be26df84aa8025e00f2.tar.gz
gentoo-2-7f9729886ba8f62b2c485be26df84aa8025e00f2.tar.bz2
gentoo-2-7f9729886ba8f62b2c485be26df84aa8025e00f2.zip
Support installation for multiple Python ABIs (bug #316951).
(Portage version: HEAD/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/cracklib/cracklib-2.8.16.ebuild')
-rw-r--r--sys-libs/cracklib/cracklib-2.8.16.ebuild63
1 files changed, 47 insertions, 16 deletions
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-lang/python-3 )"
+DEPEND="sys-libs/zlib
+ python? ( dev-python/setuptools )"
+RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}
+PYTHON_MODNAME="cracklib.py"
+
pkg_setup() {
# workaround #195017
if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
@@ -25,30 +34,46 @@ pkg_setup() {
eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
fi
+
+ use python && python_pkg_setup
}
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${PN}-2.8.13-python-linkage.patch #246747
- sed -i '/PYTHON/s:\(print\) \([^"]*\):\1(\2):' configure #302908
+src_prepare() {
elibtoolize #269003
+
+ if use python; then
+ pushd 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
}