/[gentoo-x86]/sys-libs/cracklib/cracklib-2.8.19.ebuild
Gentoo

Contents of /sys-libs/cracklib/cracklib-2.8.19.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Wed Oct 31 20:49:42 2012 UTC (6 months, 2 weeks ago) by zerochaos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +4 -2 lines
last fix for USE=build bootstrapping, missed a line on the previous commit

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.8.19.ebuild,v 1.11 2012/10/22 01:02:27 zerochaos Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="python? 2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython"
9
10 inherit eutils distutils libtool toolchain-funcs
11
12 MY_P=${P/_}
13 DESCRIPTION="Password Checking Library"
14 HOMEPAGE="http://sourceforge.net/projects/cracklib"
15 SRC_URI="mirror://sourceforge/cracklib/${MY_P}.tar.gz"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
20 IUSE="build nls python static-libs zlib"
21
22 RDEPEND="zlib? ( sys-libs/zlib )"
23 DEPEND="${RDEPEND}
24 python? ( dev-python/setuptools )"
25
26 S=${WORKDIR}/${MY_P}
27
28 PYTHON_MODNAME="cracklib.py"
29 do_python() {
30 use build && return 0
31 use python || return 0
32 case ${EBUILD_PHASE} in
33 prepare|configure|compile|install)
34 pushd python > /dev/null || die
35 distutils_src_${EBUILD_PHASE}
36 popd > /dev/null
37 ;;
38 *)
39 distutils_pkg_${EBUILD_PHASE}
40 ;;
41 esac
42 }
43
44 pkg_setup() {
45 # workaround #195017
46 if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
47 eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
48 eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
49 die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
50 fi
51
52 if use !build; then
53 use python && python_pkg_setup
54 fi
55 }
56
57 src_prepare() {
58 elibtoolize #269003
59 do_python
60 }
61
62 src_configure() {
63 export ac_cv_header_zlib_h=$(usex zlib)
64 export ac_cv_search_gzopen=$(usex zlib -lz no)
65 econf \
66 --with-default-dict='$(libdir)/cracklib_dict' \
67 --without-python \
68 $(use_enable nls) \
69 $(use_enable static-libs static)
70 }
71
72 src_compile() {
73 default
74 do_python
75 }
76
77 src_install() {
78 emake DESTDIR="${D}" install || die
79 use static-libs || find "${ED}"/usr -name libcrack.la -delete
80 rm -r "${ED}"/usr/share/cracklib
81
82 do_python
83
84 # move shared libs to /
85 gen_usr_ldscript -a crack
86
87 insinto /usr/share/dict
88 doins dicts/cracklib-small || die
89
90 dodoc AUTHORS ChangeLog NEWS README*
91 }
92
93 pkg_postinst() {
94 if [[ ${ROOT} == "/" ]] ; then
95 ebegin "Regenerating cracklib dictionary"
96 create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
97 eend $?
98 fi
99
100 do_python
101 }
102
103 pkg_postrm() {
104 do_python
105 }

  ViewVC Help
Powered by ViewVC 1.1.13