sys-libs/cracklib: import from portage

Just copying the ebuilds from portage/ so hopefully no functional changes.

BUG=chromium-os:26016
TEST=`cbuildbot arm-generic-full` works
TEST=build_packages+build_image for x86-alex boots

Change-Id: Iecc11d09ba5759b37bb426c078c727d4d588c43c
Reviewed-on: https://gerrit.chromium.org/gerrit/15431
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2012-02-01 17:34:20 -05:00 committed by Gerrit
parent e53d1e25b5
commit bc8c3d5154
3 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST cracklib-2.8.13.tar.gz 593050 RMD160 948b02e6a74dfc94192f6f6ce9e3fc733d7a92f4 SHA1 e107d0a14c09aea9c63c18840db8b94b972b5315 SHA256 0a06caff3626c397d023f0c19efedfea295180c2c5ba2def57016a17e158041a

View File

@ -0,0 +1,65 @@
# 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.13-r1.ebuild,v 1.3 2010/03/08 22:35:46 zmedico Exp $
inherit eutils toolchain-funcs multilib libtool
MY_P=${P/_}
DESCRIPTION="Password Checking Library"
HOMEPAGE="http://sourceforge.net/projects/cracklib"
SRC_URI="mirror://sourceforge/cracklib/${MY_P}.tar.gz"
LICENSE="CRACKLIB"
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 )"
S=${WORKDIR}/${MY_P}
pkg_setup() {
# workaround #195017
if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-python-linkage.patch #246747
elibtoolize #269003
}
src_compile() {
econf \
--with-default-dict='$(libdir)/cracklib_dict' \
$(use_enable nls) \
$(use_with python) \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die "make install failed"
rm -r "${D}"/usr/share/cracklib
# move shared libs to /
gen_usr_ldscript -a crack
insinto /usr/share/dict
doins dicts/cracklib-small || die "word dict"
dodoc AUTHORS ChangeLog NEWS README*
}
pkg_postinst() {
if [[ ${ROOT} == "/" ]] ; then
ebegin "Regenerating cracklib dictionary"
create-cracklib-dict /usr/share/dict/* > /dev/null
eend $?
fi
}

View File

@ -0,0 +1,13 @@
http://bugs.gentoo.org/246747
--- cracklib/python/Makefile.in
+++ cracklib/python/Makefile.in
@@ -57,7 +57,7 @@
am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)"
pyexecLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pyexec_LTLIBRARIES)
-_cracklibmodule_la_LIBADD =
+_cracklibmodule_la_LIBADD = -lpython$(PYTHON_VERSION)
_cracklibmodule_la_SOURCES = _cracklibmodule.c
_cracklibmodule_la_OBJECTS = _cracklibmodule.lo
_cracklibmodule_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \